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).
This commit is contained in:
yetone
2026-10-31 10:40:12 +08:00
parent 923812362a
commit 91ffe54294
@@ -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");
};