37 lines
773 B
TypeScript
37 lines
773 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
const PORT = 5173;
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: process.env.CI ? 'github' : 'list',
|
|
timeout: 30_000,
|
|
expect: {
|
|
timeout: 10_000,
|
|
},
|
|
|
|
use: {
|
|
baseURL: `http://localhost:${PORT}`,
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
|
|
webServer: {
|
|
command: 'pnpm --filter @react-scan/kitchen-sink dev',
|
|
url: `http://localhost:${PORT}`,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 30_000,
|
|
},
|
|
});
|