mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 21:53:08 +00:00
c231c2d7cb
* try fix visual test failure * disable actionTimeout * increase percy loglevel * comment * Remove `@percy/cli` dependency as it may be conflicting * Upgrade `percy/cli` to 1.10.2 * drop percy/cli version down to 1.7.2 * enable timeouts for actions again
52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
/* eslint-disable no-undef */
|
|
// playwright.config.js
|
|
// @ts-check
|
|
|
|
/** @type {import('@playwright/test').PlaywrightTestConfig<{ theme: string }>} */
|
|
const config = {
|
|
retries: 0, // visual tests should never retry due to snapshot comparison errors
|
|
testDir: 'tests/visual',
|
|
testMatch: '**/*.visual.spec.js', // only run visual tests
|
|
timeout: 90 * 1000,
|
|
workers: 1, //Limit to 1 for CircleCI Agent
|
|
webServer: {
|
|
command: 'cross-env NODE_ENV=test npm run start',
|
|
url: 'http://localhost:8080/#',
|
|
timeout: 200 * 1000,
|
|
reuseExistingServer: !process.env.CI
|
|
},
|
|
use: {
|
|
baseURL: 'http://localhost:8080/',
|
|
headless: true, // this needs to remain headless to avoid visual changes due to GPU rendering in headed browsers
|
|
ignoreHTTPSErrors: true,
|
|
screenshot: 'on',
|
|
trace: 'on',
|
|
video: 'off'
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chrome',
|
|
use: {
|
|
browserName: 'chromium'
|
|
}
|
|
},
|
|
{
|
|
name: 'chrome-snow-theme',
|
|
use: {
|
|
browserName: 'chromium',
|
|
theme: 'snow'
|
|
}
|
|
}
|
|
],
|
|
reporter: [
|
|
['list'],
|
|
['junit', { outputFile: 'test-results/results.xml' }],
|
|
['html', {
|
|
open: 'on-failure',
|
|
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
|
|
}]
|
|
]
|
|
};
|
|
|
|
module.exports = config;
|