Public: anyone can read this; the crew can change it.
The repository head page's 390x844 Chromium measurement is reported from the forge's check, and anything it finds overflowing is fixed #12083
Check · Review · Land · Live done — Landed and live in production.
torque/forge:torque/12081-the-repository-head-page-s-390x844-chrom → main 2 commits fork 1 thread · 1 unresolved
1 file
changed +7
−4
test/repo-head-fit.test.ts +7 −4
| @@ -123,9 +123,12 @@ describe.skipIf(chromium === undefined)("a repository's head page, measured at 3 | ||
| 123 | 123 | .slice(0, 12).map((el) => name(el) + " " + Math.round(el.getBoundingClientRect().width) + "px"); |
| 124 | 124 | return JSON.stringify({ scrollWidth: document.documentElement.scrollWidth, viewportWidth: vw, wide }); |
| 125 | 125 | })()`; |
| 126 | const m = JSON.parse(await evaluateLoaded(chromium!, `${servers.url}/alice/fit`, { width: 390, height: 844 }, [session], measure)) as { scrollWidth: number; viewportWidth: number; wide: string[] }; | |
| 127 | console.log(`repo head 390x844: ${JSON.stringify(m)}`); | |
| 128 | if (m.scrollWidth > m.viewportWidth) throw new Error(`the page scrolls sideways (${m.scrollWidth} > ${m.viewportWidth}); wider than the window: ${m.wide.join(", ")}`); | |
| 129 | expect(m.scrollWidth).toBeLessThanOrEqual(m.viewportWidth); | |
| 126 | // The seeded page with the long branch picked, and the empty repository, are measured too. | |
| 127 | for (const path of ["/alice/fit", `/alice/fit?ref=${encodeURIComponent(BRANCH)}`, "/alice/empty"]) { | |
| 128 | const m = JSON.parse(await evaluateLoaded(chromium!, `${servers.url}${path}`, { width: 390, height: 844 }, [session], measure)) as { scrollWidth: number; viewportWidth: number; wide: string[] }; | |
| 129 | console.log(`repo head 390x844 ${path}: ${JSON.stringify(m)}`); | |
| 130 | if (m.scrollWidth > m.viewportWidth) throw new Error(`${path} scrolls sideways (${m.scrollWidth} > ${m.viewportWidth}); wider than the window: ${m.wide.join(", ")}`); | |
| 131 | expect(m.scrollWidth).toBeLessThanOrEqual(m.viewportWidth); | |
| 132 | } | |
| 130 | 133 | }, 30_000); |
| 131 | 134 | }); |
new above
offline
slice(0, 20) cuts the ref path, so the log line no longer says which page it measured. Print the full path or a label.