test: account for the WHOOP card + narrative route in inventory tests

This commit is contained in:
Marc-André Bombeck committed 2026-06-04 04:48:41 +02:00
1 parent 65c7012590
commit 37cec93d28
2 files changed
+7 -4

No files matched your search

@@ -51,6 +51,9 @@ const NON_COACH_GATED_ROUTES: ReadonlyArray<string> = [
// same `insightStatus` sub-flag as the seven specialised status routes.
"src/app/api/insights/metric-status/route.ts",
"src/app/api/insights/mood-status/route.ts",
// v1.11.0 — period-narrative read route. Gates on the same `insightStatus`
// sub-flag as the assessment routes (no Coach prose).
"src/app/api/insights/narrative/route.ts",
// v1.9.0 — on-demand full assessment warm. Warms the same assessment
// cards the status routes serve, so it gates on `insightStatus`, not
// `coach`: a user with assessments enabled but Coach disabled can warm.
@@ -163,8 +163,8 @@ describe("IntegrationsSection — single-status-display contract (A5)", () => {
});
const html = render();
// Exactly one pill per card → 2 pills total.
expect(count(html, 'data-testid="integration-status-pill"')).toBe(2);
// Exactly one pill per card → 3 pills total (Withings, moodLog, WHOOP).
expect(count(html, 'data-testid="integration-status-pill"')).toBe(3);
// The redundant banner from v1.4.15 is gone.
expect(html).not.toContain('data-testid="integration-status-banner"');
// Card-body "letzter Sync" repetition is gone — no
@@ -353,8 +353,8 @@ describe("IntegrationsSection — single-status-display contract (A5)", () => {
});
const html = render();
// Both cards include the section divider data-testid so the
// Every integration card includes the section divider data-testid so the
// header → body separation is visually consistent.
expect(count(html, 'data-testid="integration-card-divider"')).toBe(2);
expect(count(html, 'data-testid="integration-card-divider"')).toBe(3);
});
});