28 lines
820 B
TypeScript
28 lines
820 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: 'tests/e2e',
|
|
timeout: 60_000,
|
|
expect: { timeout: 10_000 },
|
|
fullyParallel: true,
|
|
retries: process.env.CI ? 2 : 0,
|
|
reporter: [['list'], ['html', { open: 'never' }]],
|
|
use: {
|
|
baseURL: 'http://localhost:3000',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure'
|
|
},
|
|
webServer: {
|
|
command: 'npm run preview',
|
|
url: 'http://localhost:3000',
|
|
reuseExistingServer: !process.env.CI
|
|
},
|
|
projects: [
|
|
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
|
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
|
|
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
|
|
{ name: 'mobile', use: { ...devices['iPhone 13'] } }
|
|
]
|
|
});
|