Per Playwright's own docs, routeFromHAR's notFound: 'fallback' sends
unmatched requests straight to the network -- it does not chain to
other, earlier-registered page.route() handlers via route.fallback()
the way I'd assumed. Since Playwright checks routes in
reverse-registration order, a handler registered in beforeEach (i.e.
before the test body's routeFromHAR call) is checked AFTER routeFromHAR,
whose catch-all pattern intercepts everything first and sends any miss
straight to the (nonexistent, in e2e) network -- my stub never got a
chance to run. Confirmed by a second CI failure with the same "Failed
to fetch" symptom even after the CORS-header fix.
Moved the mockFilterSelectionData(page) call to immediately after each
test's own routeFromHAR(...) call instead, so it's registered later and
checked first for that specific URL, with routeFromHAR's broader
pattern still handling everything else as before.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The e2e app (localhost:4200) calls the backend at localhost:8000, a
cross-origin request from the browser's perspective. Recorded HAR
responses carry the real backend's Access-Control-Allow-Origin header,
which is why they work; the stub added in the previous commit didn't
set one, so the browser rejected the fulfilled response as a CORS
violation -- same symptom as the original bug (TypeError: Failed to
fetch), confirmed via a fresh CI run after the first e2e fix attempt.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
* Show doc detail nav buttons above & below fields
* Fix tests for additional button nav
* Use flexbox to fix tab order but retain visual order
* Update screenshots
* Separate admin / manage sections
* Move mail settings to its own component
* Move users and groups to its own component
* Move default permissions to its own settings tab
* Unify list styling, add tour step, refactor components
* Only patch saved views that have changed on settings save
* Update messages.xlf
* Remove unused methods in settings.component.ts
* Drop admin section to bottom of sidebar, cleanup outdated, add docs link to dropdown
* Better visually unify management list & other list pages
* Change setting dark mode to use Bootstrap's data-bs-theme attribute
* Update dark mode styling to use Bootstrap's color mode attribute
* Update unit tests and lints
* Fix not reflecting custom theme color
* Remove commented-out code
* fix inverted thumbnails in dark mode & card borders
* prettier
* Fix application of dark mode, tests
---------
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
* Add setting to decide whether the edit dialog should automatically close on save
* Add the actual button to the ui
* Revert "Add the actual button to the ui"
This reverts commit e1f5a8bde0.
* Revert "Add setting to decide whether the edit dialog should automatically close on save"
This reverts commit feef3c909b.
* Add button for save without exit
* Correct save button ordering, ensure perms, update translation strings
* fix e2e tests
* Add unit testing for save / save & close button
---------
Update messages.xlf
Update document-detail.component.spec.ts
Co-Authored-By: shamoon <4887959+shamoon@users.noreply.github.com>
Ensure that no source files have trailing whitespace at end of lines and ensure that all files end with a single trailing newline.
This also adds Github Actions to enforce whitespace conventions.