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
path: root/e2e
diff options
context:
space:
mode:
authorScott Bell <scott@traclabs.com>2022-09-30 18:17:02 +0300
committerGitHub <noreply@github.com>2022-09-30 18:17:02 +0300
commit2bdac5650527ba077b2a228e87ec5a02d1d86007 (patch)
tree675d3404ccbda42e99f59ca14bc4766f2c11bd65 /e2e
parent35c42ba43de5f1ee5348d686e8fd4d498ec42d00 (diff)
Replace app.js with webpack-dev-server (#5797)
Diffstat (limited to 'e2e')
-rw-r--r--e2e/README.md2
-rw-r--r--e2e/playwright-ci.config.js2
-rw-r--r--e2e/playwright-local.config.js5
-rw-r--r--e2e/playwright-performance.config.js4
-rw-r--r--e2e/playwright-visual.config.js6
-rw-r--r--e2e/tests/framework/baseFixtures.e2e.spec.js2
-rw-r--r--e2e/tests/visual/controlledClock.visual.spec.js2
-rw-r--r--e2e/tests/visual/default.visual.spec.js2
8 files changed, 11 insertions, 14 deletions
diff --git a/e2e/README.md b/e2e/README.md
index 2ce872710..6cfd604a2 100644
--- a/e2e/README.md
+++ b/e2e/README.md
@@ -151,7 +151,7 @@ Current list of test tags:
- `@ipad` - Test case or test suite is compatible with Playwright's iPad support and Open MCT's read-only mobile view (i.e. no Create button).
- `@gds` - Denotes a GDS Test Case used in the VIPER Mission.
-- `@addInit` - Initializes the browser with an injected and artificial state. Useful for loading non-default plugins. Likely will not work outside of app.js.
+- `@addInit` - Initializes the browser with an injected and artificial state. Useful for loading non-default plugins. Likely will not work outside of `npm start`.
- `@localStorage` - Captures or generates session storage to manipulate browser state. Useful for excluding in tests which require a persistent backend (i.e. CouchDB).
- `@snapshot` - Uses Playwright's snapshot functionality to record a copy of the DOM for direct comparison. Must be run inside of the playwright container.
- `@unstable` - A new test or test which is known to be flaky.
diff --git a/e2e/playwright-ci.config.js b/e2e/playwright-ci.config.js
index aeff66882..cd8fd2e7e 100644
--- a/e2e/playwright-ci.config.js
+++ b/e2e/playwright-ci.config.js
@@ -14,7 +14,7 @@ const config = {
testIgnore: '**/*.perf.spec.js', //Ignore performance tests and define in playwright-perfromance.config.js
timeout: 60 * 1000,
webServer: {
- command: 'cross-env NODE_ENV=test npm run start',
+ command: 'npm run start:coverage',
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: false
diff --git a/e2e/playwright-local.config.js b/e2e/playwright-local.config.js
index 87365fee2..845cf6812 100644
--- a/e2e/playwright-local.config.js
+++ b/e2e/playwright-local.config.js
@@ -12,10 +12,7 @@ const config = {
testIgnore: '**/*.perf.spec.js',
timeout: 30 * 1000,
webServer: {
- env: {
- NODE_ENV: 'test'
- },
- command: 'npm run start',
+ command: 'npm run start:coverage',
url: 'http://localhost:8080/#',
timeout: 120 * 1000,
reuseExistingServer: true
diff --git a/e2e/playwright-performance.config.js b/e2e/playwright-performance.config.js
index de79304f1..7f4fae91c 100644
--- a/e2e/playwright-performance.config.js
+++ b/e2e/playwright-performance.config.js
@@ -6,12 +6,12 @@ const CI = process.env.CI === 'true';
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
- retries: 1, //Only for debugging purposes because trace is enabled only on first retry
+ retries: 1, //Only for debugging purposes for trace: 'on-first-retry'
testDir: 'tests/performance/',
timeout: 60 * 1000,
workers: 1, //Only run in serial with 1 worker
webServer: {
- command: 'cross-env NODE_ENV=test npm run start',
+ command: 'npm run start', //coverage not generated
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: !CI
diff --git a/e2e/playwright-visual.config.js b/e2e/playwright-visual.config.js
index 1123de808..34bc13d39 100644
--- a/e2e/playwright-visual.config.js
+++ b/e2e/playwright-visual.config.js
@@ -4,13 +4,13 @@
/** @type {import('@playwright/test').PlaywrightTestConfig<{ theme: string }>} */
const config = {
- retries: 1, // visual tests should never retry due to snapshot comparison errors. Leaving as a shim
+ retries: 0, // Visual tests should never retry due to snapshot comparison errors. Leaving as a shim
testDir: 'tests/visual',
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: 'cross-env NODE_ENV=test npm run start',
+ command: 'npm run start:coverage',
url: 'http://localhost:8080/#',
timeout: 200 * 1000,
reuseExistingServer: !process.env.CI
@@ -31,7 +31,7 @@ const config = {
}
},
{
- name: 'chrome-snow-theme',
+ name: 'chrome-snow-theme', //Runs the same visual tests but with snow-theme enabled
use: {
browserName: 'chromium',
theme: 'snow'
diff --git a/e2e/tests/framework/baseFixtures.e2e.spec.js b/e2e/tests/framework/baseFixtures.e2e.spec.js
index 86ae7c7d3..aa5bf744e 100644
--- a/e2e/tests/framework/baseFixtures.e2e.spec.js
+++ b/e2e/tests/framework/baseFixtures.e2e.spec.js
@@ -23,7 +23,7 @@
/*
This test suite is dedicated to testing our use of the playwright framework as it
relates to how we've extended it (i.e. ./e2e/baseFixtures.js) and assumptions made in our dev environment
-(app.js and ./e2e/webpack-dev-middleware.js)
+(`npm start` and ./e2e/webpack-dev-middleware.js)
*/
const { test } = require('../../baseFixtures.js');
diff --git a/e2e/tests/visual/controlledClock.visual.spec.js b/e2e/tests/visual/controlledClock.visual.spec.js
index c4d6b5767..0f5de10c6 100644
--- a/e2e/tests/visual/controlledClock.visual.spec.js
+++ b/e2e/tests/visual/controlledClock.visual.spec.js
@@ -22,7 +22,7 @@
/*
Collection of Visual Tests set to run in a default context. The tests within this suite
-are only meant to run against openmct's app.js started by `npm run start` within the
+are only meant to run against openmct started by `npm start` within the
`./e2e/playwright-visual.config.js` file.
*/
diff --git a/e2e/tests/visual/default.visual.spec.js b/e2e/tests/visual/default.visual.spec.js
index b8c10b35f..0a2a88005 100644
--- a/e2e/tests/visual/default.visual.spec.js
+++ b/e2e/tests/visual/default.visual.spec.js
@@ -22,7 +22,7 @@
/*
Collection of Visual Tests set to run in a default context. The tests within this suite
-are only meant to run against openmct's app.js started by `npm run start` within the
+are only meant to run against openmct started by `npm start` within the
`./e2e/playwright-visual.config.js` file.
These should only use functional expect statements to verify assumptions about the state