commit d5fe1b33053b59173e1739546a17e94194ee252b
parent 61748ae16daf20881a12374df857d8310ce4b5e6
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 29 Sep 2026 22:52:37 -0400
homepage: e2e reads the Vermilion site's rust off its /stats/ line (review L2)
The growth chart folds the fixture's sixth site into Other, so
`instance-colours.spec.ts` no longer compared `chart[5]` with itself: a new
test reads every site line's rendered stroke on /stats/, on both bases,
against each site's chart colour in the summary's order, the sixth the rust
and within 25° of Vermilion's hue.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat:
1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/homepage/e2e/instance-colours.spec.ts b/homepage/e2e/instance-colours.spec.ts
@@ -139,11 +139,35 @@ test("each instance card wears its site's accent on every base, in its chart lay
}
// Site 5: Vermilion, the sixth slot's family — its chart colour is the
- // rust, not the golden angle's hue 328 beside the magenta slot (it is in
- // Other on the growth chart; /stats draws it in this colour).
+ // rust (chart[5], asserted above), not the golden angle's hue 328 beside
+ // the magenta slot. It is in Other on the growth chart; the test below
+ // reads the rust off its line on /stats/.
expect(stripes[5]).toBe(await resolve(page, ACCENTS.vermilion[on[base]]));
- const rust = await resolve(page, chart[5]);
- expect(rust).toBe(await resolve(page, "var(--chart-6)"));
- expect(hueGap(stripes[5], rust), "vermilion vs its chart colour").toBeLessThan(25);
+ expect(hueGap(stripes[5], await resolve(page, chart[5])), "vermilion vs its chart colour").toBeLessThan(25);
+ }
+});
+
+// The growth chart folds site 5 into Other, so the rust is checked where it is
+// still drawn: /stats/' site lines (homepageChartData, one line per site in the
+// summary's order, each in its siteChartColors colour).
+test("on /stats/ each site's line wears its chart colour: the Vermilion site's is the rust", async ({
+ page,
+}) => {
+ const sites = fixtureSites();
+ const chart = siteChartColors(sites);
+ await page.goto("/stats/");
+ for (const base of ["dark", "light"] as const) {
+ await useBase(page, base);
+ const lines = page.locator(".recharts-line-curve");
+ await expect(lines).toHaveCount(sites.length);
+ const strokes = await lines.evaluateAll((els) => els.map((el) => getComputedStyle(el).stroke));
+ const want = [];
+ for (const c of chart) want.push(await resolve(page, c));
+ expect(strokes, base).toEqual(want);
+ expect(strokes[5], `${base}: the Vermilion site's line`).toBe(await resolve(page, "var(--chart-6)"));
+ expect(
+ hueGap(strokes[5], await resolve(page, ACCENTS.vermilion[base === "dark" ? "onDark" : "onLight"])),
+ "vermilion vs its line",
+ ).toBeLessThan(25);
}
});