Cockatrice/webclient/e2e/playwright.config.ts
2026-05-07 09:56:05 -05:00

28 lines
940 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './specs',
fullyParallel: true,
workers: 2,
timeout: 60_000,
expect: { timeout: 15_000 },
reporter: [['list'], ['html', { outputFolder: '../coverage/e2e', open: 'never' }]],
globalSetup: './global-setup.ts',
use: {
baseURL: 'http://localhost:5173',
headless: true,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
webServer: {
// Run from the webclient root so Vite picks up its own vite.config.ts and
// `prestart` proto generation. Specs point the app at local servatrice by
// seeding IndexedDB via helpers/seedLocalHost.ts — no source changes needed.
command: 'npm run start',
cwd: '..',
url: 'http://localhost:5173',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
});