From 459892f31fa5234e8048f30e626c29690d0a2310 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Sat, 16 May 2026 21:39:11 +0200 Subject: [PATCH] =?UTF-8?q?docs(15-01):=20complete=20Wave=200=20test=20stu?= =?UTF-8?q?bs=20plan=20=E2=80=94=20DASH-01/02/03=20RED=20baseline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../15-dashboard-tablos/15-01-SUMMARY.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .planning/phases/15-dashboard-tablos/15-01-SUMMARY.md diff --git a/.planning/phases/15-dashboard-tablos/15-01-SUMMARY.md b/.planning/phases/15-dashboard-tablos/15-01-SUMMARY.md new file mode 100644 index 0000000..8724d3f --- /dev/null +++ b/.planning/phases/15-dashboard-tablos/15-01-SUMMARY.md @@ -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