Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nasa/openmct.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'e2e/playwright-ci.config.js')
-rw-r--r--e2e/playwright-ci.config.js68
1 files changed, 58 insertions, 10 deletions
diff --git a/e2e/playwright-ci.config.js b/e2e/playwright-ci.config.js
index a6d0d62a3..a0139f56b 100644
--- a/e2e/playwright-ci.config.js
+++ b/e2e/playwright-ci.config.js
@@ -2,30 +2,78 @@
// playwright.config.js
// @ts-check
+// eslint-disable-next-line no-unused-vars
+const { devices } = require('@playwright/test');
+const MAX_FAILURES = 5;
+const NUM_WORKERS = 2;
+
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
- retries: 2,
+ retries: 3, //Retries 3 times for a total of 4. When running sharded and with maxFailures = 5, this should ensure that flake is managed without failing the full suite
testDir: 'tests',
- timeout: 90 * 1000,
+ testIgnore: '**/*.perf.spec.js', //Ignore performance tests and define in playwright-perfromance.config.js
+ timeout: 60 * 1000,
webServer: {
- command: 'npm run start',
- port: 8080,
+ command: 'cross-env NODE_ENV=test npm run start',
+ url: 'http://localhost:8080/#',
timeout: 200 * 1000,
- reuseExistingServer: !process.env.CI
+ reuseExistingServer: false
},
+ maxFailures: MAX_FAILURES, //Limits failures to 5 to reduce CI Waste
+ workers: NUM_WORKERS, //Limit to 2 for CircleCI Agent
use: {
- browserName: "chromium",
baseURL: 'http://localhost:8080/',
headless: true,
ignoreHTTPSErrors: true,
- screenshot: 'on',
- trace: 'on',
- video: 'on'
+ screenshot: 'only-on-failure',
+ trace: 'on-first-retry',
+ video: 'off'
},
+ projects: [
+ {
+ name: 'chrome',
+ use: {
+ browserName: 'chromium'
+ }
+ },
+ {
+ name: 'MMOC',
+ testMatch: '**/*.e2e.spec.js', // only run e2e tests
+ grepInvert: /@snapshot/,
+ use: {
+ browserName: 'chromium',
+ viewport: {
+ width: 2560,
+ height: 1440
+ }
+ }
+ },
+ {
+ name: 'firefox',
+ testMatch: '**/*.e2e.spec.js', // only run e2e tests
+ grepInvert: /@snapshot/,
+ use: {
+ browserName: 'firefox'
+ }
+ },
+ {
+ name: 'chrome-beta', //Only Chrome Beta is available on ubuntu -- not chrome canary
+ testMatch: '**/*.e2e.spec.js', // only run e2e tests
+ grepInvert: /@snapshot/,
+ use: {
+ browserName: 'chromium',
+ channel: 'chrome-beta'
+ }
+ }
+ ],
reporter: [
['list'],
+ ['html', {
+ open: 'never',
+ outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
+ }],
['junit', { outputFile: 'test-results/results.xml' }],
- ['allure-playwright']
+ ['github']
]
};