mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
test(e2e): stub the notifications endpoint in the backend-free suite
The bell polls GET /api/v1/notifications from every shell it mounts in, starting on load, so every stubbed route acquired a failed request. The hook swallows it and shows an empty bell, but the browser still logs the request itself, and console-clean.spec counts that: seven routes failed on "Failed to load resource: 500" pointing at the poll. Stubbed empty, for the same reason and in the same place as the policy reconcile above it.
This commit is contained in:
@@ -273,6 +273,14 @@ export async function mockAppApis(
|
||||
await page.route("**/api/v1/policies/runs", (route: Route) =>
|
||||
route.fulfill({ json: [] }),
|
||||
);
|
||||
|
||||
// The notification bell polls GET /api/v1/notifications from every shell it
|
||||
// is mounted in, starting on load. The hook swallows the failure and shows an
|
||||
// empty bell, but the browser still logs the failed request itself, which the
|
||||
// console-hygiene guard counts. Empty list, for the same reason as policies.
|
||||
await page.route("**/api/v1/notifications*", (route: Route) =>
|
||||
route.fulfill({ json: { notifications: [] } }),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user