mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
Playwright E2E suite (not working yet)
This commit is contained in:
parent
f534cd79b7
commit
68050b56bc
13 changed files with 425 additions and 16 deletions
28
webclient/e2e/playwright.config.ts
Normal file
28
webclient/e2e/playwright.config.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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'] } }],
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue