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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

torque/forge:torque/12081-the-repository-head-page-s-390x844-chrom → main 2 commits fork 1 thread · 1 unresolved

  • Merged. torque/12081-the-repository-head-page-s-390x844-chrom was merged into main as 94e4d44.

Review

Sign in to review this change.
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
123123 .slice(0, 12).map((el) => name(el) + " " + Math.round(el.getBoundingClientRect().width) + "px");
124124 return JSON.stringify({ scrollWidth: document.documentElement.scrollWidth, viewportWidth: vw, wide });
125125 })()`;
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)}`);
outdated

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.

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 }
130133 }, 30_000);
131134 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs