mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(frontend-test): update renders empty dashboard assertion for 7 zero-cost cards
The PR added 5 new cost summary cards (Avg Cost, P50, P75, P95, P99) that also display \$0.0000 when empty, so the test assertion needed to change from 2 to 7 matching elements.
This commit is contained in:
@@ -134,9 +134,12 @@ describe("PlatformCostContent", () => {
|
||||
await waitFor(() =>
|
||||
expect(document.querySelector(".animate-pulse")).toBeNull(),
|
||||
);
|
||||
// Verify the two summary cards that show $0.0000 — Known Cost and Estimated Total
|
||||
// Known Cost and Estimated Total cards render $0.0000
|
||||
expect(screen.getByText("Known Cost")).toBeDefined();
|
||||
expect(screen.getByText("Estimated Total")).toBeDefined();
|
||||
// All cost summary cards (Known Cost, Estimated Total, Avg Cost, P50/P75/P95/P99) show $0.0000
|
||||
const zeroCostItems = screen.getAllByText("$0.0000");
|
||||
expect(zeroCostItems.length).toBe(2);
|
||||
expect(zeroCostItems.length).toBe(7);
|
||||
expect(screen.getByText("No cost data yet")).toBeDefined();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user