This commit is contained in:
2025-09-18 11:44:12 -06:00
parent a576830ce5
commit cef846fb0b
5 changed files with 241 additions and 37 deletions

View File

@@ -1,4 +1,10 @@
import { defineConfig, devices } from '@playwright/test';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
// ESM-compatible __dirname
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export default defineConfig({
testDir: './tests/e2e',
@@ -11,7 +17,8 @@ export default defineConfig({
trace: 'on-first-retry'
},
webServer: {
command: 'pnpm preview',
// Build then preview to ensure static output exists
command: 'pnpm build && pnpm preview',
cwd: __dirname,
port: 4173,
reuseExistingServer: !process.env.CI