docs(14-01): complete desktop e2e coverage plan

- 85 passed, 5 skipped, 0 failed across iphone + pixel + desktop
- SC-1/SC-2/SC-3 all satisfied
This commit is contained in:
Lucas Berger
2026-06-12 08:24:31 -04:00
parent bfc49d199d
commit 492adbc8b3
@@ -0,0 +1,109 @@
---
phase: 14-desktop-e2e-coverage
plan: "01"
subsystem: e2e-test-harness
tags: [playwright, e2e, desktop, testing]
dependency_graph:
requires: [07-mobile-test-harness, 08-gitea-ci]
provides: [desktop-e2e-gate]
affects: [ci-harness-job]
tech_stack:
added: []
patterns: [playwright-project-matrix, test.skip-project-name-guard, testInfo-fixture, D-04-parity-assertion]
key_files:
created: []
modified:
- apps/pwa/playwright.config.ts
- apps/pwa/e2e/layout.spec.ts
- apps/pwa/e2e/calendar.spec.ts
- apps/pwa/e2e/lists.spec.ts
- apps/pwa/e2e/README.md
- .gitea/workflows/ci.yml
decisions:
- "D-06: Single Desktop Chrome project only (no Desktop WebKit) — Apple member covered by iphone/WebKit profile"
- "D-04 parity assertion: desktop-only test asserting New Event toolbar button height >=44px"
- "inline test.skip(testInfo.project.name === 'desktop') pattern used — consistent with calendar.spec.ts SW-block skip"
- "CI step-name comment updated cosmetically only — no plumbing change required"
metrics:
duration: "~5 minutes"
completed: "2026-06-12"
tasks_completed: 3
files_modified: 6
---
# Phase 14 Plan 01: Desktop E2E Coverage Summary
Added a third `desktop` Playwright project (Desktop Chrome, 1280x720, no hasTouch) to `playwright.config.ts` and made the existing Phase 7 mobile-authored e2e specs green on desktop by desktop-skipping three mobile-only geometry assertions and adding a D-04 parity assertion for the desktop toolbar button.
## Tasks Completed
| Task | Name | Commit | Files |
|------|------|--------|-------|
| 1 | Add desktop project to playwright.config.ts | d3bc696 | apps/pwa/playwright.config.ts |
| 2 | Desktop-skip mobile-only assertions + D-04 parity | 2903599 | apps/pwa/e2e/layout.spec.ts |
| 3 | Update spec headers + README, prove full suite green | bfc49d1 | apps/pwa/e2e/calendar.spec.ts, lists.spec.ts, README.md, .gitea/workflows/ci.yml |
## What Was Built
**SC-1:** A `desktop` Playwright project entry was appended to the `projects` array in `playwright.config.ts` using `devices['Desktop Chrome']` with `serviceWorkers: 'block'`. No `baseURL` override (inherited from top-level `use` block). Header jsdoc updated to list three profiles.
**SC-2:** `layout.spec.ts` received three `test.skip(testInfo.project.name === 'desktop', reason)` guards on the mobile-only geometry tests:
- "BottomTabBar is fully in-viewport (Rule 3 — safe-area-inset)" — BottomTabBar returns null at >=768px; nav resolves to DesktopNav sidebar where safe-area-inset assertion is semantically wrong
- "BottomTabBar is fully in-viewport on /lists (Rule 3)" — same reason
- "New Event FAB meets 56x56px touch-target minimum (Rule 1)" — on desktop resolves to toolbar button (CalendarShell.tsx:436-457), not the 56px FAB
A D-04 parity test was added asserting `New Event` toolbar button height >=44px, guarded by `test.skip(testInfo.project.name !== 'desktop')` so it runs only on desktop.
All mobile assertions are preserved: `toBeGreaterThanOrEqual(56)` and `toBeGreaterThanOrEqual(44)` both still present.
`calendar.spec.ts` and `lists.spec.ts` required no structural changes — all tests pass unchanged on desktop (nav landmark resolves to DesktopNav sidebar, overflow/state assertions are viewport-agnostic).
**SC-3:** CI gate is blocking automatically. The harness job in `.gitea/workflows/ci.yml` runs `pnpm --filter @familysync/pwa test:e2e` which executes all configured projects. The `chromium` engine (used by Desktop Chrome) is already installed via `playwright install --with-deps webkit chromium`. No `continue-on-error` added. Step-name comment updated cosmetically only.
**Full suite result (local verification):** 85 passed, 5 skipped (3 desktop geometry guards + 2 non-desktop parity guards), 0 failed across iphone + pixel + desktop.
## Decisions Made
- **testInfo fixture pattern:** Used `test('name', async ({ page }, testInfo) => { test.skip(...); ... })` — consistent with the inline conditional skip in `calendar.spec.ts`
- **D-04 parity as sibling test:** Added as a new test in the same `describe` block guarded by `!== 'desktop'`, rather than a conditional branch inside the FAB test, to keep the skip reason explicit and discoverable
- **No `desktop.spec.ts`:** D-01 maintained — one spec set, no duplication
- **CI cosmetic only:** Step-name comment updated to name all three profiles; no plumbing change required
## Deviations from Plan
None — plan executed exactly as written.
## Verification Results
All success criteria met:
- `playwright.config.ts` contains `name: 'desktop'` with `devices['Desktop Chrome']` and `serviceWorkers: 'block'`
- `npx playwright test --list --project=desktop` exits 0 (30 tests enumerated)
- `grep -c "testInfo.project.name === 'desktop'" apps/pwa/e2e/layout.spec.ts` == 3
- Mobile FAB assertions intact: `toBeGreaterThanOrEqual(56)` present
- No `desktop.spec.ts` under `apps/pwa/e2e/`
- `.gitea/workflows/ci.yml` has no `continue-on-error` on the harness job
- `apps/pwa/e2e/README.md` documents Desktop Chrome and `--project=desktop`
- Full suite: 85 passed, 5 skipped (expected), 0 failed
## Known Stubs
None.
## Threat Flags
No new application runtime code introduced. All changes confined to e2e test harness and docs. `serviceWorkers: 'block'` correctly set on the desktop project (T-14-01 satisfied). No new trust boundary created.
## Self-Check: PASSED
Files exist:
- apps/pwa/playwright.config.ts: FOUND
- apps/pwa/e2e/layout.spec.ts: FOUND
- apps/pwa/e2e/calendar.spec.ts: FOUND
- apps/pwa/e2e/lists.spec.ts: FOUND
- apps/pwa/e2e/README.md: FOUND
Commits exist:
- d3bc696 (Task 1): FOUND
- 2903599 (Task 2): FOUND
- bfc49d1 (Task 3): FOUND