Skip to content

refactor: Migrate test suite to Playwright and revamp dev environment#117

Merged
albanm merged 22 commits intomasterfrom
refactor-dev-env
Apr 13, 2026
Merged

refactor: Migrate test suite to Playwright and revamp dev environment#117
albanm merged 22 commits intomasterfrom
refactor-dev-env

Conversation

@albanm
Copy link
Copy Markdown
Member

@albanm albanm commented Apr 13, 2026

  • Migrates the entire test suite from the legacy runner to Playwright, introducing project categories (unit, api, inproc, e2e) with a shared state-setup/state-teardown flow and a new
    tests/support/ toolkit (axios helpers, in-process server, e2e fixtures).
  • Adds a test-env API providing seed and cleanup endpoints so tests can provision predefined users/orgs and isolate state between runs.
  • Revamps the dev environment: dev processes pipe output through tee into dev/logs/, a status script reports health, and DEV_HOST supports branch-based subdomains for cookie
    segregation across parallel worktrees.
  • Updates CI to boot the dev server and run Playwright, aligns development.cjs/test.cjs configs with the new expectations, and fixes rate-limit, config-mutation, and module-loading
    issues surfaced during the migration.

albanm and others added 22 commits April 8, 2026 11:16
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Enables tests that rely on predefined file-storage users to work
against the mongo-backed dev server by importing users.json and
organizations.json into MongoDB.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Migrates session, jwks, i18n, users, organizations, invitations,
sites, mails, password-lists, single-membership, pseudo-session,
admin-credentials, external-apps-authorization, and unescape-dn tests.

Adds rotate-keys endpoint to test-env API for JWKS testing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rver

LDAP, OIDC, and file-storage tests use an in-process server helper
since they require different server configurations than the dev server.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ading)

- Move env var assignments from module level to beforeAll in in-process tests
- Add config overlay PATCH endpoint to test-env API
- Add patchConfig() to support utils for remote config mutation
- Increase authRateLimit in development config for testing
- Set NODE_CONFIG_DIR in test support for config imports
- Switch external-apps-authorization to in-process server (needs config mutation)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix waitForMail link extraction to find action links
- Set alwaysAcceptInvitation=false in beforeEach for invitation tests
- Relax password validation in dev config to match test expectations
- Disable observer for in-process server tests
- Add patchConfig to test-env API for remote config mutation
- Revert external-apps-authorization to dev-server pattern
- Add test-results to .gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add secretKeys.pseudoSession
- Set defaultMaxCreatedOrgs to -1 (unlimited for testing)
- Add passwordUpdateInterval
- Relax password entropy to 20

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix createUser to filter for token_callback mails only (ignore invitation mails)
- Clean all organizations in test-env (including admins-org)
- Skip 3 tests needing cookie manipulation or events service
- Fix waitForMail link extraction in organizations test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@albanm albanm merged commit f9b8584 into master Apr 13, 2026
3 of 4 checks passed
@albanm albanm deleted the refactor-dev-env branch April 13, 2026 12:25
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