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 <noreply@paperclip.ing>
This commit was merged in pull request #261.
This commit is contained in:
groombook-engineer[bot]
2026-04-11 16:38:51 +00:00
committed by GitHub
parent 24a032dd9d
commit 9a0a63d1df
+4 -1
View File
@@ -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: [] });
});
});