2021-11-30 00:34:47 +00:00
|
|
|
// playwright.config.js
|
|
|
|
// @ts-check
|
2024-04-01 18:29:47 +00:00
|
|
|
import { fileURLToPath } from 'url';
|
2021-11-30 00:34:47 +00:00
|
|
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
|
|
const config = {
|
2023-05-18 21:54:46 +00:00
|
|
|
retries: 0,
|
|
|
|
testDir: 'tests',
|
2024-02-21 23:29:38 +00:00
|
|
|
testMatch: '**/*.e2e.spec.js', // only run e2e tests
|
2023-05-18 21:54:46 +00:00
|
|
|
testIgnore: '**/*.perf.spec.js',
|
|
|
|
timeout: 30 * 1000,
|
|
|
|
webServer: {
|
|
|
|
command: 'npm run start:coverage',
|
2024-10-28 21:28:15 +00:00
|
|
|
cwd: fileURLToPath(new URL('../../', import.meta.url)), // Provide cwd for the root of the project
|
2023-05-18 21:54:46 +00:00
|
|
|
url: 'http://localhost:8080/#',
|
|
|
|
timeout: 120 * 1000,
|
|
|
|
reuseExistingServer: true
|
|
|
|
},
|
|
|
|
workers: 1,
|
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
baseURL: 'http://localhost:8080/',
|
|
|
|
headless: false,
|
|
|
|
ignoreHTTPSErrors: true,
|
|
|
|
screenshot: 'only-on-failure',
|
|
|
|
trace: 'retain-on-failure',
|
|
|
|
video: 'off'
|
|
|
|
},
|
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: 'chrome',
|
|
|
|
use: {
|
|
|
|
browserName: 'chromium'
|
|
|
|
}
|
2021-11-30 00:34:47 +00:00
|
|
|
},
|
2023-05-18 21:54:46 +00:00
|
|
|
{
|
|
|
|
name: 'MMOC',
|
|
|
|
grepInvert: /@snapshot/,
|
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
viewport: {
|
|
|
|
width: 2560,
|
|
|
|
height: 1440
|
2022-06-30 18:50:47 +00:00
|
|
|
}
|
2023-05-18 21:54:46 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'safari',
|
|
|
|
grepInvert: /@snapshot/,
|
|
|
|
use: {
|
|
|
|
browserName: 'webkit'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'firefox',
|
|
|
|
grepInvert: /@snapshot/,
|
|
|
|
use: {
|
|
|
|
browserName: 'firefox'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'canary',
|
|
|
|
grepInvert: /@snapshot/,
|
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
channel: 'chrome-canary' //Note this is not available in ubuntu/CircleCI
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'chrome-beta',
|
|
|
|
grepInvert: /@snapshot/,
|
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
channel: 'chrome-beta'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
reporter: [
|
|
|
|
['list'],
|
|
|
|
[
|
|
|
|
'html',
|
|
|
|
{
|
|
|
|
open: 'on-failure',
|
2024-10-26 02:28:48 +00:00
|
|
|
outputFolder: '../../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
|
2023-05-18 21:54:46 +00:00
|
|
|
}
|
2021-11-30 00:34:47 +00:00
|
|
|
]
|
2023-05-18 21:54:46 +00:00
|
|
|
]
|
2021-11-30 00:34:47 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 15:24:22 +00:00
|
|
|
export default config;
|