import { defineConfig } from '@playwright/test'; import { fileURLToPath } from 'node:url'; import path from 'node:path'; const workspaceDir = path.dirname(fileURLToPath(import.meta.url)); const repoRoot = path.resolve(workspaceDir, '..', '..'); export default defineConfig({ testDir: './e2e', timeout: 15_000, expect: { timeout: 5_000 }, fullyParallel: false, workers: 1, reporter: 'line', use: { baseURL: 'http://127.0.0.1:4173', browserName: 'chromium', headless: true, launchOptions: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH ? { executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH } : undefined }, webServer: [ { command: `HOST=127.0.0.1 PORT=3001 npm run start --workspace vela-gateway --prefix "${repoRoot}"`, url: 'http://127.0.0.1:3001/health', reuseExistingServer: true, timeout: 15_000 }, { command: `VITE_VELA_GATEWAY_WS_URL=ws://127.0.0.1:3001/ws npm run dev --workspace vela-ui --prefix "${repoRoot}" -- --host 127.0.0.1 --port 4173`, url: 'http://127.0.0.1:4173', reuseExistingServer: true, timeout: 15_000 } ] });