From 3f7e52bbb7555fff2ec47e95e312014e930ba403 Mon Sep 17 00:00:00 2001 From: yetone Date: Sun, 15 Nov 2026 14:55:22 +0800 Subject: [PATCH] gui tests: usage-fold wheels a fold above Scroll to top's floater (#6003) "several accounts: one in full, the others in brief" was red in WebKit (en and zh) since d5dc8eecc (11-02) added the Scroll to top / bottom floater: wheelTo stopped once the fold was above the 300px window's foot, and at that height the floater, shown once the page scrolls, sat over Codex's second fold, so the click was caught by .ve-up ("intercepts pointer events", 11 retries). It now stops above the floater's top, as a reader clicks what isn't under it. Run on mica at origin/main 60ebaea03 plus this file: the "several accounts" tests, chromium and webkit, en and zh: 4 of 4 (before: both webkit red). The "17 subscriptions" reds of the same issue are another cause, still open on #6003. --- internal/gui/tests/usage-fold.test.cjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/gui/tests/usage-fold.test.cjs b/internal/gui/tests/usage-fold.test.cjs index beb3b01b5..9d595e8e6 100644 --- a/internal/gui/tests/usage-fold.test.cjs +++ b/internal/gui/tests/usage-fold.test.cjs @@ -126,11 +126,14 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", const two = acct("codex", "two@example.com"); // wheeled to, as a reader would (the page holds still for a script's // scroll): packed into columns (#860), Codex's card is under ZCode's, - // past this short window's foot + // past this short window's foot. It stops above Scroll to top's + // floater, which shows once the page scrolls (d5dc8eecc), as a reader + // clicks what isn't under it (it caught WebKit's click, #6003) const wheelTo = async (l) => { for (let i = 0; i < 20; i++) { const y = (await l.boundingBox()).y; - if (y > 60 && y + 40 < 300) break; + const foot = await page.evaluate(() => document.querySelector(".view-ends.on")?.getBoundingClientRect().top ?? innerHeight); + if (y > 60 && y + 40 < foot) break; await page.mouse.wheel(0, y > 60 ? 60 : -60); await page.waitForTimeout(150); }