This repository has been archived on 2026-05-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Flea Flicker 9f49255253 fix(e2e): add /api/invoices/stats/summary mock before broad /api/invoices catch-all
PR #341 added a useEffect in the Invoices page that fetches
/api/invoices/stats/summary. The existing /api/invoices mock was too broad
and intercepted this URL, returning { data: [], total: 0 } instead of the
stats shape { revenueThisMonth, outstanding, refundsThisMonth, methodBreakdown }.
This caused a runtime crash when rendering paymentStats.revenueThisMonth.

The fix adds a specific mock for /api/invoices/stats/summary before the general
/api/invoices mock, so the stats endpoint returns the correct shape.

Fixes GRO-820.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-20 13:25:10 +00:00
..