test(frontend): fix null-user dash assertion using getAllByText to handle multiple matches

This commit is contained in:
Zamil Majdy
2026-04-07 21:31:43 +07:00
parent 1c3fe1444e
commit 22fb3549e3

View File

@@ -421,5 +421,9 @@ describe("PlatformCostContent", () => {
);
expect(screen.getByText("copilot:SDK")).toBeDefined();
expect(screen.getByText("anthropic")).toBeDefined();
// null email + null user_id renders as "-" in the User column; multiple
// other cells (tokens, duration, session) also render "-", so use
// getAllByText to avoid the single-match constraint.
expect(screen.getAllByText("-").length).toBeGreaterThan(0);
});
});