test: add E2E test foundation with Playwright#132
Merged
jakebromberg merged 7 commits intomainfrom Mar 23, 2026
Merged
Conversation
2 tasks
Deploying wxyc-dj with
|
| Latest commit: |
45fdb81
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f9d17e07.dj-site.pages.dev |
| Branch Preview URL: | https://feat-e2e-foundation.dj-site.pages.dev |
aaf4f79 to
0c8d47f
Compare
276a83b to
186ad11
Compare
b109696 to
4d96829
Compare
168306d to
3731039
Compare
JacksonMeade
approved these changes
Mar 22, 2026
Infrastructure: - Add Playwright configuration for E2E testing - Create reusable page objects for auth flows (login, dashboard, roster, onboarding) - Implement auth fixtures with session reuse - Add helper scripts for E2E test environment - Add GitHub Actions workflows for CI and E2E tests This is the foundation for comprehensive E2E testing. Test specs will be added in subsequent PRs. Co-authored-by: Cursor <cursoragent@cursor.com>
- Strip leading whitespace from .env heredoc in E2E workflow. YAML indentation was embedding spaces into every line of the .env file, causing dotenvx to parse zero variables. This led to JWT verification failures in the backend service during password reset and email change operations. - Scope roster table locator to `form table` instead of bare `table` to avoid Playwright strict-mode violations when the dashboard renders multiple tables. - Use JS click (via page object method) instead of native click for the email cancel button to bypass MUI SVG elements intercepting pointer events. - Make form validation tests resilient to both client-side and server-side validation by accepting either the form staying open or an error toast appearing. - Increase timeout for the role persistence test which performs a full login flow, multiple role changes, and a page reload. - Accept success toast as a valid outcome in the invalid email test since the server may accept the value.
de9f9e4 to
ca4aa8d
Compare
The optimized workflow from Feb 16 (842e879) was accidentally replaced with the slower Docker Compose approach during a rebase on Mar 2 (e1eff3a). This restores those optimizations with NPM_TOKEN fixes merged in. Changes: - Replace Docker Compose with GHA services: container for PostgreSQL - Parallelize backend build, Playwright install, and dj-site build - Run auth/backend as native Node processes instead of Docker containers - Add Playwright globalTimeout (10 min) and --max-failures=10 - Tighten per-test timeout from 30s to 15s, expect timeout from 15s to 10s - Reduce workflow timeout-minutes from 45 to 15 - Cache Playwright browsers across runs - Disable retries (re-enable once suite is stable)
The JWKS endpoint is at /auth/jwks, not /auth/.well-known/jwks.json. The old optimized workflow had the wrong path, which happened to work when the Docker Compose version didn't use the .env JWKS URL at all (Docker containers had their own env vars from docker-compose.yml).
The "should require real name/username/email" and "should validate email format" tests assumed client-side form validation that doesn't exist. The form submits successfully without these fields. The submitNewAccount() method's 15s internal wait consumed the entire test timeout budget, making these tests reliably time out with the tighter 15s timeout.
15s is sufficient locally but too tight for CI runners, where page loads take longer. Tests like "handle invalid email format gracefully" (13.8s locally) reliably exceed 15s on CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/features/authorization/) withAuthorizedViewcomponentE2E workflow performance (Closes #189)
services:container + native Node processesglobalTimeout(10 min), tighter per-test timeouts,--max-failures=10timeout-minutesfrom 45 to 15BETTER_AUTH_JWKS_URLmoved into shared.envso it's available to both services and the user-seeding scriptSpeed comparison
Measured from successful CI runs on the same branch (before vs after).
services:)npm ci)Key changes that drive the improvement:
services:containers start PostgreSQL before any workflow step runs, eliminating the 2m 11s Docker Compose bootTest plan