Skip to content

Add testing foundation: Vitest unit tests + Playwright E2E - #8

Merged
pashutk merged 9 commits into
mainfrom
testing-foundation
Apr 1, 2026
Merged

pashutk merged 9 commits into
mainfrom
testing-foundation

Conversation

@pashutk

@pashutk pashutk commented Mar 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds 50 Vitest unit tests across 8 files covering pure math (geometry, leastSquares), localStorage utilities, clipboard, async hooks, and the App component
  • Adds 9 Playwright E2E tests covering all core user flows: canvas interactions, column switching, reset, export, scale calibration, and localStorage persistence
  • Adds 4 visual regression snapshots generated via the official Playwright Docker image for consistent cross-platform rendering

CI

  • Unit tests run on ubuntu-latest via npm test
  • E2E functional and visual tests run inside mcr.microsoft.com/playwright:v1.58.2-noble — same image used to generate snapshots, guaranteeing identical rendering in CI and locally
  • To update snapshots after a UI change: npm run test:e2e:update-snapshots, then commit the result

Test plan

  • npm test — all unit tests pass
  • npm run test:e2e — all E2E tests pass
  • npm run typecheck — no type errors

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

📸 Visual snapshots were updated — please review the image changes and re-run checks.

@pashutk
pashutk merged commit 7708a41 into main Apr 1, 2026
2 checks passed
@pashutk
pashutk deleted the testing-foundation branch April 1, 2026 23:03
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