mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-26 22:04:56 +00:00
CI (https://github.com/paperless-ngx/paperless-ngx/actions/runs/29777331059) failed every e2e test that reloads the document list, with the browser throwing "TypeError: Failed to fetch". Root cause: the e2e harness only starts the Angular dev server (no real backend), and relies entirely on page.routeFromHAR(..., { notFound: 'fallback' }) to mock API responses, falling through to the real network for anything not in a recorded HAR. The new GET /api/documents/filter_selection_data/ request added by this branch fires on every non-search reload() and isn't in any pre-recorded HAR fixture, so it fell through to a real network call with nothing listening on the other end. Added a shared mockFilterSelectionData() helper that stubs an empty response for that endpoint, registered via test.beforeEach() before each affected test's own routeFromHAR() call in every spec file that exercises document-list reload (document-list, dashboard, global-permissions, settings, document-detail). Playwright resolves routes in reverse-registration order, so the later-registered HAR route checks first, calls route.fallback() on a miss, and defers back to this earlier-registered stub instead of hitting the network. Not verified locally (Playwright browser binaries aren't installed in this environment and the user preferred not to install them); relying on CI to confirm. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PaperlessUi
This project was generated with Angular CLI version 10.1.5.
Development server
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Code scaffolding
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Build
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --configuration production flag for a production build.
Running unit tests
Run ng test to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e to execute the end-to-end tests via Protractor.
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.