Files
SimpleFinanceDash/.planning/phases/04-chart-polish-and-bug-fixes/04-VALIDATION.md

79 lines
3.1 KiB
Markdown

---
phase: 4
slug: chart-polish-and-bug-fixes
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-12
---
# Phase 4 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|
| **Framework** | Vitest (configured in `vite.config.ts`) |
| **Config file** | `frontend/vite.config.ts``test` block with `environment: 'jsdom'`, `setupFiles: ['./src/test-setup.ts']` |
| **Quick run command** | `cd frontend && bun vitest run src/lib/format.test.ts` |
| **Full suite command** | `cd frontend && bun vitest run` |
| **Estimated runtime** | ~5 seconds |
---
## Sampling Rate
- **After every task commit:** Run `cd frontend && bun vitest run src/lib/format.test.ts`
- **After every plan wave:** Run `cd frontend && bun vitest run`
- **Before `/gsd:verify-work`:** Full suite must be green
- **Max feedback latency:** 5 seconds
---
## Per-Task Verification Map
| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 04-01-01 | 01 | 1 | FIX-01 | unit | `cd frontend && bun vitest run src/lib/format.test.ts` | ❌ W0 | ⬜ pending |
| 04-01-02 | 01 | 1 | FIX-01 | unit | `cd frontend && bun vitest run src/lib/format.test.ts` | ❌ W0 | ⬜ pending |
| 04-02-01 | 02 | 1 | IXTN-04 | unit | `cd frontend && bun vitest run src/components/ExpenseBreakdown.test.tsx` | ❌ W0 | ⬜ pending |
| 04-02-02 | 02 | 1 | IXTN-04 | unit | `cd frontend && bun vitest run src/components/AvailableBalance.test.tsx` | ❌ W0 | ⬜ pending |
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
---
## Wave 0 Requirements
- [ ] `frontend/src/lib/format.test.ts` — unit tests for FIX-01 locale parameter and default behavior
- [ ] `frontend/src/components/ExpenseBreakdown.test.tsx` — IXTN-04 tooltip formatter unit tests
- [ ] `frontend/src/components/AvailableBalance.test.tsx` — IXTN-04 tooltip formatter unit tests on donut
*Note: Recharts tooltip tests should test the formatter function directly rather than simulating hover events (jsdom does not simulate SVG pointer events reliably).*
---
## Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| Tooltip visually appears on chart hover | IXTN-04 | jsdom cannot simulate SVG pointer events | Hover over donut slices in ExpenseBreakdown and AvailableBalance; verify currency-formatted tooltip appears |
| Center text in AvailableBalance updates locale | FIX-01 | Visual verification of formatted output | Switch user locale to 'en', verify center text shows `$1,234.56` format; switch to 'de', verify `1.234,56 €` |
---
## Validation Sign-Off
- [ ] All tasks have `<automated>` verify or Wave 0 dependencies
- [ ] Sampling continuity: no 3 consecutive tasks without automated verify
- [ ] Wave 0 covers all MISSING references
- [ ] No watch-mode flags
- [ ] Feedback latency < 5s
- [ ] `nyquist_compliant: true` set in frontmatter
**Approval:** pending