Context
PR #1895 added Playwright smoke tests for the profile edit page, catching a class of bug (DOM restructure dropping elements) that unit tests alone missed. The same pattern — dev login, verify rendering, test key interactions, check for console errors — should cover other pages with complex client-side JS.
Pages to cover (priority order)
| Page |
Route |
Why |
Dev user |
| Membership hub |
/membership/hub |
Billing data integration, subscription status, multiple account types |
member, personal, admin |
| Organization dashboard |
/organization |
Team management, seat allocation, org-scoped views |
admin, member |
| Certification dashboard |
/certification |
Progress tracking, credential display, LinkedIn sharing |
personal, admin |
| Brand viewer |
/brand/:domain |
Registry data rendering, identity display |
admin |
| Community hub |
/community |
Connection management, activity feed, gamification |
personal, member |
| Admin digest |
/admin/digest |
Newsletter editor, section management |
admin |
Pattern
Each test follows the same structure (see tests/e2e/profile-edit.smoke.js):
- Login via
/dev-login.html as the relevant dev user
- Navigate to the page, wait for content to load
- Verify critical DOM elements exist
- Test key interactions (save, toggle, submit)
- Check for console errors (filtering out expected noise like PostHog/network)
- Screenshot on failure
Shared infrastructure to build
- Test helper: Extract login, error collection, and assertion utilities from
profile-edit.smoke.js into a shared tests/e2e/helpers.js
- Runner script:
npm run test:e2e that starts docker, waits for health, runs all smoke tests, tears down
- CI integration (optional): GitHub Action that spins up the dev container and runs smoke tests on PRs that touch
server/public/
How to run today
docker compose up --build -d
npx playwright install chromium # first time only
node tests/e2e/profile-edit.smoke.js
References
Context
PR #1895 added Playwright smoke tests for the profile edit page, catching a class of bug (DOM restructure dropping elements) that unit tests alone missed. The same pattern — dev login, verify rendering, test key interactions, check for console errors — should cover other pages with complex client-side JS.
Pages to cover (priority order)
/membership/hubmember,personal,admin/organizationadmin,member/certificationpersonal,admin/brand/:domainadmin/communitypersonal,member/admin/digestadminPattern
Each test follows the same structure (see
tests/e2e/profile-edit.smoke.js):/dev-login.htmlas the relevant dev userShared infrastructure to build
profile-edit.smoke.jsinto a sharedtests/e2e/helpers.jsnpm run test:e2ethat starts docker, waits for health, runs all smoke tests, tears downserver/public/How to run today
docker compose up --build -d npx playwright install chromium # first time only node tests/e2e/profile-edit.smoke.jsReferences