test(e2e): click outside the popup where the dialog takes the hit

The popup probe clicked elementFromPoint(2, innerHeight - 2) to close the popup. In Firefox at 1920 px that corner returned the html element in 4 of 10 stress rounds, so the close handler, which acts only on a click on the dialog itself, correctly ignored it. The probe now clicks the middle of the widest free margin around the popup box and waits up to 3 s until that point hits the dialog, else clicks whatever is there, so a real overlay still fails.

🎯 Fix: 85 %
💥 Break: 5 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 81
🚦 Gate: ⛔ fix 85 % < 90 (operator word 2026-11-13: commit and merge)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-13 23:23:51 +00:00
1 parent c202429cf9
commit 42102cf9d2
1 file changed
+3 -1
+3 -1
View File
@@ -262,7 +262,9 @@ POPUPS = """
};
};
const away = async (pick) => {
const outside = document.elementFromPoint(2, innerHeight - 2);
const rect = box.getBoundingClientRect();
const [, x, y] = [[rect.left, rect.left / 2, innerHeight / 2], [innerWidth - rect.right, (rect.right + innerWidth) / 2, innerHeight / 2], [rect.top, innerWidth / 2, rect.top / 2], [innerHeight - rect.bottom, innerWidth / 2, (rect.bottom + innerHeight) / 2]].sort((a, b) => b[0] - a[0])[0];
const outside = (await until(() => document.elementFromPoint(x, y) === dialog && dialog, 3000)) || document.elementFromPoint(x, y);
click(outside);
await sleep(250);
return {...look(pick()), open: dialog.open, outside: outside === dialog};