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.
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
Pending + kyc_verified=false, activation email enqueued; duplicate email → 400; registration-disabled and referral-only gates; validation failures → 400; DISABLE_EMAIL_VERIFICATION=true → auto-Active.Active + redirect with verified=true; invalid/expired token → error redirect.Pending blocked (200, status pending, no token); Active success (access + refresh token); wrong password → 401; Suspended/Terminated → 401.Active) → login-with-otp (valid/invalid/expired/attempt-limit).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.
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
kycVerified:true; required + already verified short-circuit; required + unverified returns latest verification status (incl. max_declined).not_started/in_progress returns same URL; declined-at-max-retries → blocked; creates a new session (Didit mocked).approved flips kyc_verified=true; declined sets rejection reason; unknown session handled.x-service-key → 401; valid approved flips kyc_verified./kyc/status, /auth/refresh, admin) bypasses; after approval webhook the gated route passes.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.
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
User token on admin route → 403; admin success.status, kycVerified, country, search), soft-deleted exclusion, sort.PUT /users/:id updates fields; setting kycVerified and status independently (documents the BR-243 manual Pending + kyc_verified=true path).Active; invalid status → 400; cannot modify own account.Admin_Removed), cannot delete self, child referrals reassigned.Failed → Pending, kyc_verified reset to false).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.
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
GET /modules/:id/exam; POST .../exam/start creates an attempt; cannot start when ineligible (lessons incomplete / max attempts / cooldown); active-attempt returns the in-flight attempt.POST /exam-attempts/:id/answer saves; submit scores → pass enqueues a PENDING certificate, fail does not; results reflect the score.violation records and (at threshold) auto-finalizes; abandon → abandoned; timed-out attempt → timed_out.PATCH /planner/:id, DELETE /planner/:id.GET /modules, /modules/:id, /current-lesson, lesson notes get/save, resource download, active categories.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.
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
referral/:code (valid / invalid / referral-rule errors); invitation/:code (valid / invalid / expired).referral-cycle list + pagination; CSV export; referrals/stats active-vs-pending counts.referral-cycle/stats reflect the new member; level-up eligibility flips when the circle is full + verified.Self_Removed, sessions revoked, subsequent login blocked.Acceptance Criteria
All listed flows pass through HTTP against the real-stack harness. Self-skips without Docker. All tests pass.
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
GET → publish → present in public list + get-by-id → unpublish → gone; update; delete; role gate (User → 403); validation → 400.GET /events/:id/registrations.register → my-registrations shows it → registration-status → unregister; duplicate registration handled.Acceptance Criteria
All listed flows pass through HTTP against the real-stack harness. Self-skips without Docker. All tests pass.
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
GET; admin create / get-by-key / update / delete / bulk-update; a toggled setting (e.g. KYC-required, registration-disabled) is reflected by the consuming route.upload single + multiple (multer), with the latin1→UTF-8 filename normalization applied to a non-ASCII name; delete; get-url; auth/role gates.upload (validation of good/bad rows) → start → status → retry-email / retry-failed → history / batch details (bulk email enqueued; no worker)./webhook/postmark (+ the two other provider webhooks) update the email-notification record; invalid payload/signature rejected.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.
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
requireAdmin gate.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.