fix(e2e): mock /api/invoices/stats/summary to prevent Invoices page crash #345

Merged
the-dogfather-cto[bot] merged 1 commits from fix/gro-816-e2e-invoices into dev 2026-04-20 13:59:11 +00:00
+10
View File
@@ -44,6 +44,16 @@ test.beforeEach(async ({ page }) => {
json: { newClients: [], activeInPeriodCount: 0, churnRisk: [], churnRiskTotal: 0 },
});
}
if (url.includes("/api/invoices/stats/summary")) {
return route.fulfill({
json: {
revenueThisMonth: 0,
outstanding: 0,
refundsThisMonth: 0,
methodBreakdown: [],
},
});
}
if (url.includes("/api/invoices")) {
return route.fulfill({ json: { data: [], total: 0 } });
}