test: replace Cypress with Playwright e2e
Merged
GR
4mo ago+2351+2351+0123456789012345678901234567890123456789-69092-69092-01234567890123456789012345678901234567890123456789
Summary
- Replace Cypress with Playwright for Padloc v4 PWA + server e2e
- Required
e2ejob inci.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:e2elocally (if browser available) - CI: lint, build, unit, e2e green
- Confirm smoke would fail without
pl-appmount
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:e2epasses;pnpm run test:e2e:devworks; smoke fails ifpl-appdoesn’t mount (expected gate). Uses dedicated PWA/API ports to avoid:3000/:8080clashes. - CI: required
e2ejob installs Playwright Chromium, starts Dockermaildev, 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.
- Local:
-
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, removecypressandmaildev. - Deferred follow-ups: Firefox/WebKit projects, parallelize/shard, dynamic free-port selection in
scripts/e2e.sh, consider restoring needed v3 coverage.
- One-time:
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.