test: Phase 1 founder+teammate journey walkthrough + RFC 7807 assertions (task 1.9, NFR-09) #68

Merged
amiryahaya merged 1 commit from feat/1.9-phase1-journey-tests into main 2026-11-06 02:18:11 +01:00
Owner

Closes #24 — task 1.9 integration tests for the Phase 1 surface.

What lands (new file Phase1JourneyTests.cs — zero overlap with the task-1.8 test files, so it merges clean on top of #67):

  • Founder_Teammate_Journey_FlagsOff_Passes — the full pipeline as one sequential test: org request (state flip Pending) → admin approval (Active + TenantId + Owner membership) → email invitation → teammate registers via email+OTP with the invite token → unified provisioning (INV-02 grant, invitation Accepted) → device enrollment → key wrap upload/list (KEY-03) → pairing init/approve → 2 wraps after pairing → revoke-unknown-device 404 → audit-trail presence checks for the whole journey (Contains, not counts).
  • Journey_ErrorBranches_ReturnRfc7807ProblemDetails — duplicate org request 409, double-approve 409, unknown-request approve 404, in-org request 403 — each asserted for RFC 7807 shape (type/title/status + AppError's errorType extension).

Flags note (documented in the class doc): dev plan §1 flags (Auth:IdpEnabled, Web:Enabled, Keys:DeviceWraps) are Phase 2+ gates that don't exist in the codebase yet, so "flags off AND on" is trivially satisfied by current config; flag-gated walkthrough variants land with Phase 2. The founder is seeded as Active-without-workspace — the exact state a Phase 2 IdP-JIT user arrives in; every subsequent step is a real API call.

Suite 800/0/39 Release ×3; coverage gate 83.07% ≥ 80.

Closes #24 — task 1.9 integration tests for the Phase 1 surface. **What lands** (new file `Phase1JourneyTests.cs` — zero overlap with the task-1.8 test files, so it merges clean on top of #67): - `Founder_Teammate_Journey_FlagsOff_Passes` — the full pipeline as one sequential test: org request (state flip Pending) → admin approval (Active + TenantId + Owner membership) → email invitation → teammate registers via email+OTP with the invite token → unified provisioning (INV-02 grant, invitation Accepted) → device enrollment → key wrap upload/list (KEY-03) → pairing init/approve → 2 wraps after pairing → revoke-unknown-device 404 → audit-trail presence checks for the whole journey (Contains, not counts). - `Journey_ErrorBranches_ReturnRfc7807ProblemDetails` — duplicate org request 409, double-approve 409, unknown-request approve 404, in-org request 403 — each asserted for RFC 7807 shape (type/title/status + AppError's `errorType` extension). **Flags note** (documented in the class doc): dev plan §1 flags (Auth:IdpEnabled, Web:Enabled, Keys:DeviceWraps) are Phase 2+ gates that don't exist in the codebase yet, so "flags off AND on" is trivially satisfied by current config; flag-gated walkthrough variants land with Phase 2. The founder is seeded as Active-without-workspace — the exact state a Phase 2 IdP-JIT user arrives in; every subsequent step is a real API call. Suite 800/0/39 Release ×3; coverage gate 83.07% ≥ 80.
Closes #24
Sign in to join this conversation.
No description provided.