diff --git a/src/components/insights/__tests__/health-score-card-provenance.test.tsx b/src/components/insights/__tests__/health-score-card-provenance.test.tsx index a7c2fc948..d65d364cf 100644 --- a/src/components/insights/__tests__/health-score-card-provenance.test.tsx +++ b/src/components/insights/__tests__/health-score-card-provenance.test.tsx @@ -116,9 +116,13 @@ describe(" — provenance accordion (W8e)", () => { ); expect(controlsMatch).not.toBeNull(); const id = controlsMatch![1]; - expect(html).toContain( - `id="${id}" data-slot="health-score-card-provenance-panel"`, + // The panel section must carry the same id; we don't pin the exact + // attribute order because additional ARIA attributes (e.g. + // `aria-labelledby`) may sit between `id` and `data-slot`. + const panelMatch = html.match( + new RegExp(`]*\\bid="${id}"[^>]*data-slot="health-score-card-provenance-panel"`), ); + expect(panelMatch).not.toBeNull(); }); it("sorts rows by effective weight descending (null components sink to bottom)", () => { diff --git a/src/components/insights/health-score-card.tsx b/src/components/insights/health-score-card.tsx index 717b18745..09cef90e0 100644 --- a/src/components/insights/health-score-card.tsx +++ b/src/components/insights/health-score-card.tsx @@ -385,6 +385,7 @@ export function HealthScoreCard({