Sangeetha-Grantha

Metadata Value
Status Completed
Version 2.0.0
Last Updated 2026-07-09
Author Sangeetha Grantha Team
Priority P2
Epic TRACK-109 (W2 Quality)
Decisions D13 (decision log)
Depends on TRACK-111 (CI must exist first)

TRACK-118: Frontend Component Tests (Vitest)

Goal

Component tests on the most business-critical UI, kept off the backend critical path. Estimated ~1 week. Deliberately scheduled after CI exists (TRACK-111) so it does not dilute the backend foundation.

Context

North-star N3: zero frontend tests across 113 TS/TSX files, including the 688-line CuratorReviewPage.tsx and 857-line BulkImport.tsx — the most business-critical UI in the system.

Implementation Plan

Baseline delivered (2026-06-24)

Purpose: give TRACK-121 a green vitest run + bun run lint to upgrade against (was red on both).

Remaining (the substantive N3 work)

Component coverage for CuratorReviewPage.tsx / BulkImport.tsx + decomposition, and CI wiring — the ~1-week effort this track was originally scoped for — is still open.

Preparation survey (2026-07-09)

Codebase facts that shape the work:

Execution plan

Guardrails: extract-then-test each unit so page tests stay thin integration tests; new code adds zero lint warnings (189 tolerated pre-existing); keep Vitest collection scoped to src/**.

Acceptance Criteria

Close-out (2026-07-09)

All four execution-plan steps delivered (infra, CI wiring, pure units, both pages + decomposition). Suite grew 0 → 55 tests / 8 files; vitest run gates every PR. Frontend lint went 189 → 186 warnings via dead-code removal along the way. Follow-on candidates (out of scope, not blocking): component coverage for the remaining sourcing pages, and E2E revival under TRACK-113.

References