fix(e2e): adopt HeroStrip data-slot on insights advisor spec

v1.4.20 B1 retired `<InsightsPageHero>` in favour of the condensed
`<HeroStrip>` component, which exposes `data-slot="insights-hero-strip"`
instead of the legacy `insights-page-hero` marker. Update the advisor-
card spec selector so the hero check hits the live element on /insights.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc-André BombeckandClaude Opus 4.7 committed 2026-05-10 19:48:59 +02:00
1 parent 995528801c
commit 32cd18566d
1 file changed
+9 -5
+9 -5
View File
@@ -215,11 +215,15 @@ test.describe("insights advisor card on /insights (C1)", () => {
}) => {
await page.goto("/insights", { waitUntil: "domcontentloaded" });
// Hero + advisor card both render. The hero is from B1b; the
// advisor card is the C1 deliverable.
await expect(page.locator('[data-slot="insights-page-hero"]')).toBeVisible({
timeout: 10_000,
});
// Hero + advisor card both render. v1.4.20 B1 replaced the legacy
// `<InsightsPageHero>` (data-slot="insights-page-hero") with the
// condensed `<HeroStrip>` (data-slot="insights-hero-strip"); the
// advisor card is the C1 deliverable below it.
await expect(page.locator('[data-slot="insights-hero-strip"]')).toBeVisible(
{
timeout: 10_000,
},
);
// The recommendation card surface from B5c — `data-slot` markers
// are pinned in tests, look for the rec text the mock provided.