From 6fc9c99009a0db27401cec2fc571c37a7498a2fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 17 May 2026 14:27:13 +0200 Subject: [PATCH] test(insights): pin HealthScoreCard full-height contract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a render assertion that the inner column ships with grid + flex-1 + grid-rows-[auto_auto_auto_auto_auto_1fr_auto] so a future refactor can't silently revert to a flex stack and re-introduce the v1.4.36 "Karte hört bei der Trennlinie auf" report. The mt-auto + h-full + flex-col + flex assertions stay in place alongside the new grid contract — they describe complementary load-bearing classes. --- .../__tests__/health-score-card.test.tsx | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/components/insights/__tests__/health-score-card.test.tsx b/src/components/insights/__tests__/health-score-card.test.tsx index 799f9d185..25209ebe4 100644 --- a/src/components/insights/__tests__/health-score-card.test.tsx +++ b/src/components/insights/__tests__/health-score-card.test.tsx @@ -328,6 +328,36 @@ describe("", () => { expect(disclaimerOpen?.[0]).toContain("mt-auto"); }); + // v1.4.37 W4a item 1 — the inner column switched from `flex + // flex-col gap-3` to a 7-row grid so the slack collects on row 6 + // (the provenance accordion) instead of clumping under the + // disclaimer. Pin both the grid switch and the `1fr` slack row so + // a future refactor can't silently revert to flex and re-introduce + // the "Karte hört bei der Trennlinie auf" Marc-reported bug. + it("uses a 7-row grid on the inner column so slack distributes on the accordion row", () => { + const html = ssr( + , + ); + // The inner column lives directly after the card wrapper. Match + // the first
that opens after the wrapper and assert the + // grid + grid-rows-[...1fr...] contract. + const innerColumn = html.match( + /]*data-slot="health-score-card"[^>]*>\s*(?:\s*)?]*)>/, + ); + expect(innerColumn).not.toBeNull(); + const innerAttrs = innerColumn?.[1] ?? ""; + expect(innerAttrs).toContain("grid"); + expect(innerAttrs).toContain("flex-1"); + expect(innerAttrs).toContain( + "grid-rows-[auto_auto_auto_auto_auto_1fr_auto]", + ); + }); + it("exposes the progressbar role + ARIA values for screen readers", () => { const html = ssr(