feat/e2e-refactor #28

Merged
patillacode merged 3 commits from feat/e2e-refactor into main 2026-05-06 21:56:48 +02:00
Owner

Complete e2e test suite refactor: modularisation, coverage, and parallelism

Summary

  • Restructure the flat e2e test files into feature-domain subdirectories (test_auth/, test_journal/,
    test_account/, test_admin/) with a journeys/ subfolder for cross-role flows
  • Fill all previously uncovered flows: admin user stats modal, banner management, all three maintenance tasks,
    locale switching, and five end-to-end journeys
  • Fix shared browser context bug: admin_page now uses its own browser.new_context() so tests that use both a
    user page and an admin page no longer bleed session cookies
  • Add pytest-xdist (-n 2 --dist=loadfile) for parallel test execution; module-scope seed_user/seed_admin in
    subdirectories where no test mutates the user record to avoid repeated bcrypt hashes per file
### Complete e2e test suite refactor: modularisation, coverage, and parallelism **Summary** - **Restructure** the flat e2e test files into feature-domain subdirectories (`test_auth/`, `test_journal/`, `test_account/`, `test_admin/`) with a `journeys/` subfolder for cross-role flows - **Fill all previously uncovered flows**: admin user stats modal, banner management, all three maintenance tasks, locale switching, and five end-to-end journeys - **Fix shared browser context bug**: admin_page now uses its own browser.new_context() so tests that use both a user page and an admin page no longer bleed session cookies - Add `pytest-xdist` (`-n 2 --dist=loadfile`) for parallel test execution; module-scope `seed_user`/`seed_admin` in subdirectories where no test mutates the user record to avoid repeated `bcrypt` hashes per file
perf: parallelize e2e tests with xdist and module-scope seed fixtures
Some checks failed
CI / test (pull_request) Failing after 18s
CI / e2e (pull_request) Has been skipped
ae2502adc6
- Add pytest-xdist; run 2 workers with --dist=loadfile so module-scoped
  fixtures stay on one worker and tests still parallelise across files
- Module-scope seed_user in test_auth/ and test_journal/ conftest files
  and seed_admin in test_admin/ — avoids repeated bcrypt hashes for
  files whose tests never mutate the user record
- Fix UNIQUE constraint crash in test_image_upload: _seed_entry now
  returns the entry and the test deletes it on exit, so module-scoped
  seed_user can be safely reused across parametrised variants
- Cap workers at -n 2 (was auto) to prevent Firefox OOM timeouts when
  too many browser processes run concurrently
fix: format
All checks were successful
CI / test (pull_request) Successful in 36s
CI / e2e (pull_request) Successful in 4m51s
5c7de0f88b
patillacode deleted branch feat/e2e-refactor 2026-05-06 21:56:49 +02:00
patillacode referenced this pull request from a commit 2026-05-06 21:56:49 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
patillacode/piruetas!28
No description provided.