diff --git a/.planning/phases/09-testing-qa/09-VALIDATION.md b/.planning/phases/09-testing-qa/09-VALIDATION.md new file mode 100644 index 0000000..4fc24ff --- /dev/null +++ b/.planning/phases/09-testing-qa/09-VALIDATION.md @@ -0,0 +1,78 @@ +--- +phase: 9 +slug: testing-qa +status: draft +nyquist_compliant: false +wave_0_complete: false +created: 2026-03-26 +--- + +# Phase 9 — Validation Strategy + +> Per-phase validation contract for feedback sampling during execution. + +--- + +## Test Infrastructure + +| Property | Value | +|----------|-------| +| **Framework** | Playwright + @axe-core/playwright + @lhci/cli | +| **Config file** | `packages/portal/playwright.config.ts` | +| **Quick run command** | `cd packages/portal && npx playwright test --project=chromium` | +| **Full suite command** | `cd packages/portal && npx playwright test` | +| **Estimated runtime** | ~3 minutes | + +--- + +## Sampling Rate + +- **After every task commit:** Run `npx playwright test --project=chromium` (quick) +- **After every plan wave:** Run full suite (all browsers) +- **Before `/gsd:verify-work`:** Full suite green + Lighthouse scores passing +- **Max feedback latency:** 60 seconds (single browser) + +--- + +## Per-Task Verification Map + +| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status | +|---------|------|------|-------------|-----------|-------------------|-------------|--------| +| 09-xx | 01 | 1 | QA-01 | e2e | `npx playwright test` | ❌ W0 | ⬜ pending | +| 09-xx | 02 | 1 | QA-02 | lighthouse | `npx lhci autorun` | ❌ W0 | ⬜ pending | +| 09-xx | 02 | 1 | QA-03 | visual | `npx playwright test --update-snapshots` | ❌ W0 | ⬜ pending | +| 09-xx | 02 | 1 | QA-04 | a11y | `npx playwright test` (axe checks) | ❌ W0 | ⬜ pending | +| 09-xx | 01 | 1 | QA-05 | cross-browser | `npx playwright test` (3 projects) | ❌ W0 | ⬜ pending | +| 09-xx | 01 | 1 | QA-06 | e2e | `npx playwright test` (state tests) | ❌ W0 | ⬜ pending | +| 09-xx | 03 | 2 | QA-07 | ci | Gitea Actions pipeline | ❌ W0 | ⬜ pending | + +--- + +## Wave 0 Requirements + +- [ ] `npm install -D @playwright/test @axe-core/playwright @lhci/cli` +- [ ] `npx playwright install` (browser binaries) +- [ ] `packages/portal/playwright.config.ts` — Playwright configuration +- [ ] `packages/portal/e2e/` — test directory structure + +--- + +## Manual-Only Verifications + +| Behavior | Requirement | Why Manual | Test Instructions | +|----------|-------------|------------|-------------------| +| CI pipeline runs on push to main | QA-07 | Requires Gitea runner | Push a commit, verify pipeline starts and completes | +| Visual regression diffs reviewed | QA-03 | Human judgment on acceptable diffs | Review Playwright HTML report after baseline update | + +--- + +## Validation Sign-Off + +- [ ] All tasks have `` 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 < 60s +- [ ] `nyquist_compliant: true` set in frontmatter + +**Approval:** pending