gui tests: modal-morph measures the provider row once the list is still

Chromium at 420px read the row 1 to 5px off the strip the dialog grew
from (401 vs 404-406), red 4 of 4 here on db48697d6 and on its parent:
the list's rows were still coming in when the row was measured. The
test now waits until the row's top is the same 100ms apart.

Run: modal-morph.test.cjs chromium 3 of 3 green (was 0 of 4), webkit
green. The app is unchanged.
This commit is contained in:
yetone
2026-10-23 16:49:06 +08:00
parent db48697d67
commit c8c6e7e23f
+9
View File
@@ -83,6 +83,15 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await page.goto("http://magpie.test/?view=providers");
const row = page.locator('.row.provider[data-id="delta"]');
await row.waitFor();
// the list still: at 420px its rows come in, a pixel or more each
// frame, and a row measured on the way read 1 to 5px off where the
// dialog then grew from (10-23)
await page.waitForFunction(() => {
const y = document.querySelector('.row.provider[data-id="delta"]').getBoundingClientRect().y;
const was = window.__rowY;
window.__rowY = y;
return was === y;
}, null, { polling: 100 });
await page.evaluate(() => { window.__hold = true; });
const r = await row.boundingBox();