bigbluebutton-Github/bigbluebutton-tests/playwright/playwright.config.js

43 lines
908 B
JavaScript
Raw Normal View History

require('dotenv').config();
2022-08-27 03:13:56 +08:00
const { chromiumConfig, firefoxConfig, webkitConfig } = require('./core/browsersConfig');
const { ELEMENT_WAIT_TIME } = require('./core/constants');
2022-06-08 02:52:22 +08:00
const CI = process.env.CI === 'true';
const DEBUG_MODE = process.env.DEBUG_MODE === 'true';
const config = {
workers: CI ? 1 : 2,
2021-12-23 03:06:42 +08:00
timeout: 3 * 60 * 1000,
reporter: CI
? [['blob'], ['github']]
: [['list'], ['html', { open: 'never' }],
2022-06-08 02:52:22 +08:00
],
2022-07-14 04:02:15 +08:00
forbidOnly: CI,
2021-11-23 01:06:59 +08:00
use: {
headless: true,
2022-07-14 04:02:15 +08:00
trace: DEBUG_MODE ? 'on'
: CI ? 'retain-on-failure'
2022-08-27 03:13:56 +08:00
: 'off',
2022-07-14 04:02:15 +08:00
screenshot: 'on',
video: 'on',
2021-11-23 01:06:59 +08:00
},
2021-12-01 01:13:43 +08:00
projects: [
2022-08-27 03:13:56 +08:00
chromiumConfig,
firefoxConfig,
webkitConfig,
2021-12-01 01:13:43 +08:00
],
expect: {
timeout: ELEMENT_WAIT_TIME,
toMatchSnapshot: {
maxDiffPixelRatio: 0.05,
},
toHaveScreenshot: {
maxDiffPixelRatio: 0.05,
},
},
};
2021-11-23 01:06:59 +08:00
2022-06-08 02:52:22 +08:00
if (CI) config.retries = 1;
2021-11-03 06:50:20 +08:00
module.exports = config;