test(dashboard): pin the hero band without the broad Insights CTA

The scoreDrop/briefing specs asserted the removed overview-only button;
they now pin its absence, and the orphaned action key leaves all six
locale bundles (the reverse-coverage guard flagged it).
This commit is contained in:
Marc-André Bombeck committed 2026-07-05 16:06:08 +02:00
1 parent 2d73e70dd4
commit 88b3eaee8b
7 files changed
+14 -18

No files matched your search

+1 -2
View File
@@ -324,8 +324,7 @@
"viewBp": "Blutdruck ansehen",
"viewWeight": "Gewicht ansehen",
"viewSleep": "Schlaf ansehen",
"logMeasurement": "Messung erfassen",
"viewInsights": "Insights öffnen"
"logMeasurement": "Messung erfassen"
},
"briefing": {
"title": "Tagesbriefing",
+1 -2
View File
@@ -324,8 +324,7 @@
"viewBp": "View blood pressure",
"viewWeight": "View weight",
"viewSleep": "View sleep",
"logMeasurement": "Log measurement",
"viewInsights": "Open Insights"
"logMeasurement": "Log measurement"
},
"briefing": {
"title": "Today’s briefing",
+1 -2
View File
@@ -324,8 +324,7 @@
"viewBp": "Ver tensión arterial",
"viewWeight": "Ver peso",
"viewSleep": "Ver sueño",
"logMeasurement": "Registrar medición",
"viewInsights": "Abrir Insights"
"logMeasurement": "Registrar medición"
},
"briefing": {
"title": "Resumen de hoy",
+1 -2
View File
@@ -324,8 +324,7 @@
"viewBp": "Voir la tension",
"viewWeight": "Voir le poids",
"viewSleep": "Voir le sommeil",
"logMeasurement": "Saisir une mesure",
"viewInsights": "Ouvrir Insights"
"logMeasurement": "Saisir une mesure"
},
"briefing": {
"title": "Briefing du jour",
+1 -2
View File
@@ -324,8 +324,7 @@
"viewBp": "Vedi pressione",
"viewWeight": "Vedi peso",
"viewSleep": "Vedi sonno",
"logMeasurement": "Registra misurazione",
"viewInsights": "Apri Insights"
"logMeasurement": "Registra misurazione"
},
"briefing": {
"title": "Briefing di oggi",
+1 -2
View File
@@ -324,8 +324,7 @@
"viewBp": "Zobacz ciśnienie",
"viewWeight": "Zobacz wagę",
"viewSleep": "Zobacz sen",
"logMeasurement": "Zapisz pomiar",
"viewInsights": "Otwórz Insights"
"logMeasurement": "Zapisz pomiar"
},
"briefing": {
"title": "Briefing dnia",
@@ -302,7 +302,7 @@ describe("<DashboardHero> — verdict variants", () => {
expect(html).toMatch(/<button[^>]*data-slot="dashboard-hero-cta"/);
});
it("scoreDrop: point delta + link to /insights", () => {
it("scoreDrop: point delta, no broad Insights CTA", () => {
const html = render(
baseSnapshot({
healthScore: { score: 58, band: "yellow", delta: -14 },
@@ -310,11 +310,13 @@ describe("<DashboardHero> — verdict variants", () => {
);
expect(html).toContain('data-verdict-variant="scoreDrop"');
expect(html).toContain("liegt 14 Punkte unter der Vorwoche.");
expect(html).toContain('href="/insights"');
expect(html).toContain("Insights öffnen");
// v1.27.7 — the overview-only CTA left the band; the health-score
// card carries the Insights link. Only specific-action verdicts
// keep a button.
expect(html).not.toContain('data-slot="dashboard-hero-cta"');
});
it("briefing: renders the model headline verbatim as plain text + Insights link", () => {
it("briefing: renders the model headline verbatim as plain text, no broad CTA", () => {
const headline = "Systolic crept up over seven days.";
const html = render(
baseSnapshot({
@@ -338,8 +340,8 @@ describe("<DashboardHero> — verdict variants", () => {
);
expect(html).toContain('data-verdict-variant="briefing"');
expect(html).toContain(headline);
expect(html).toContain('href="/insights"');
expect(html).toContain("Insights öffnen");
// v1.27.7 — same rule as scoreDrop: no broad Insights CTA.
expect(html).not.toContain('data-slot="dashboard-hero-cta"');
});
it("allQuiet: sentence with NO CTA in the band", () => {