2021-11-30 00:34:47 +00:00
|
|
|
/* eslint-disable no-undef */
|
|
|
|
// playwright.config.js
|
|
|
|
// @ts-check
|
|
|
|
|
|
|
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
|
|
const config = {
|
2022-05-20 22:11:32 +00:00
|
|
|
retries: 0, // visual tests should never retry due to snapshot comparison errors
|
|
|
|
testDir: 'tests/visual',
|
2021-11-30 00:34:47 +00:00
|
|
|
timeout: 90 * 1000,
|
2022-05-20 22:11:32 +00:00
|
|
|
workers: 1, // visual tests should never run in parallel due to test pollution
|
2021-11-30 00:34:47 +00:00
|
|
|
webServer: {
|
|
|
|
command: 'npm run start',
|
2022-06-30 18:50:47 +00:00
|
|
|
url: 'http://localhost:8080/#',
|
2021-11-30 00:34:47 +00:00
|
|
|
timeout: 200 * 1000,
|
|
|
|
reuseExistingServer: !process.env.CI
|
|
|
|
},
|
|
|
|
use: {
|
|
|
|
browserName: "chromium",
|
|
|
|
baseURL: 'http://localhost:8080/',
|
2022-05-20 22:11:32 +00:00
|
|
|
headless: true, // this needs to remain headless to avoid visual changes due to GPU
|
2021-11-30 00:34:47 +00:00
|
|
|
ignoreHTTPSErrors: true,
|
|
|
|
screenshot: 'on',
|
|
|
|
trace: 'off',
|
|
|
|
video: 'on'
|
|
|
|
},
|
|
|
|
reporter: [
|
|
|
|
['list'],
|
2022-05-20 22:11:32 +00:00
|
|
|
['junit', { outputFile: 'test-results/results.xml' }]
|
2021-11-30 00:34:47 +00:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|