e2e: per-domain critical-path coverage #325

Closed
opened 2026-06-28 19:36:01 +00:00 by james · 0 comments
Owner

Refs #150

Build on the Playwright e2e foundation (#150) with per-domain critical-path specs that exercise each major surface end to end against the assembled app (Expo RN-Web SPA served by the Next.js API, SQLite).

Isolation insight that reshaped the scope: Carol enforces strict per-user data isolation, so each spec just registers its own uniqueEmail() user and works entirely in that silo — different specs never see each other's data even on the shared per-boot DB. So no per-test DB reset is needed for these specs, and #325 does not depend on #326 after all.

Scope delivered here — five specs (one per domain), each registering a fresh user and structured with test.step blocks like the smoke spec:

  • Profile: edit name/title/brief + persistence across reload, profile-picture upload + remove, add a contact.
  • Projects: create, edit (rename), delete a uniquely-named project.
  • Experience / jobs: add a job + position (+ a contribution); Contracts tab add contract + set position.
  • Network: add a person + a contact; add an organisation; link them (person as a key person on the org).
  • Account: create a PAT → reveal banner → revoke; switch theme + locale and assert the selection persists across reload.

Deferred (moves to #326): the admin spec (invite-only registration + admin-approval pending flow). Those flows are gated by REGISTRATION_POLICY, a process-wide env var set at boot (apps/api/lib/auth/registration.ts), so exercising them needs a second app boot under a non-open policy (an extra Playwright project + serve script) — test-infra work that belongs with #326. Admin coverage lands there alongside that second policy-configured boot.

Each spec follows the foundation's conventions (roles/aria selectors, i18n catalog values via fixtures/strings.ts, uniqueEmail() isolation). The existing e2e CI job runs the whole suite automatically — no workflow change.

Refs #150 Build on the Playwright e2e foundation (#150) with per-domain critical-path specs that exercise each major surface end to end against the assembled app (Expo RN-Web SPA served by the Next.js API, SQLite). **Isolation insight that reshaped the scope:** Carol enforces strict per-user data isolation, so each spec just registers its own `uniqueEmail()` user and works entirely in that silo — different specs never see each other's data even on the shared per-boot DB. So **no per-test DB reset is needed** for these specs, and #325 does **not** depend on #326 after all. Scope delivered here — **five** specs (one per domain), each registering a fresh user and structured with `test.step` blocks like the smoke spec: - **Profile**: edit name/title/brief + persistence across reload, profile-picture upload + remove, add a contact. - **Projects**: create, edit (rename), delete a uniquely-named project. - **Experience / jobs**: add a job + position (+ a contribution); Contracts tab add contract + set position. - **Network**: add a person + a contact; add an organisation; link them (person as a key person on the org). - **Account**: create a PAT → reveal banner → revoke; switch theme + locale and assert the selection persists across reload. **Deferred (moves to #326):** the **admin spec** (invite-only registration + admin-approval pending flow). Those flows are gated by `REGISTRATION_POLICY`, a process-wide env var set at boot (`apps/api/lib/auth/registration.ts`), so exercising them needs a *second* app boot under a non-open policy (an extra Playwright project + serve script) — test-infra work that belongs with #326. Admin coverage lands there alongside that second policy-configured boot. Each spec follows the foundation's conventions (roles/aria selectors, i18n catalog values via `fixtures/strings.ts`, `uniqueEmail()` isolation). The existing `e2e` CI job runs the whole suite automatically — no workflow change.
james closed this issue 2026-06-29 15:19:14 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
james/carol#325
No description provided.