27 lines
867 B
TypeScript
27 lines
867 B
TypeScript
import { defineConfig } from '@playwright/test'
|
|
import path from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
const filename = fileURLToPath(import.meta.url)
|
|
const dirname = path.dirname(filename)
|
|
|
|
export const EXPECT_TIMEOUT = 45000
|
|
export const POLL_TOPASS_TIMEOUT = EXPECT_TIMEOUT * 4 // That way expect.poll() or expect().toPass can retry 4 times. 4x higher than default expect timeout => can retry 4 times if retryable expects are used inside
|
|
|
|
export default defineConfig({
|
|
// Look for test files in the "test" directory, relative to this configuration file
|
|
testDir: '',
|
|
testMatch: '*e2e.spec.ts',
|
|
timeout: 240000, // 4 minutes
|
|
use: {
|
|
screenshot: 'only-on-failure',
|
|
trace: 'retain-on-failure',
|
|
video: 'retain-on-failure',
|
|
},
|
|
globalSetup: path.resolve(dirname, 'setup.ts'),
|
|
expect: {
|
|
timeout: EXPECT_TIMEOUT,
|
|
},
|
|
workers: 16,
|
|
})
|