Skip to content

test(e2e): refactor suite into independent, self-seeding tests (stage 1)#1429

Merged
joshunrau merged 1 commit into
DouglasNeuroInformatics:mainfrom
joshunrau:refactor/e2e-independent-tests
Jul 21, 2026
Merged

test(e2e): refactor suite into independent, self-seeding tests (stage 1)#1429
joshunrau merged 1 commit into
DouglasNeuroInformatics:mainfrom
joshunrau:refactor/e2e-independent-tests

Conversation

@joshunrau

Copy link
Copy Markdown
Collaborator

Summary

Stage 1 of the e2e rewrite: restructure the existing suite; no new coverage (coverage lands in a follow-up PR).

Replaces the serial, order-coupled suite with independent tests that seed their own preconditions via a typed API client and run in parallel.

  • src/support/ApiClient (typed seeding over @opendatacapture/schemas), fixtures (worker-cached per-role tokens ADMIN/GROUP_MANAGER/STANDARD, uniqueId, actingRole/appState options, getPageModel), and env/constants helpers.
  • Auth is sourced from the API and injected through the memory-only window.__PLAYWRIGHT_ACCESS_TOKEN__ seam (no persisted storage, per compliance). The polled auth-file dance and the 1.x/2.x cross-project dependency chain are gone.
  • Single playwright.config.ts (the unused docker config is deleted): setupchromium (full suite) + firefox (@smoke only) → teardown; fullyParallel; unique-per-test data with one end-of-run DB teardown.
  • Existing coverage migrated verbatim into src/specs/*.

Verification

Local: 21 passed, both parallel and with CI=1 (serial).

Note

Stacked on #1428 (the CI-flake/route-types fix) — merge that first; this PR's diff will then reduce to just the refactor.

🤖 Generated with Claude Code

Replaces the serial, order-coupled suite (1.x/2.x numbering + cross-project
dependency chain + file-based auth polling) with independent tests that seed
their own preconditions via a typed API client and run in parallel.

- support/: ApiClient (typed seeding over @opendatacapture/schemas), fixtures
  (worker-cached per-role tokens ADMIN/GROUP_MANAGER/STANDARD, uniqueId,
  actingRole/appState options, getPageModel), env/constants helpers.
- Auth is sourced from the API and injected through the memory-only
  window.__PLAYWRIGHT_ACCESS_TOKEN__ seam (no persisted storage, per compliance);
  the polled auth file is gone.
- Single playwright.config.ts (docker config deleted): setup -> chromium
  (full) + firefox (@smoke only) -> teardown, fullyParallel, unique-per-test
  data with a single end-of-run DB teardown.
- Existing coverage migrated verbatim into src/specs/*; no new coverage (that
  is stage two).

Verified locally: 21 passed, parallel and with CI=1 (serial).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@joshunrau
joshunrau merged commit dbad5c8 into DouglasNeuroInformatics:main Jul 21, 2026
1 check 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.

1 participant