Files
faunosteo/apps/app/e2e/playwright.ui.config.ts
T
bchanot 2cdee42fe1 test(tests): working-copy dialog checks independent of the shared slot
admin.spec opened the working-copy dialog on the historical sheet, whose
single slot was taken by a copy the sandbox suite leaked. The dialog checks
move to an e2e:ui page on the real component; the suite archives its own copies.
2026-11-12 17:06:42 +01:00

42 lines
1.4 KiB
TypeScript

/**
* `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 and working-copy test pages, the local tool and the canvas click proof (also on
* Firefox and WebKit when installed). docs/development/BROWSER_TESTS.md.
*/
import { defineConfig } from '@playwright/test'
import type { GuardOptions } from './support/browser'
import { CLICK_PROJECTS, 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, ...CLICK_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: '' },
},
})