From 42102cf9d214562cb46adc269203eb362c28a96c Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 13 Nov 2026 23:23:51 +0000 Subject: [PATCH] test(e2e): click outside the popup where the dialog takes the hit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/e2e/test_orchestrator_e2e.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e/test_orchestrator_e2e.py b/tests/e2e/test_orchestrator_e2e.py index 83dfd32..a78915b 100644 --- a/tests/e2e/test_orchestrator_e2e.py +++ b/tests/e2e/test_orchestrator_e2e.py @@ -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};