docs(15-01): complete Wave 0 test stubs plan — DASH-01/02/03 RED baseline

This commit is contained in:
Arthur Belleville 2026-05-16 21:39:11 +02:00
parent 7bea525c1b
commit 459892f31f
No known key found for this signature in database

View file

@ -0,0 +1,69 @@
---
phase: 15-dashboard-tablos
plan: "01"
subsystem: backend/web/tests
tags: [tdd, wave-0, testing, dashboard]
dependency_graph:
requires: []
provides: [DASH-01-test, DASH-02-test, DASH-03-test]
affects: [backend/internal/web/handlers_tablos_test.go]
tech_stack:
added: []
patterns: [httptest, setupTestDB skip pattern, store.Create session pattern]
key_files:
created: []
modified:
- backend/internal/web/handlers_tablos_test.go
decisions:
- "setupTestDB skip pattern reused directly — no additional TEST_DATABASE_URL guard needed in test bodies since setupTestDB calls t.Skip internally"
- "store.Create used for session injection (not loginUser) to avoid CSRF round-trip complexity"
- "InsertTablo called directly via sqlc for tablo pre-insertion (no separate helper exists)"
metrics:
duration: ~5min
completed: "2026-05-16"
tasks_completed: 1
files_modified: 1
---
# Phase 15 Plan 01: Wave 0 RED Test Stubs Summary
Three failing integration test stubs added to handlers_tablos_test.go for DASH-01 (sidebar), DASH-02 (project cards), and DASH-03 (empty state). Tests compile cleanly and skip without TEST_DATABASE_URL. They will turn RED when a DB is wired and AppLayout is not yet implemented — that is the expected Wave 0 state.
## Tasks Completed
| Task | Name | Commit | Files |
|------|------|--------|-------|
| 1 | Add Wave 0 RED test stubs for DASH-01, DASH-02, DASH-03 | 7bea525 | backend/internal/web/handlers_tablos_test.go |
## Acceptance Criteria Verification
- `go build ./internal/web/...` exits 0: PASSED
- `grep -c "func TestTablosDashboard_Sidebar"` returns 1: PASSED
- `grep -c "func TestTablosDashboard_ProjectCards"` returns 1: PASSED
- `grep -c "func TestTablosDashboard_EmptyState"` returns 1: PASSED
- Tests skip without TEST_DATABASE_URL: PASSED (all three show SKIP)
- Existing TestTablos* tests pass: PASSED
## Test Behaviors (RED)
- **TestTablosDashboard_Sidebar**: GET / with session → asserts `strings.Contains(body, "dashboard-sidebar")` and `strings.Contains(body, "sidebar-nav-shell")`
- **TestTablosDashboard_ProjectCards**: GET / with one pre-inserted tablo → asserts `strings.Contains(body, "project-card")`
- **TestTablosDashboard_EmptyState**: GET / with zero tablos → asserts `strings.Contains(body, "ui-empty-state")`
## Deviations from Plan
None — plan executed exactly as written.
## Known Stubs
None — this plan adds tests only, no implementation stubs.
## Threat Flags
None — test-only changes; no new network surface.
## Self-Check: PASSED
- File exists: backend/internal/web/handlers_tablos_test.go — FOUND
- Commit 7bea525 exists in git log — FOUND
- All three test functions present and compile cleanly — VERIFIED