From 82a36a35c74736595cce549b8805cb066bfbef2b Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 7 Oct 2026 04:30:23 +0800 Subject: [PATCH] =?UTF-8?q?click-scroll=20test:=20Live=20and=20a=20day,=20?= =?UTF-8?q?and=20the=20room=20kept=20for=20a=20click,=20are=20checked=20wh?= =?UTF-8?q?ere=20the=20accounts=20sit=20beside=20the=20requests=20(1440px)?= =?UTF-8?q?=20=E2=80=94=20red=20on=20main=20since=205d871723=20(#860)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- internal/gui/tests/click-scroll.test.cjs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/internal/gui/tests/click-scroll.test.cjs b/internal/gui/tests/click-scroll.test.cjs index 795a6f14..e6e7e2e0 100644 --- a/internal/gui/tests/click-scroll.test.cjs +++ b/internal/gui/tests/click-scroll.test.cjs @@ -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);