MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-981

2.9.4 [test] E2E — archive → archived view → restore → back in active views

Done
Description

Estimate: 40m · Type: test · Depends on: 2.9.3

E2E + verification (wait on AUTHORITATIVE signals, never optimistic UI):

  • Editor archives a work item (⋯ → Archive) → arm waitForResponse on the archive POST (200) → it leaves the board / issues list.
  • Open the archived view → the archived item is listed.
  • Click Restore → arm waitForResponse on the unarchive DELETE /api/work-items/[id]/archive (200) BEFORE the click → the row leaves the archived view, the item returns to active views, and its detail activity shows "restored" (the unarchived revision).
  • Archive several items → assert the archived view PAGINATES (await the page fetch; no load-everything).
  • Access: a non-editor sees the view per the 2.9.1 decision but has no Restore.

Acceptance criteria

  • Full archive → appears-in-archived-view → restore → back-in-active-views loop passes, waiting on the archive/unarchive responses (not optimistic UI).
  • Pagination + gating asserted. Spec is deterministic (no waitForTimeout); workers:1 shared-DB pin respected.

Context refs

  • tests/e2e/build-in-public-flow.spec.ts / Epic 2 issue-list specs (auth + seed + waitForResponse patterns)
  • motir-core/CLAUDE.md § "E2E tests wait on the AUTHORITATIVE signal"
  • 2.9.3 (the view under test)