3.7.6 Tests — board CRUD + guards + switcher + board-scoped read (component + focused E2E)
Estimate: 26m · Depends on: 3.7.2, 3.7.3, 3.7.4, 3.7.5, 3.7.8
Prove multi-board end-to-end — the 3.1.7 / 3.2.7 split. Component / unit (vitest, real Postgres): the CRUD services (create-with-seeded-columns, rename, set-default invariant, delete keeps issues), the guards (last-board 409, promote-default on delete), the one-default schema invariant, and board-scoped read resolution (selected vs default vs cross-tenant 404). E2E (Playwright) tests/e2e/board-crud.spec.ts: create a second board → it appears in the switcher + becomes active with default columns; set group-by/WIP on one board, confirm the other is unaffected; switch boards (URL ?board= + reload persists); set default; delete a non-default board (its issues still show on the remaining board); the last board can’t be deleted. Per-board SETTINGS (3.7.8): from a non-default board, open its “Board settings” (the switcher manage-menu item) → the settings page edits THAT board (its columns / mapping), not the default; an edit on board A’s config leaves board B’s untouched. Reuses the real-Postgres harness + the seeded project.
Acceptance criteria
pnpm testcovers the CRUD services + guards + the one-default invariant + board-scoped read resolution + the per-board settings page resolution (selected vs default vs cross-tenant).pnpm test:e2e --grep board-crudruns green: create/switch/rename/set-default/delete, per-board config isolation, the?board=URL + reload, the last-board guard, AND per-board settings (the manage-menu “Board settings” opens the selected board’s config).- Reuses
tests/helpers/db.tstruncation + the seeded project; no mocks beyondgetSession.
Context refs
tests/e2e/board-ui.spec.ts(3.2.7) + the board projection tests (3.1.7) — the board E2E this builds on; the 3.7.2–3.7.5 surfaces under test;motir-core/CLAUDE.md(real Postgres, no mocks)