bigbluebutton-Github/bigbluebutton-tests/playwright/playwright.config.js
Anton Barboza de Sá 2bfa94e189
test: Fix breakout export option tests (#20343)
* test: fix breakout export option tests

* test: wait for fonts to be ready before performing flaky snapshot comparisons

* test: update maxDiffPixels of flaky snapshot comparisons

* Revert "test: wait for fonts to be ready before performing flaky snapshot comparisons"

This reverts commit adad15374c.

* test: add default timeout for snapshot comparisons

* test: try using locator on snapshot comparison and update shared notes snapshot filename

* test: avoid snapshot comparisons due to plawyright open issue
2024-06-06 16:15:36 -03:00

44 lines
976 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'], ['github']]
: [['list'], ['html', { open: 'never' }],
],
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;