2021-11-30 00:34:47 +00:00
|
|
|
/* eslint-disable no-undef */
|
|
|
|
// playwright.config.js
|
|
|
|
// @ts-check
|
|
|
|
|
2022-01-18 19:53:05 +00:00
|
|
|
const { devices } = require('@playwright/test');
|
|
|
|
|
2021-11-30 00:34:47 +00:00
|
|
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
|
|
const config = {
|
|
|
|
retries: 0,
|
|
|
|
testDir: 'tests',
|
|
|
|
timeout: 30 * 1000,
|
|
|
|
webServer: {
|
|
|
|
command: 'npm run start',
|
|
|
|
port: 8080,
|
|
|
|
timeout: 120 * 1000,
|
|
|
|
reuseExistingServer: !process.env.CI
|
|
|
|
},
|
2022-01-14 22:47:35 +00:00
|
|
|
workers: 1,
|
2021-11-30 00:34:47 +00:00
|
|
|
use: {
|
|
|
|
browserName: "chromium",
|
|
|
|
baseURL: 'http://localhost:8080/',
|
|
|
|
headless: false,
|
|
|
|
ignoreHTTPSErrors: true,
|
|
|
|
screenshot: 'on',
|
|
|
|
trace: 'on',
|
|
|
|
video: 'on'
|
|
|
|
},
|
2022-01-18 19:53:05 +00:00
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: 'chrome',
|
|
|
|
use: {
|
2022-05-09 20:25:21 +00:00
|
|
|
browserName: 'chromium'
|
2022-01-18 19:53:05 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'MMOC',
|
2022-05-09 20:25:21 +00:00
|
|
|
grepInvert: /@snapshot/,
|
2022-01-18 19:53:05 +00:00
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
viewport: {
|
|
|
|
width: 2560,
|
|
|
|
height: 1440
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*{
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
],
|
2021-11-30 00:34:47 +00:00
|
|
|
reporter: [
|
|
|
|
['list'],
|
|
|
|
['allure-playwright']
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|