Commit Graph
42 Commits
Author SHA1 Message Date
Trenton HolmesandClaude Sonnet 5 ff0ce4d123 Fix: register the filter_selection_data e2e stub after routeFromHAR, not before
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>
2026-07-20 14:54:58 -07:00
Trenton HolmesandClaude Sonnet 5 8b3665b32d Fix: add CORS header to the e2e filter_selection_data stub response
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>
2026-07-20 14:32:59 -07:00
Trenton HolmesandClaude Sonnet 5 9cce6d1b68 Fix: mock the new filter_selection_data request in Playwright e2e tests
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>
2026-07-20 14:21:51 -07:00
shamoonandGitHub 566afdffca Enhancement: unify text search to use tantivy (#12485) 2026-04-03 13:53:45 -07:00
shamoonandGitHub f715533770 Performance: support passing selection data with filtered document requests (#12300) 2026-03-30 16:38:52 +00:00
shamoonandGitHub 85a18e5911 Enhancement: saved view sharing (#12142) 2026-03-04 14:15:43 -08:00
shamoonandGitHub b050fab77f Enhancement: consolidate management lists into document attributes section (#12045) 2026-02-13 09:36:12 -08:00
shamoonandGitHub 9e9e55758f Enhancement: pngx pdf viewer (#12043) 2026-02-08 21:24:43 -08:00
shamoonandGitHub 6442fdc235 Enhancement: improve filter drop-down performance with virtual scrolling (#11973) 2026-02-01 14:13:39 -08:00
shamoonandGitHub 1717517e70 Tweakhancement: reorganize some list & bulk editing buttons (#10944) 2025-09-26 13:47:24 -07:00
shamoonandGitHub aaaa6c1393 Enhancement: reorganize dates dropdown, add more relative options (#9307) 2025-03-05 12:48:42 -08:00
shamoonandGitHub e08606af6e Enhancement: date picker and date filter dropdown improvements (#9033) 2025-02-06 23:01:48 -08:00
shamoon f5a0b9c174 Fix: random styling fixes 2025-01-09 22:49:30 -08:00
shamoon 8cd09ba10d Chore: add prettier organize imports 2024-12-13 00:45:20 -08:00
shamoon 8574d28c6f Fix: hide other filtering buttons, fix e2e test paths 2024-12-08 21:23:41 -08:00
shamoonandGitHub ab548e36c7 Change: make saved views manage its own component (#8423) 2024-12-03 11:09:02 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>shamoon
38560cf13a Chore(deps-dev): Bump @playwright/test from 1.42.1 to 1.45.3 in /src-ui (#7367)
* Chore(deps-dev): Bump @playwright/test from 1.42.1 to 1.45.3 in /src-ui

Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.42.1 to 1.45.3.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.42.1...v1.45.3)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix failing test

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-08-01 23:59:56 +00:00
shamoonandGitHub 6b2e5559ca Fix: support multiple inbox tags from stats widget (#7281) 2024-07-22 10:07:51 -07:00
shamoonandGitHub 019a255753 Chore: revert pngx pdf viewer to third party package (#6741) 2024-05-16 11:12:19 -07:00
shamoonandGitHub c6e7d06bb7 Feature: global search, keyboard shortcuts / hotkey support (#6449) 2024-05-02 16:15:56 +00:00
shamoonandGitHub 63e1f9f5d3 Feature: custom fields filtering & bulk editing (#6484) 2024-04-26 15:10:03 -07:00
shamoonandGitHub bd4476d484 Feature: customizable fields display for documents, saved views & dashboard widgets (#6439) 2024-04-26 06:41:12 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>shamoon
a698791059 Chore(deps-dev): Bump @playwright/test from 1.41.2 to 1.42.0 in /src-ui (#5964)
* Chore(deps-dev): Bump @playwright/test from 1.41.2 to 1.42.0 in /src-ui

Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.41.2 to 1.42.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.41.2...v1.42.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Revert .har changes from playwright bug

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-03-01 21:07:08 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>shamoon
b55529b913 Chore(deps-dev): Bump @playwright/test from 1.40.1 to 1.41.2 in /src-ui (#5634)
* Chore(deps-dev): Bump @playwright/test from 1.40.1 to 1.41.2 in /src-ui

Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.40.1 to 1.41.2.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.40.1...v1.41.2)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update tests for breaking playwright change

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-02-01 22:06:10 -08:00
shamoonandGitHub bb98fc5f65 Chore: better bootstrap icons (#5403) 2024-01-18 00:27:38 +00:00
shamoonandGitHub d22b27afe7 Enhancement: above and below doc detail save buttons (#5008)
* 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
2023-12-18 00:11:12 +00:00
shamoonandGitHub 826322b610 Feature: pngx PDF viewer with updated pdfjs (#4679) 2023-12-04 17:17:40 -08:00
shamoonandTrenton H 10729f0362 Feature: Implement custom fields for documents (#4502)
Adds custom fields of certain data types, attachable to documents and searchable

Co-Authored-By: Trenton H <797416+stumpylog@users.noreply.github.com>
2023-11-05 17:27:23 -08:00
shamoonandGitHub 6973691cce Enhancement: dashboard improvements, drag-n-drop reorder dashboard views (#4252)
* Updated dashboard

* Make entire screen dropzone on dashboard too

* Floating upload widget status alerts

* Visual tweaks: spacing, borders

* Better empty view widget

* Support drag + drop reorder of dashboard saved views

* Update messages.xlf

* Disable dashbaord dnd if global dnd active

* Remove ngx-file-drop dep, rebuild file-drop & upload files widget

* Revert custom file drop implementation

* Try patch-package fix

* Simplify dropzone transitions to make more reliable

* Update messages.xlf

* Update dashboard.spec.ts

* Fix coverage
2023-09-28 10:18:12 -07:00
shamoonandGitHub f3d6756fba Enhancement: settings reorganization & improvements, separate admin section (#4251)
* 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
2023-09-24 19:24:28 -07:00
shamoon 5ee9ad3e4f Migrate frontend prefix to -pngx 2023-09-14 14:51:02 -07:00
78ae4c42f7 Chore: change dark mode to use Bootstrap's color modes (#4174)
* 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>
2023-09-13 18:11:44 +00:00
shamoonandGitHub 9a0e44a731 Pass saved_view owner as id only (#4158) 2023-09-10 16:37:35 -07:00
shamoon ca4500692f remove unused e2e code 2023-08-01 19:27:52 -07:00
shamoon be4685742c remove redundant e2e tests 2023-08-01 19:23:11 -07:00
Daniel Dietzlerandshamoon 4693632c7d Feature: separate save / save & close buttons (#3575)
* 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>
2023-06-18 08:06:54 -07:00
shamoon 74c965d21d Adds quick filters from document detail 2023-05-30 08:38:33 -07:00
shamoon 0c6a9a189b migrate frontend tests to playwright
tasks spec
settings spec
manage spec
document-detail spec
global permissions spec
documents-list & dashboard specs
tasks network requests
settings network requests
permissions network requests
manage network request
bulk-edit network requests
Fix specs
try to get playwright working on ci
rename some specs
reconfigure playwright config
increase webserver timeout for ci
fix report path
2023-05-18 13:47:43 -07:00
Michael Shamoon 9f72bf7745 Prettier code cleanup for .js files
See #182
2022-03-11 11:58:19 -08:00
Michael Shamoon f34202a82a Prettier code cleanup for .ts files
See #182
2022-03-11 11:58:19 -08:00
Michael Lynch 372ac3a40c Normalize whitespace in source files
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.
2021-06-13 10:57:40 -04:00
Jonas Winkler 131533d9eb added paperless ui 2020-10-27 01:11:32 +01:00