1 Commits
Author SHA1 Message Date
sneak 07cc65e889 test: wait until the page shows a screen, not only until it lays out (closes #502)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s
The browser suites' wait for a screen passed as soon as the element laid
out. Until the page's stylesheet has applied, every view lays out, so an
approval test could read the prompt before the page's script had filled
it. visible() in the Chrome harness and waitVisible() in the Firefox
driver now also wait for the page to finish loading and for neither the
element nor anything around it to carry the hidden class that showView()
keeps on every view but the current one. No caller changed.

Model: opus-5-5
2026-10-08 07:22:57 +00:00
2 changed files with 0 additions and 2 deletions
-1
View File
@@ -290,7 +290,6 @@ class Driver {
`const el = document.querySelector(arguments[0]); `const el = document.querySelector(arguments[0]);
if (document.readyState !== "complete" || !el) return false; if (document.readyState !== "complete" || !el) return false;
if (el.closest(".hidden")) return false; if (el.closest(".hidden")) return false;
if (getComputedStyle(el).visibility !== "visible") return false;
const r = el.getBoundingClientRect(); const r = el.getBoundingClientRect();
return r.width > 0 && r.height > 0;`, return r.width > 0 && r.height > 0;`,
[selector], [selector],
-1
View File
@@ -348,7 +348,6 @@ async function visible(page, selector, timeout = 15000) {
const el = document.querySelector(sel); const el = document.querySelector(sel);
if (document.readyState !== "complete" || !el) return false; if (document.readyState !== "complete" || !el) return false;
if (el.closest(".hidden")) return false; if (el.closest(".hidden")) return false;
if (getComputedStyle(el).visibility !== "visible") return false;
const r = el.getBoundingClientRect(); const r = el.getBoundingClientRect();
return r.width > 0 && r.height > 0; return r.width > 0 && r.height > 0;
}, },