This guide defines the required visual UI testing workflow for Wavecraft using the VS Code integrated browser (Simple Browser).
For any UI/visual change, screenshot-based in-app checks are required before testing sign-off.
Required policy:
- Run the app in dev mode via
cargo xtask dev - Open
http://localhost:5173in VS Code Simple Browser - Capture screenshots of changed UI states
- Record screenshot evidence paths/references in
test-plan.md
- VS Code workspace opened at repository root
- Dev servers available via
cargo xtask dev - A feature
test-plan.mdready to store evidence
-
Start dev servers:
cargo xtask dev
-
Open the app in VS Code integrated browser (Simple Browser):
- Open Command Palette
- Run Simple Browser: Show
- Enter:
http://localhost:5173
-
Validate changed UI in-app:
- Verify updated states, interactions, and layout in the integrated browser
- Check at least the states directly affected by the change
-
Capture screenshot evidence (required):
- Capture screenshots for each changed/verified state
- Save screenshots to a reproducible local path (for example
artifacts/visual-testing/...) - Add evidence references to
docs/feature-specs/{feature}/test-plan.md
-
Stop dev servers after testing:
pkill -f "cargo xtask dev"
For each UI/visual change, include:
- At least one screenshot for the default/steady state
- Screenshots for each changed visual state (e.g. hover/focus/active/disabled/error)
- For responsive/layout work, screenshots at relevant sizes
- A short pass/fail note for each captured state in
test-plan.md
Use a compact table per visual test case:
| Case | State | Result | Screenshot Evidence |
|---|---|---|---|
| VT-001 | Default | ✅ PASS | artifacts/visual-testing/VT-001-default.png |
| VT-002 | Focus ring visible | ✅ PASS | artifacts/visual-testing/VT-002-focus.png |
| VT-003 | Disabled button style | ❌ FAIL | artifacts/visual-testing/VT-003-disabled.png |
Wavecraft UI components expose data-testid attributes for stable targeting and verification.
Examples:
app-rootmeter,meter-L,meter-Rparam-{id},param-{id}-sliderversion-badgeconnection-status
Use these IDs to guide what you validate and capture in screenshots.
- Verify
cargo xtask devis running - Check for port conflicts on
5173and9000 - Restart dev servers
- Confirm WebSocket server started by
cargo xtask dev - Check terminal logs for startup errors
- Testing is not complete until screenshot references are recorded in
test-plan.md