test(e2e): run Playwright against an isolated Compose stand
This commit is contained in:
1 parent
7a5105acc7
commit
4cd7d060bd
23 files changed
+431
-41
No files matched your search
@@ -11,6 +11,7 @@ A React and TypeScript SPA built with Vite and organized using FSD. The interfac
|
||||
- `src/shared/ui/` holds design tokens, fonts, logos, and primitives; `src/shared/config/` holds route paths; `src/shared/api/` holds the API client with generated endpoints, Zod schemas, and MSW mocks.
|
||||
- `codegen/orval.config.ts` configures generation from the shared OpenAPI contract.
|
||||
- `scripts/` checks FSD boundaries and Orval compatibility with the OpenAPI 3.2 fixture.
|
||||
- `e2e/` holds Playwright specs and `playwright.config.ts` configures them; they run only against a Compose stack.
|
||||
|
||||
From the repository root, `make -C frontend dev` starts development and `make -C frontend check` runs checks and builds the app. In Docker, Nginx serves the built files using configuration from `deploy/nginx/`.
|
||||
|
||||
@@ -79,4 +80,6 @@ Accessibility: every shell starts with a skip link to `main`, has landmarks and
|
||||
|
||||
Vitest runs in the Node environment with no DOM library. Routes are rendered through React Router's static handler and checked as HTML: shells, landmarks, the skip link, the active item, redirects, and not-found pages. State tests render components to markup; the query-error test runs the real `QueryClient` with the generated health operation and a stubbed `fetch`. Clicks and focus movement are checked manually in a browser; automated interaction tests need a DOM environment, which is a separate dependency decision.
|
||||
|
||||
Playwright specs in `e2e/` run in a real Chromium against the built frontend and backend: `make -C deploy test-e2e` starts a throwaway Compose stack and runs them in the official Playwright image, so no browser is installed on the host. Vitest excludes `e2e/`; `make -C frontend typecheck` and lint cover the specs. Artifacts of the last run are in `test-results/e2e/`. Details: [TESTING.md](../docs/en/TESTING.md#browser-e2e-suite).
|
||||
|
||||
See the [development guide](../docs/en/DEVELOPMENT.md).
|
||||
Reference in new issue
Block a user