test(frontend): cover all 6 states in ClaimDrawerHeader badge variant matrix
The parametrized variant test only exercised 4 of the 6 mapped states (submitted/denied/paid/pending). Add accepted (-> default) and matched (-> success) so the entire STATE_VARIANT map is verified, not just the branches whose tokens happened to be easy to reach.
This commit is contained in:
@@ -154,9 +154,12 @@ describe("ClaimDrawerHeader", () => {
|
||||
}> = [
|
||||
// secondary → bg-muted text-muted-foreground
|
||||
{ state: "submitted", stateLabel: "Submitted", expectedToken: "bg-muted text-muted-foreground" },
|
||||
// default → bg-primary/15 text-primary
|
||||
{ state: "accepted", stateLabel: "Accepted", expectedToken: "bg-primary/15" },
|
||||
// destructive → bg-destructive/15
|
||||
{ state: "denied", stateLabel: "Denied", expectedToken: "bg-destructive/15" },
|
||||
// success → bg-[hsl(var(--success)/0.15)]
|
||||
// success → bg-[hsl(var(--success)/0.15)] (covered by both matched and paid)
|
||||
{ state: "matched", stateLabel: "Matched", expectedToken: "bg-[hsl(var(--success)/0.15)]" },
|
||||
{ state: "paid", stateLabel: "Paid", expectedToken: "bg-[hsl(var(--success)/0.15)]" },
|
||||
// warning → bg-[hsl(var(--warning)/0.15)]
|
||||
{ state: "pending", stateLabel: "Pending", expectedToken: "bg-[hsl(var(--warning)/0.15)]" },
|
||||
|
||||
Reference in New Issue
Block a user