From 95be6bb75f6128318619c450f0584696a5ba888e Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 22 Oct 2026 23:09:25 +0800 Subject: [PATCH] gui tests: usage-alert reaches the currency row before clicking it Since 46176fc14 (v0.1.1320) settings rows are ~12px taller, and the test's own wheel loop stopped once the currency row's top was 60px down, which left it under the window's foot at times: Playwright's click then scrolled to it, and "the currency click moved nothing" read 240 for 180 under load (full GUI run at load ~150; base 2 of 2 green). It now reach()es the row, as the alert clicks above it already do. Run: usage-alert.test.cjs (chromium + webkit, every language) 9 of 9 green after the change at load 90-180, 1 red before it of 3. Not changed: side-effort's chromium de 420 moved 1px once in the full run; alone 3 of 3 green on this tree, not reproduced. --- internal/gui/tests/usage-alert.test.cjs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/gui/tests/usage-alert.test.cjs b/internal/gui/tests/usage-alert.test.cjs index ccedd1b70..ab815efad 100644 --- a/internal/gui/tests/usage-alert.test.cjs +++ b/internal/gui/tests/usage-alert.test.cjs @@ -185,12 +185,9 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", // row is wheeled into view, as a reader would, before its click. assert.equal(await view(page), before, "no alert click moved the page"); const cny = page.locator("#currencySegs .opt", { hasText: w.cny }); - for (let i = 0; i < 40; i++) { - const box = await cny.boundingBox(); - if (box && box.y >= 60) break; - await page.mouse.wheel(0, -60); - await page.waitForTimeout(30); - } + // wholly in sight and under nothing, or the click's own scroll to it + // reads as the page moving (10-22, taller rows) + await reach(page, cny); const atCurrency = await view(page); await cny.click(); const c = await posted(5);