test: replace Cypress with Playwright e2e

Merged
GR
4mo ago
+2351-69092

Summary

  • Replace Cypress with Playwright for Padloc v4 PWA + server e2e
  • Required e2e job in ci.yml (Chromium)
  • Smoke, auth, items, server HTTP specs; maildev retained
  • Remove Cypress, v3 fixtures, and label-based e2e.yml

Spec

  • docs/superpowers/specs/2026-07-10-playwright-e2e-design.md

Test plan

  • pnpm run test:e2e locally (if browser available)
  • CI: lint, build, unit, e2e green
  • Confirm smoke would fail without pl-app mount

Summary by cubic

Replaces Cypress with Playwright for v4 PWA + server end-to-end tests and makes e2e a required CI gate. Drops v3 fixtures and the label-based e2e workflow; runs Chromium via scripts/e2e.sh with Docker maildev on dedicated ports to avoid local conflicts, hardens auth flows, and upgrades GitHub Actions to Node 24–native runtimes.

  • Testing Evidence

    • Local: pnpm exec playwright install chromium && pnpm run test:e2e passes; pnpm run test:e2e:dev works; smoke fails if pl-app doesn’t mount (expected gate). Uses dedicated PWA/API ports to avoid :3000/:8080 clashes.
    • CI: required e2e job installs Playwright Chromium, starts Docker maildev, runs tests, cleans up, and always uploads the Playwright report; uses Node 24–native actions (checkout@v5, setup-node@v6, pnpm/action-setup@v6, upload-artifact@v6). Retries set to 1 in CI.
    • Stability: clear mailbox before requesting codes; type into real shadow-DOM inputs to sync Lit state; avoid full-reload lock; handle trusted-device prompts during navigation.
  • Migration

    • One-time: pnpm exec playwright install chromium.
    • Requires Docker (maildev/maildev:2.1.0).
    • Commands: pnpm run test:e2e, pnpm run test:e2e:dev.
    • Dependencies: add @playwright/test, remove cypress and maildev.
    • Deferred follow-ups: Firefox/WebKit projects, parallelize/shard, dynamic free-port selection in scripts/e2e.sh, consider restoring needed v3 coverage.

Summary by CodeRabbit

  • New Features
    • Added Playwright-based end-to-end suites for auth, items (create/search), server endpoint validation, and smoke checks.
    • Added a local interactive end-to-end “dev mode” workflow for faster debugging.
  • Documentation
    • Updated end-to-end testing docs and contributing guidance to use Docker-based MailDev with Playwright and Chromium installation.
  • Chores / CI
    • Modernized GitHub Actions and added automated Playwright E2E runs using a local MailDev container, including artifact uploads.
    • Removed the old Cypress e2e setup and deleted the previous scheduled/manual E2E workflow; cleaned up Playwright output handling in tooling and gitignore.