2
0
Files
bot/apps/builder/playwright.config.ts

36 lines
1.0 KiB
TypeScript
Raw Normal View History

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'),
})
const config: PlaywrightTestConfig = {
globalSetup: require.resolve(path.join(__dirname, 'playwright/global-setup')),
testDir: path.join(__dirname, 'playwright/tests'),
retries: process.env.NO_RETRIES ? 0 : 2,
workers: process.env.CI ? 1 : 3,
reporter: 'html',
maxFailures: process.env.CI ? 10 : undefined,
use: {
actionTimeout: 0,
baseURL: process.env.PLAYWRIGHT_BUILDER_TEST_BASE_URL,
trace: 'on-first-retry',
storageState: path.join(__dirname, 'playwright/firstUser.json'),
video: 'retain-on-failure',
2022-01-28 17:57:14 +01:00
locale: 'en-US',
},
outputDir: path.join(__dirname, 'playwright/test-results/'),
projects: [
{
name: 'Chrome',
use: {
...devices['Desktop Chrome'],
viewport: { width: 1400, height: 1000 },
},
},
],
}
export default config