/** * `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({ 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: '' }, }, })