2021-11-30 00:34:47 +00:00
|
|
|
/* eslint-disable no-undef */
|
|
|
|
// playwright.config.js
|
|
|
|
// @ts-check
|
|
|
|
|
2022-05-19 23:09:22 +00:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
2022-01-14 22:47:35 +00:00
|
|
|
const { devices } = require('@playwright/test');
|
|
|
|
|
2021-11-30 00:34:47 +00:00
|
|
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
|
|
const config = {
|
2022-05-04 16:15:39 +00:00
|
|
|
retries: 1,
|
2021-11-30 00:34:47 +00:00
|
|
|
testDir: 'tests',
|
2022-05-25 22:45:11 +00:00
|
|
|
testIgnore: '**/*.perf.spec.js', //Ignore performance tests and define in playwright-perfromance.config.js
|
2022-05-04 16:15:39 +00:00
|
|
|
timeout: 60 * 1000,
|
2021-11-30 00:34:47 +00:00
|
|
|
webServer: {
|
|
|
|
command: 'npm run start',
|
|
|
|
port: 8080,
|
|
|
|
timeout: 200 * 1000,
|
|
|
|
reuseExistingServer: !process.env.CI
|
|
|
|
},
|
2022-05-25 22:45:11 +00:00
|
|
|
maxFailures: process.env.CI ? 5 : undefined, //Limits failures to 5 to reduce CI Waste
|
2022-01-05 17:57:25 +00:00
|
|
|
workers: 2, //Limit to 2 for CircleCI Agent
|
2021-11-30 00:34:47 +00:00
|
|
|
use: {
|
|
|
|
baseURL: 'http://localhost:8080/',
|
|
|
|
headless: true,
|
|
|
|
ignoreHTTPSErrors: true,
|
2022-05-25 22:45:11 +00:00
|
|
|
screenshot: 'only-on-failure',
|
|
|
|
trace: 'on-first-retry',
|
|
|
|
video: 'on-first-retry'
|
2021-11-30 00:34:47 +00:00
|
|
|
},
|
2022-01-14 22:47:35 +00:00
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: 'chrome',
|
|
|
|
use: {
|
2022-05-09 20:25:21 +00:00
|
|
|
browserName: 'chromium'
|
2022-01-14 22:47:35 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'MMOC',
|
2022-05-09 20:25:21 +00:00
|
|
|
grepInvert: /@snapshot/,
|
2022-01-14 22:47:35 +00:00
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
viewport: {
|
|
|
|
width: 2560,
|
|
|
|
height: 1440
|
|
|
|
}
|
|
|
|
}
|
2022-01-18 19:53:05 +00:00
|
|
|
}
|
|
|
|
/*{
|
2022-01-14 22:47:35 +00:00
|
|
|
name: 'ipad',
|
|
|
|
use: {
|
|
|
|
browserName: 'webkit',
|
|
|
|
...devices['iPad (gen 7) landscape'] // Complete List https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json
|
|
|
|
}
|
2022-01-18 19:53:05 +00:00
|
|
|
}*/
|
2022-01-14 22:47:35 +00:00
|
|
|
],
|
2021-11-30 00:34:47 +00:00
|
|
|
reporter: [
|
|
|
|
['list'],
|
2022-05-25 22:45:11 +00:00
|
|
|
['html', {
|
|
|
|
open: 'never',
|
|
|
|
outputFolder: '../test-results/html/'
|
|
|
|
}],
|
2021-11-30 00:34:47 +00:00
|
|
|
['junit', { outputFile: 'test-results/results.xml' }],
|
2022-01-14 22:47:35 +00:00
|
|
|
['github']
|
2021-11-30 00:34:47 +00:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|