Skip to content

feat: add E2E test coverage for visualization page - #197

Merged
cdtinney merged 2 commits into
masterfrom
feat/e2e-test-coverage
Apr 18, 2026
Merged

cdtinney merged 2 commits into
masterfrom
feat/e2e-test-coverage

Conversation

@cdtinney

Copy link
Copy Markdown
Owner

Summary

  • Add Playwright tests with mocked API responses (page.route()) covering all visualization states:
    • Song playing: song card, album grid, progress bar, user avatar, GitHub icon
    • No song playing: empty message, no playback UI rendered
    • Error state: error overlay with reconnect button after consecutive failures
    • Background: gradient overlay, darken layer, bottom gradient
  • Add e2e/fixtures.ts with reusable mock helpers for auth, playback, related albums, and SSE
  • Add webServer config to playwright.config.ts so Vite starts automatically
  • Consolidate existing app.spec.ts to use shared mock helpers

Coverage: 3 existing tests + 4 new visualization tests = 7 total E2E tests

Test plan

  • pnpm test:e2e — all 7 tests pass

🤖 Generated with Claude Code

cdtinney and others added 2 commits April 18, 2026 16:11
Add Playwright tests with mocked API responses covering:
- Song playing state (song card, album grid, progress bar, user controls)
- No song playing state (empty message, no playback UI)
- Error state (error overlay with reconnect button)
- Background layers (gradient, darken, bottom gradient)

Also:
- Add e2e/fixtures.ts with reusable mock helpers for auth, playback,
  related albums, and SSE routes
- Add webServer config to playwright.config.ts for auto-starting Vite
- Consolidate existing app.spec.ts to use shared mock helpers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add data-testid attributes to SongCard, AlbumGrid, ProgressBar,
  CoverOverlay, and VisualizationContent elements
- Replace CSS class selectors with page.getByTestId() in tests
- Add mockEmptyVisualization helper to reduce boilerplate

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cdtinney
cdtinney force-pushed the feat/e2e-test-coverage branch from d53c01f to 2aa2323 Compare April 18, 2026 23:12
@cdtinney
cdtinney marked this pull request as ready for review April 18, 2026 23:13
@cdtinney
cdtinney merged commit 8af51f3 into master Apr 18, 2026
5 checks passed
@cdtinney
cdtinney deleted the feat/e2e-test-coverage branch April 29, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant