Integration (HTTP e2e) Coverage Tickets — Bridge API

Drafted coverage tickets for the missing HTTP e2e flows. Not yet in the sprint — pending review/approval before being added.

These run in the existing real-stack harness: the real Express app driven over HTTP (supertest) against real MySQL 8 + real Redis 7 (Testcontainers, nothing internal mocked). Only external network boundaries are mocked (Didit, email/validation providers, S3/Bunny). No worker process runs in tests, so anything asynchronous (emails, certificate PDFs, bulk/onboarding jobs) is asserted at the enqueue / PENDING boundary.

Current coverage: only the V-Learning member slice (assignments, planner, lesson progress/gating, certificate read/download) plus health/auth-gate/404. Every other route group below has zero e2e.

Acceptance Criteria convention (all e2e tickets): coverage % is not the yardstick for journey tests. Each ticket's AC is: the listed flows/cases pass end-to-end through HTTP against the real-stack harness; only external boundaries mocked; new tests live in tests/integration/ and self-skip without Docker; all tests pass.


E2E Ticket 1 — Auth lifecycle & sessions

Issue Type: Task

Area: API Integration Tests (HTTP e2e)

Branch: cov/COV-XXX-e2e-auth

Test Root: tests/integration/

Description

Real-stack HTTP coverage for the entire /api/v1/auth/* surface and session management, including the register → verify → login → refresh → logout journey, recovery, and OTP. Email/validation providers mocked at the boundary; activation jobs assert at the "enqueued" boundary (no worker runs).

Files / Scope

tests/integration/http/authHttp.integration.test.ts

Test Cases

Acceptance Criteria

All listed flows pass through HTTP against the real-stack harness (Testcontainers MySQL + Redis); only external boundaries (email/validation providers) mocked. Tests self-skip without Docker. All tests pass.


E2E Ticket 2 — KYC flow & gating

Issue Type: Task

Area: API Integration Tests (HTTP e2e)

Branch: cov/COV-XXX-e2e-kyc

Test Root: tests/integration/

Description

Real-stack coverage for /api/v1/kyc/* and the KYC access gate in verifyToken. Didit provider mocked; the webhook is exercised with a genuine HMAC x-signature over the raw body using a known DIDIT_WEBHOOK_SECRET.

Files / Scope

tests/integration/http/kycHttp.integration.test.ts

Test Cases

Acceptance Criteria

All listed flows pass through HTTP against the real-stack harness; Didit mocked, webhook signature real. Self-skips without Docker. All tests pass.


E2E Ticket 3 — Admin user management & moderation

Issue Type: Task

Area: API Integration Tests (HTTP e2e)

Branch: cov/COV-XXX-e2e-admin-users

Test Root: tests/integration/

Description

Real-stack coverage for admin auth, the requireAdmin/requireRole gates, and the /api/v1/admin/users/* management surface — including the moderation journey and the BR-243 manual inconsistency path.

Files / Scope

tests/integration/http/adminUsersHttp.integration.test.ts

Test Cases

Acceptance Criteria

All listed flows pass through HTTP against the real-stack harness; bulk/email jobs asserted at the enqueue boundary. Self-skips without Docker. All tests pass.


E2E Ticket 4 — Member V-Learning: exam → certificate (+ remaining member surface)

Issue Type: Task

Area: API Integration Tests (HTTP e2e)

Branch: cov/COV-XXX-e2e-member-exam

Test Root: tests/integration/

Description

Extends the existing V-Learning member e2e to the untested member surface: the full exam-to-certificate journey, planner edits, module browsing, and notes. Certificate generation asserts at the PENDING/enqueue boundary (no cert worker runs in tests).

Files / Scope

tests/integration/http/memberExamHttp.integration.test.ts (and extend vlearningHttp.integration.test.ts)

Test Cases

Acceptance Criteria

All listed flows pass through HTTP against the real-stack harness; cert/email async asserted at the enqueue boundary. Self-skips without Docker. All tests pass.


E2E Ticket 5 — Member account: profile, referrals, account lifecycle

Issue Type: Task

Area: API Integration Tests (HTTP e2e)

Branch: cov/COV-XXX-e2e-members-account

Test Root: tests/integration/

Description

Real-stack coverage for /api/v1/users/* — profile, the referral cycle/stats, public lookups, and account cancellation — including the referral registration journey.

Files / Scope

tests/integration/http/membersAccountHttp.integration.test.ts

Test Cases

Acceptance Criteria

All listed flows pass through HTTP against the real-stack harness. Self-skips without Docker. All tests pass.


E2E Ticket 6 — Content lifecycle: news, posts, events

Issue Type: Task

Area: API Integration Tests (HTTP e2e)

Branch: cov/COV-XXX-e2e-content

Test Root: tests/integration/

Description

Real-stack coverage of the publish lifecycle for news, posts, and events across the admin (requireAdminOrPublisher) and public surfaces, plus event registration. (No capacity/sanitization assertions — those aren't implemented.)

Files / Scope

tests/integration/http/contentHttp.integration.test.ts

Test Cases

Acceptance Criteria

All listed flows pass through HTTP against the real-stack harness. Self-skips without Docker. All tests pass.


E2E Ticket 7 — Platform surfaces: settings, files/documents, notifications, onboarding, webhooks

Issue Type: Task

Area: API Integration Tests (HTTP e2e)

Branch: cov/COV-XXX-e2e-platform

Test Root: tests/integration/

Description

Real-stack coverage for the remaining admin/platform surfaces. Storage (S3/Bunny) and email providers mocked at the boundary; bulk/onboarding jobs asserted at the enqueue boundary.

Files / Scope

tests/integration/http/platformHttp.integration.test.ts

Test Cases

Acceptance Criteria

All listed flows pass through HTTP against the real-stack harness; storage/email mocked, jobs asserted at enqueue. Self-skips without Docker. All tests pass.


E2E Ticket 8 — Admin V-Learning authoring (gated)

Issue Type: Task

Area: API Integration Tests (HTTP e2e)

Branch: cov/COV-XXX-e2e-admin-vlearning

Test Root: tests/integration/

Description

Real-stack coverage for the admin V-Learning authoring surface (modules, lessons, exams/questions, categories, announcements, assignments, results). Prerequisite: the admin vLearningController eagerly loads ESM file-type and is currently stubbed out of the e2e harness; this ticket must first make that import test-loadable (lazy/dynamic import or a vitest-compatible shim) so the controller can be driven over HTTP.

Files / Scope

tests/integration/http/adminVlearningHttp.integration.test.ts

Test Cases

Acceptance Criteria

The file-type import is made test-loadable; all listed flows pass through HTTP against the real-stack harness (storage mocked). Self-skips without Docker. All tests pass.