fix(e2e): mock reports API with shaped responses in navigation tests #47
Reference in New Issue
Block a user
Delete Branch "fix/e2e-reports-mock"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Main CI failing — `reports page loads` E2E test crashes the React tree.
The `beforeEach` mock returns `[]` for all API calls. The Reports component destructures shaped responses:
The render throws, React unmounts the tree, and "Groom Book" disappears on retries.
Fix
Add specific mocks for the five `/api/reports/*` endpoints in `navigation.spec.ts` returning properly shaped empty responses. All other endpoints continue to return `[]`.
Test plan
🤖 Generated with Claude Code