Skip to content

moooon

Motir

Vibe your whole project. Bring an idea — Motir's three AI layers plan it, track it, and ship it, end to end. You're looking at Motir, built in Motir.

  • Vibe Project
  • Open Source
  • AI Agent
  • AI Loop
1
requests
0
upvotes
145
planned
1,361
shipped

Motir · Work items

MOTIR-180Done

3.3.7 Story tests — swimlane grouping + WIP soft-warning + cross-lane reassign (component + focused E2E)

Estimate: 22m · Depends on: 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6

The closing test subtask for swimlanes + WIP — the same split Stories 3.1.7 / 3.2.7 used: this story ships its OWN component/unit tests + a focused swimlane/WIP E2E, while the cross-cutting Epic-3 journey (drag + WIP + swimlanes AT SCALE) lives in the Epic test story 3.5. The 3.1 API + 3.2 UI are already proven; this proves the 3.3 layer on top.

Component / unit (vitest, real Postgres where DB-touching). The config write services (group-by set, WIP set + clear, invalid-limit reject, cross-workspace deny — may overlap 3.3.3, keep the integration assertions here); the projection lane-grouping (correct swimlaneKey per group-by incl. epic-ancestor, catch-all, per-lane counts, the none no-op, bounded/paged preserved); the over-limit predicate (under/at/over, strictly-greater); the cross-lane reassign reducer (assignee/priority/epic, catch-all clear, diagonal, independent revert); lane render + bucketing + collapse persistence.

E2E (Playwright) tests/e2e/board-swimlanes.spec.ts. Against a freshly seeded project:

  • Group-by — set group-by Assignee → the board re-lays into one lane per assignee-with-cards + a "No assignee" catch-all last; switch to Priority / Epic / None and the layout regroups / flattens.
  • Collapse — collapse a lane → its cards hide, header + count remain; it stays collapsed on reload.
  • Cross-lane reassign — drag a card into another assignee lane → the assignee is reassigned (confirmed via re-fetch/quick-view), status unchanged; drag into "No assignee" → unassigned.
  • WIP soft warning — set a column WIP limit below its card count via the [⋯] menu → the over-limit warning shows (n/limit + icon, not colour-alone); drag another card in → the drop SUCCEEDS (soft) and the warning persists; clear the limit → the warning goes; a column at exactly its limit is not warned.

Defers to Story 3.5: the combined drag + WIP + swimlane journey at scale and the large-data lane/virtualization E2E (this story's scale proof is the 3.3.4/3.3.5 acceptance checks against db:seed:large).

Acceptance criteria

  • pnpm test covers the config writes, the projection lane-grouping (incl. epic-ancestor + catch-all + the none no-op + bounded preservation), the over-limit predicate, the cross-lane reassign reducer (incl. diagonal + independent revert), and lane render/bucketing/collapse.
  • pnpm test:e2e --grep board-swimlanes runs green over the real stack, asserting: group-by re-lay (each dimension + catch-all + flatten), lane collapse persistence, a cross-lane reassign (field changed, status unchanged), and the WIP SOFT warning (over-limit shows, drop still succeeds, clear removes it, at-limit not warned).
  • The E2E reuses the real-Postgres harness (tests/helpers/db.ts truncation) and the seeded project; it does NOT duplicate the at-scale combined journey (Story 3.5).

Context refs

  • tests/e2e/board-ui.spec.ts (Story 3.2.7) — the board UI E2E this builds on (group-by/WIP layer); tests/e2e/board-projection.spec.ts (3.1.7) — the projection E2E precedent
  • tests/helpers/db.ts — real-Postgres truncation; the dnd-kit testing notes for driving keyboard/pointer DnD (incl. cross-lane drops) in Playwright
  • Story 3.5 — the Epic-3 test story this defers the at-scale combined journey to; motir-core/CLAUDE.md — test conventions (real Postgres, no mocks, single getSession mock)