bigbluebutton-Github/bigbluebutton-tests/playwright/playwright.config.js
Anton Barboza de Sá ebdddb8718
ci: Introduces custom reporter (automated tests) (#20712)
* core: create custom reporter for CI

* core: add step to remove unnecessary artifacts

* core: remove upload PR data step

* core: add locales to path-ignore, change matrix variable set way and add condition to avoid false run failure

* core: update emoji for in progress comment
2024-07-17 22:19:39 -03:00

45 lines
1015 B
JavaScript

require('dotenv').config();
const { chromiumConfig, firefoxConfig, webkitConfig } = require('./core/browsersConfig');
const { ELEMENT_WAIT_TIME } = require('./core/constants');
const CI = process.env.CI === 'true';
const isParallel = !!process.env.npm_config_parallel;
const config = {
workers: CI ? 1 : 2,
timeout: 3 * 60 * 1000,
reporter: CI
? [['blob'], ['./custom-reporter.js']]
: [['list'], ['html', { open: 'never' }],
],
reportSlowTests: null,
forbidOnly: CI,
fullyParallel: CI || isParallel,
use: {
headless: true,
trace: 'on',
screenshot: 'on',
video: CI ? 'retain-on-failure' : 'on',
},
projects: [
chromiumConfig,
firefoxConfig,
webkitConfig,
],
expect: {
timeout: ELEMENT_WAIT_TIME,
toMatchSnapshot: {
maxDiffPixelRatio: 0.05,
timeout: ELEMENT_WAIT_TIME,
},
toHaveScreenshot: {
maxDiffPixelRatio: 0.05,
timeout: ELEMENT_WAIT_TIME,
},
},
};
if (CI) config.retries = 1;
module.exports = config;