test: add a browser Vitest project for interactive components

Run *.browser.test.tsx in headless Chromium through the Playwright
provider. The shared helper in tests/browser/ mounts the app's own
providers, stubs only the fetch boundary, and shims next/navigation
onto the page's real location and history.
This commit is contained in:
Marc-André Bombeck committed 2026-10-23 12:50:42 +02:00
1 parent 3eb5aa9364
commit 3d1692204b
9 files changed
+736 -32

No files matched your search

+3 -1
View File
@@ -120,6 +120,7 @@
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@types/web-push": "^3.6.4",
"@vitest/browser-playwright": "^5.0.5",
"@vitest/coverage-v8": "^5.0.5",
"ajv": "^8.20.0",
"eslint": "^9",
@@ -136,6 +137,7 @@
"testcontainers": "^12.2.1",
"tw-animate-css": "^1.4.0",
"typescript": "^6",
"vitest": "^5.0.5"
"vitest": "^5.0.5",
"vitest-browser-react": "^2.3.0"
}
}