click-scroll test: Live and a day, and the room kept for a click, are checked where the accounts sit beside the requests (1440px) — red on main since 5d871723 (#860)

5d871723 moved the Routing page's two columns from an 860px to a 1150px
Routing area. At the test's 1100px window the accounts now go below the
requests, so scrolling the view to its end takes the date bar out of sight
first, and "Live and a day, picked in turn, stay under the pointer" and
"the room kept for a click goes as the reader scrolls back" failed in
Chromium and WebKit on every run ("what's clicked must be in sight").
b2345078 and 76d82528 shipped saying they fail the same on origin/main.
Those two subtests open the page at 1440px, the layout they were written
for; the rest stay at 1100, one column, as before.

Verified: git bisect (69665a69 good) names 5d871723; the file fails 2 of 9
per engine on origin/main and passes 18 of 18 three runs in a row with
this change (Playwright 1.63, Chromium and WebKit).
This commit is contained in:
yetone committed 2026-10-07 04:30:26 +08:00
1 parent 780b3fa3da
commit 82a36a35c7
1 file changed
+8 -3
+8 -3
View File
@@ -66,7 +66,12 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
}
await browser.close();
});
async function reset() {
// wide: the accounts sit beside the requests (a Routing area of 1150px
// or more, 5d871723), so the view ends with the date bar still in sight
// and Live, with none, leaves the page shorter; narrower, the accounts
// go below and the bar scrolls away first
async function reset(width = 1100) {
await page.setViewportSize({ width, height: 640 });
await page.goto("http://magpie.test/?view=routing");
await dayButtons.nth(1).waitFor();
}
@@ -98,7 +103,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
});
await t.test("Live and a day, picked in turn, stay under the pointer", async () => {
await reset();
await reset(1440);
await dayButtons.nth(1).click(); // the day's requests, the list full
await settle(page);
// down to the list's end: Live, with none, leaves the page shorter
@@ -221,7 +226,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
});
await t.test("the room kept for a click goes as the reader scrolls back", async () => {
await reset();
await reset(1440);
await dayButtons.nth(1).click();
await settle(page);
await scrollTo(".rt-days", 0);