From 91ffe54294cf588452ef26c15b6ad0dca0304232 Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 31 Oct 2026 10:34:33 +0800 Subject: [PATCH] gui: account-models' still-row check waits for the dialog's soft refresh A click that redraws the editor gives its dialog the swap class, whose content-in animation starts 2px low. WebKit (on the WSL box) can hold that animation at currentTime 0 past the test's 200ms wait, so the row measured 2px down: "row moved 81 !== 79". Probed: the dialog's transform was matrix(1,0,0,1,0,2) with content-in running@0. It now waits for the dialog's animations to finish before measuring. On origin/main 03f3e1528 the key case failed 2 of 2 WebKit runs and the Codex case 1 of 8; with the refresh on each account row (the commit before) the Codex case failed about 5 of 8. After: WebKit 60/60 over five runs, Chromium 12/12, on wsl-run (mote's WebKit is broken, #4125). --- internal/gui/tests/account-models.test.cjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/gui/tests/account-models.test.cjs b/internal/gui/tests/account-models.test.cjs index 39de34dd4..a49591820 100644 --- a/internal/gui/tests/account-models.test.cjs +++ b/internal/gui/tests/account-models.test.cjs @@ -121,6 +121,8 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", const before = await row(page, id).evaluate((e) => Math.round(e.getBoundingClientRect().top)), sc = await scrolled(page); await b.click(); await page.waitForTimeout(200); + // the redraw's soft refresh starts 2px low; WebKit can hold it there past 200ms + await page.evaluate(() => Promise.all(document.querySelector("#modal .dialog").getAnimations().map((a) => a.finished))); assert.equal(await row(page, id).evaluate((e) => Math.round(e.getBoundingClientRect().top)), before, `${id}'s row moved`); assert.equal(await scrolled(page), sc, "a click scrolled"); };