Skip to content

Fix E2E failures in patient view related tasks panel#320

Merged
felixevers merged 1 commit into
mainfrom
feat/fix-e2e-tests-45db
Jul 5, 2026
Merged

Fix E2E failures in patient view related tasks panel#320
felixevers merged 1 commit into
mainfrom
feat/fix-e2e-tests-45db

Conversation

@felixevers

Copy link
Copy Markdown
Member

Summary

Investigates and fixes the E2E failure introduced with the filter/sort saved-view tests in #319.

  • Root cause (crash): Opening the Tasks tab on a patient saved view triggered React error chore(deps): bump docker/metadata-action from 5 to 6 #185 (maximum update depth). PatientViewTasksPanel reset related table state on every render because the sync useEffect deserialized fresh [] arrays and depended on unstable setter identities from useColumnVisibilityWithPropertyDefaults.
  • Root cause (filter test): The same effect immediately cleared filters after the UI committed them, so the related-tasks priority filter never stuck. Single-tag equals matching in virtualDerivedTableState also treated an empty selection as "match all".
  • Test/infra: Playwright config lived under tests/e2e/ with an incorrect testDir, so npx playwright test from tests/ ignored CI settings. Filter helpers now target visible controls on tabbed view pages.

Changes

  • PatientViewTasksPanel: memoize main view filters/sorting; sync related state from memoized baselines only when persistedRelatedContentKey changes.
  • virtualDerivedTableState: align singleTag equals/contains matching with hightide semantics (uuidValue, no match-all on empty selection).
  • filterSortUi.ts: visible toolbar/popup scoping + addSingleTagEqualsFilter helper.
  • tests/playwright.config.ts: correct config location and paths.

Validation

  • CI=true E2E_BASE_URL=http://localhost:3000 npx playwright test53 passed
Open in Web Open in Cursor 

- Stop infinite re-render when opening the Tasks tab on a saved patient
  view: sync related table state from memoized baselines and only when the
  persisted view definition key changes.
- Fix virtual derived singleTag equals matching to use uuidValue like
  hightide and reject empty selections instead of matching every row.
- Harden filter/sort E2E helpers for tabbed view pages (visible toolbar
  controls and dialog-scoped equals tag filters).
- Move Playwright config to tests/playwright.config.ts with correct paths
  so CI/local runs pick up baseURL, retries, and webServer settings.

Co-authored-by: Felix Evers <social@felixevers.de>
@felixevers felixevers marked this pull request as ready for review July 5, 2026 12:38
@felixevers felixevers merged commit 848949e into main Jul 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants