test(app): Playwright and axe browser suite on Chromium (D14)
@playwright/test 1.64.1 and @axe-core/playwright 4.14.0, dev only and pinned. pnpm e2e:ui runs a Vite server of its own on 127.0.0.1:5191 with no backend: the Dialog contract on a dev-only test page and the local tool's dialogs, desktop and 375 px, FR and EN, axe at zero serious violation outside one listed pre-existing finding. Requests outside the allowlist are aborted and fail the test.
This commit is contained in:
1 parent
6f885eccb2
commit
72ee9f9971
11 files changed
+740
-3
No files matched your search
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* `pnpm e2e:ui`: Chromium against a Vite dev server with no backend, on a
|
||||
* loopback port of its own (never the owner's `pnpm dev` on 5173, never
|
||||
* reused): the Dialog test page and the local tool. docs/development/BROWSER_TESTS.md.
|
||||
*/
|
||||
import { defineConfig } from '@playwright/test'
|
||||
import type { GuardOptions } from './support/browser'
|
||||
import { PROJECTS } from './support/browser'
|
||||
|
||||
const ORIGIN = 'http://127.0.0.1:5191'
|
||||
|
||||
export default defineConfig<GuardOptions>({
|
||||
testDir: './ui',
|
||||
// The local tool runs the core: a missing or stale module stops the run (pnpm wasm:build).
|
||||
globalSetup: '../../../packages/core-wasm/tests/global-setup.ts',
|
||||
outputDir: './test-results/ui',
|
||||
fullyParallel: true,
|
||||
forbidOnly: true,
|
||||
retries: 0,
|
||||
reporter: [
|
||||
['list'],
|
||||
['html', { outputFolder: './playwright-report/ui', open: 'never' }],
|
||||
],
|
||||
use: {
|
||||
baseURL: ORIGIN,
|
||||
allowedOrigins: [ORIGIN],
|
||||
trace: 'retain-on-failure',
|
||||
screenshot: 'only-on-failure',
|
||||
},
|
||||
projects: PROJECTS,
|
||||
webServer: {
|
||||
command: 'node_modules/.bin/vite --host 127.0.0.1 --port 5191 --strictPort',
|
||||
cwd: '..',
|
||||
url: `${ORIGIN}/`,
|
||||
reuseExistingServer: false,
|
||||
timeout: 120_000,
|
||||
// No backend: an empty connection keeps any .env value out of this server.
|
||||
env: { VITE_SUPABASE_URL: '', VITE_SUPABASE_ANON_KEY: '' },
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user