test(ui): sharpen the page-title and empty-state guards

The H1 guard matched the raw text, so seven files sat on its allowlist
only for mentioning an H1 in a comment; it strips comments first now and
the entries are gone. The empty-state ratchet counted against a ceiling,
which let a new copy in wherever an old one left, and missed the no...Yet
keys: it freezes the remaining sites by file and key, recognises no...Yet
and nothing... keys, and the two it missed (the insight status card and
the screener card) render EmptyState.
This commit is contained in:
Marc-André Bombeck committed 2026-10-20 16:45:11 +02:00
1 parent 7ed953a029
commit c8649faddf
4 files changed
+68 -44

No files matched your search

@@ -2,6 +2,7 @@
import { Card, CardContent, CardHeader } from "@/components/ui/card";
import { Skeleton } from "@/components/ui/skeleton";
import { EmptyState } from "@/components/ui/empty-state";
import { TileHeader } from "@/components/insights/tile-header";
import {
useTranslations,
@@ -228,9 +229,11 @@ export function InsightStatusCard({
<TileHeader icon={nodeIcon(icon)} title={title} />
</CardHeader>
<CardContent>
<p className="text-muted-foreground text-sm">
{t("insights.noAnalysisYet")}
</p>
<EmptyState
variant="plain"
size="compact"
title={t("insights.noAnalysisYet")}
/>
</CardContent>
</Card>
);
@@ -30,6 +30,7 @@
* sibling of the detail-open button (never nested inside it) so the two
* actions never collide.
*/
import { EmptyState } from "@/components/ui/empty-state";
import { Info } from "lucide-react";
import { Button } from "@/components/ui/button";
@@ -170,9 +171,12 @@ export function InstrumentCard({
</div>
</div>
) : (
<div className="text-muted-foreground flex min-h-[2.75rem] items-center px-4 text-sm md:px-6">
{t("mentalHealth.noResultYet")}
</div>
<EmptyState
variant="plain"
size="compact"
className="px-4 md:px-6"
title={t("mentalHealth.noResultYet")}
/>
)}
{/* Bottom-pinned single primary action — the med-/Vorsorge card slot.