mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 21:53:08 +00:00
fce98a1c47
* refactor: move package.json to type: module this is where the fun begins * chore: move webpack common and prod to esm * chore: move webpack to esm, eslint to explicit cjs * refactor: migrate all files to esm * style: lint * refactor: begin moving karma to cjs, use dynamic esm import * refactor: move index-test to cjs * refactor: begin moving e2e to ESM this was manual. I'm committing this because I'm about to try the `cjstoesm` tool * refactor: move all to esm * fix: make all e2e tests use .js imports * refactor: begin moving exports to esm * refactor: use URL transforms instead of __dirname * fix: use libraryExport: default to properly handle openmct * fix: export all playwright configs as modules * refactor: move all instances of __dirname to import.meta.url * refactor: lint, drop unnecessary URL call * fix: use correct URL path on helper/addNoneditableObject.js * fix: more incorrect URL resolve issues * fix: parse json after reading it
55 lines
1.5 KiB
JavaScript
55 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. Leaving as a shim
|
|
testDir: 'tests/visual-a11y',
|
|
testMatch: '**/*.visual.spec.js', // only run visual tests
|
|
timeout: 60 * 1000,
|
|
workers: 1, //Lower stress on Circle CI Agent for Visual tests https://github.com/percy/cli/discussions/1067
|
|
webServer: {
|
|
command: 'npm run start:coverage',
|
|
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: 'only-on-failure',
|
|
trace: 'on-first-retry',
|
|
video: 'off'
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chrome',
|
|
use: {
|
|
browserName: 'chromium'
|
|
}
|
|
},
|
|
{
|
|
name: 'chrome-snow-theme', //Runs the same visual tests but with snow-theme enabled
|
|
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
|
|
}
|
|
]
|
|
]
|
|
};
|
|
|
|
export default config;
|