Skip to content

Playwright smoke tests across critical authenticated pages #1897

@bokelley

Description

@bokelley

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):

  1. Login via /dev-login.html as the relevant dev user
  2. Navigate to the page, wait for content to load
  3. Verify critical DOM elements exist
  4. Test key interactions (save, toggle, submit)
  5. Check for console errors (filtering out expected noise like PostHog/network)
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions