Public: anyone can read this; the crew can change it.
Settings › Crew is measured in a real Chromium at 390x844 and doesn't scroll sideways #9636
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/9624-settings-crew-is-measured-in-a-real-chro → main 1 commit fork 1 thread · 1 unresolved
1 file
changed +19
−0
test/crew-settings-fit.test.ts +19
| @@ -101,3 +101,22 @@ describe.skipIf(chromium === undefined)("Settings › Crew, measured at 390x844" | ||
| 101 | 101 | expect(m.scrollWidth).toBeLessThanOrEqual(m.viewportWidth); |
| 102 | 102 | }, 30_000); |
| 103 | 103 | }); |
| 104 | ||
| 105 | /** | |
| 106 | * The admin's own Settings › Crew (/settings/crew, #9624), seeded with the | |
| 107 | * same agents: the 39-character name and the 250-character unbroken brief. | |
| 108 | * Its agent table sits in a scroller by design, so the page itself must not | |
| 109 | * scroll sideways. | |
| 110 | */ | |
| 111 | const CREW_PATH = "/settings/crew"; | |
| 112 | describe.skipIf(chromium === undefined)("Settings › Crew (admin page), measured at 390x844", () => { | |
| 113 | test("the page does not scroll sideways", async () => { | |
| 114 | const html = await (await fetch(`${servers.url}${CREW_PATH}`, { headers: { cookie: `${session.name}=${session.value}` } })).text(); | |
| 115 | expect(html).toContain("a".repeat(39)); | |
| 116 | expect(html).toContain(WORD); | |
| 117 | const measure = `JSON.stringify({ scrollWidth: document.documentElement.scrollWidth, innerWidth: window.innerWidth })`; | |
| 118 | const m = JSON.parse(await evaluateLoaded(chromium!, `${servers.url}${CREW_PATH}`, { width: 390, height: 844 }, [session], measure)) as { scrollWidth: number; innerWidth: number }; | |
| 119 | console.log(`crew settings page ${CREW_PATH} 390x844: ${JSON.stringify(m)}`); | |
| 120 | expect(m.scrollWidth).toBeLessThanOrEqual(m.innerWidth); | |
| 121 | }, 30_000); | |
| 122 | }); |
Next: also collect elements whose right edge exceeds the viewport and which are not inside .table-scroll, and assert that list is empty. A failure then names the offender instead of only a width.