2022-01-28 09:42:31 +01:00
|
|
|
import { devices, PlaywrightTestConfig } from '@playwright/test'
|
|
|
|
import path from 'path'
|
|
|
|
|
2022-02-24 11:13:19 +01:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
|
|
require('dotenv').config({
|
|
|
|
path: path.join(__dirname, 'playwright/.env'),
|
|
|
|
})
|
|
|
|
|
2022-01-28 09:42:31 +01:00
|
|
|
const config: PlaywrightTestConfig = {
|
|
|
|
globalSetup: require.resolve(path.join(__dirname, 'playwright/global-setup')),
|
|
|
|
testDir: path.join(__dirname, 'playwright/tests'),
|
2022-02-04 19:00:08 +01:00
|
|
|
retries: process.env.NO_RETRIES ? 0 : 2,
|
2022-02-12 10:12:43 +01:00
|
|
|
workers: process.env.CI ? 1 : 3,
|
2022-01-28 09:42:31 +01:00
|
|
|
reporter: 'html',
|
2022-01-28 09:54:13 +01:00
|
|
|
maxFailures: process.env.CI ? 10 : undefined,
|
2022-01-28 09:42:31 +01:00
|
|
|
use: {
|
|
|
|
actionTimeout: 0,
|
2022-01-28 09:54:13 +01:00
|
|
|
baseURL: process.env.PLAYWRIGHT_BUILDER_TEST_BASE_URL,
|
2022-01-28 09:42:31 +01:00
|
|
|
trace: 'on-first-retry',
|
2022-09-17 16:37:33 +02:00
|
|
|
storageState: path.join(__dirname, 'playwright/firstUser.json'),
|
2022-01-28 09:42:31 +01:00
|
|
|
video: 'retain-on-failure',
|
2022-01-28 17:57:14 +01:00
|
|
|
locale: 'en-US',
|
2022-01-28 09:42:31 +01:00
|
|
|
},
|
|
|
|
outputDir: path.join(__dirname, 'playwright/test-results/'),
|
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: 'Chrome',
|
|
|
|
use: {
|
|
|
|
...devices['Desktop Chrome'],
|
2022-02-02 08:05:02 +01:00
|
|
|
viewport: { width: 1400, height: 1000 },
|
2022-01-28 09:42:31 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
export default config
|