5.4.11 Story tests — Vitest matrix (folksonomy × components × watchers × notifications) + Playwright E2E + a11y sweep
Estimate: 32m · Depends on: 5.4.5, 5.4.8, 5.4.9, 5.4.10
The story-closing verification (Principle #18; the 5.1.7/5.2.8/5.3.8 split — epic-wide journeys stay Story 5.6).
Vitest (integration, real Postgres): labels — find-or-create casing, no-spaces/caps, delete-on-last-use under concurrent removal, autocomplete bounds; components — CRUD uniqueness, default-assignee-at-create incl. the first-alphabetical conflict + no-override, both delete branches incl. duplicate-join skip; watchers — the permission matrix (self vs manage-others vs viewer), the typed no-view rejection, auto-watch on create/comment idempotency; notifications — actor exclusion, mention-dedupe (a watcher who was mentioned gets ONE email), send-time view re-check, replay idempotency, transitioned-event emit-on-commit-only.
Playwright E2E (tests/e2e/labels-components-watch.spec.ts): as the PM — type-create perf-q3 on an issue (chip appears; spaced label rejected inline); the same label autocompletes case-insensitively on another issue; admin-create components, assign two to an issue, create a fresh issue with a defaulted component and no assignee → auto-assigned; delete an in-use component via the MOVE branch → the issue carries the target; watch via the eye and via W; the popover lists watchers; admin adds Odie; the dev email console shows the watcher email on a comment by another user, none to the actor. Role pass: viewer — read-only chips, CAN watch, no manage rows; non-admin member — read-only Components settings. Run against the standing dev-server harness.
Strict a11y sweep: the detail route (chip pickers open + watchers popover open) and the Components settings page pass the strict axe config.
Acceptance criteria
- The Vitest matrix covers every cell above;
pnpm test:coveragekeeps all 5.4 files ≥90% branch/fn/line. - The E2E journey + both role passes run green in CI's Playwright lane (Combobox-name selector gotchas respected).
- The strict axe sweep over both surfaces reports zero violations.
- The Story 5.4 verification recipe runs clean top to bottom; shared-DB flake isolation respected.
Context refs
tests/integration/+tests/e2e/conventions; the E2E selector/harness memories- The 5.1.7/5.2.8/5.3.8 story-test shape
- The Story 5.4 verification recipe — the checklist this automates
@inngest/test(the notification matrix) + the dev email console[EMAIL]grep contract