Skip to content

feat(ui): add Playwright e2e smoke tests with UI-scoped CI#57

Merged
aksOps merged 1 commit intomainfrom
feat/ui-e2e-playwright
Apr 23, 2026
Merged

feat(ui): add Playwright e2e smoke tests with UI-scoped CI#57
aksOps merged 1 commit intomainfrom
feat/ui-e2e-playwright

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented Apr 23, 2026

Summary

  • 5 Chromium smoke tests for critical UX paths: shell render, Cmd/Ctrl+K palette, palette nav, chord hotkey `g,g`, theme toggle persistence
  • New CI job `playwright` that only runs when PRs touch `ui/**` (or the workflow itself)
  • Backend stubs anchored to pathname start (`^/api/`, `^/mcp/`) so Vite dev modules under `src/hooks/api/**` stay untouched

Why

Component tests in jsdom don't catch real browser issues (layout, keyboard, service worker, reduced-motion). A lean Playwright smoke suite guards the hot UX paths without slowing down Go-only PRs.

Notes

  • Chromium only for now — add firefox/webkit later if trust budget warrants the minutes
  • Browser cache keyed on Playwright version → zero download cost on unchanged installs
  • Vitest excludes `e2e/**` to keep the suites disjoint
  • Dedicated `tsconfig.e2e.json` gives editors correct types without polluting the app build

Test plan

🤖 Generated with Claude Code

5 Chromium smoke tests covering the critical UX paths:
- Shell + main landmark renders on home
- Cmd/Ctrl+K opens the command palette, Escape closes it
- Palette navigates to Documents
- Chord hotkey `g,g` navigates to Graph
- Theme toggle to Light persists across reload

API calls are stubbed at the pathname boundary (`^/api/`, `^/mcp/`) so
Vite's dev module requests under `src/hooks/api/**` are not intercepted
— earlier attempts caught those as JSON and Chromium rejected the module
scripts.

CI workflow `.github/workflows/playwright.yml`:
- Triggers only on PRs (and main pushes) that touch `ui/**` or the
  workflow itself — Go-only PRs stay fast.
- Chromium only, browser cache keyed on Playwright version.
- Uploads playwright-report artifact + failure traces.

Vitest excludes `e2e/**` to keep the two suites disjoint; tsconfig.e2e.json
references give the editor proper types without polluting the app build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aksOps aksOps enabled auto-merge (squash) April 23, 2026 10:40
@aksOps aksOps merged commit b7b5750 into main Apr 23, 2026
12 checks passed
@aksOps aksOps deleted the feat/ui-e2e-playwright branch April 23, 2026 10:45
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