From 9a0a63d1df8c81be940d37db8ae2d9e53a9af7ff Mon Sep 17 00:00:00 2001 From: "groombook-engineer[bot]" <269742240+groombook-engineer[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 16:38:51 +0000 Subject: [PATCH] fix(gro-558): add paginated mock for /api/invoices (#261) fix(e2e): add paginated mock for /api/invoices in navigation.spec.ts Fixes GRO-557. The generic E2E API mock returned [] for /api/invoices, but the InvoicesPage component expects { data: [], total: 0 }. This crashed React and prevented the page from rendering, causing the admin invoices test to fail consistently. Co-Authored-By: Paperclip --- apps/e2e/tests/navigation.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/e2e/tests/navigation.spec.ts b/apps/e2e/tests/navigation.spec.ts index 8221ede..8ba228c 100644 --- a/apps/e2e/tests/navigation.spec.ts +++ b/apps/e2e/tests/navigation.spec.ts @@ -44,7 +44,10 @@ test.beforeEach(async ({ page }) => { json: { newClients: [], activeInPeriodCount: 0, churnRisk: [], churnRiskTotal: 0 }, }); } - // Appointments, clients, services, staff, invoices, book, etc. + if (url.includes("/api/invoices")) { + return route.fulfill({ json: { data: [], total: 0 } }); + } + // Appointments, clients, services, staff, book, etc. return route.fulfill({ json: [] }); }); });