38 lines
852 B
TypeScript
38 lines
852 B
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? 'http://127.0.0.1:8080'
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e',
|
|
timeout: 60_000,
|
|
expect: {
|
|
timeout: 10_000,
|
|
},
|
|
retries: process.env.CI ? 1 : 0,
|
|
forbidOnly: Boolean(process.env.CI),
|
|
reporter: process.env.CI
|
|
? [['dot'], ['html', { open: 'never' }]]
|
|
: [['list']],
|
|
outputDir: 'test-results/playwright',
|
|
use: {
|
|
baseURL,
|
|
trace: 'retain-on-failure',
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure',
|
|
},
|
|
webServer: {
|
|
command: 'npm run dev -- --host 127.0.0.1',
|
|
url: baseURL,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120_000,
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium-smoke',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
},
|
|
},
|
|
],
|
|
})
|