mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 07:08:12 +00:00
Condition set visual test (#4625)
* ensure we're running one worker at a time for visual tests * New test for condition sets * Update testcase name and notes
This commit is contained in:
@ -7,6 +7,7 @@ const config = {
|
|||||||
retries: 0,
|
retries: 0,
|
||||||
testDir: 'tests',
|
testDir: 'tests',
|
||||||
timeout: 90 * 1000,
|
timeout: 90 * 1000,
|
||||||
|
workers: 1,
|
||||||
webServer: {
|
webServer: {
|
||||||
command: 'npm run start',
|
command: 'npm run start',
|
||||||
port: 8080,
|
port: 8080,
|
||||||
|
@ -21,11 +21,15 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Collection of Visual Tests set to run in a default context. These should only use functional
|
Collection of Visual Tests set to run in a default context. The tests within this suite
|
||||||
expect statements to verify assumptions about the state in a test and not for functional
|
are only meant to run against openmct's app.js started by `npm run start` within the
|
||||||
verification of correctness.
|
`./e2e/playwright-visual.config.js` file.
|
||||||
Note: Larger testsuite sizes are OK due to the setup time associated with these tests. Visual
|
|
||||||
tests are not supposed to "fail" on assertions.
|
These should only use functional expect statements to verify assumptions about the state
|
||||||
|
in a test and not for functional verification of correctness. Visual tests are not supposed
|
||||||
|
to "fail" on assertions. Instead, they should be used to detect changes between builds or branches.
|
||||||
|
|
||||||
|
Note: Larger testsuite sizes are OK due to the setup time associated with these tests.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { test, expect } = require('@playwright/test');
|
const { test, expect } = require('@playwright/test');
|
||||||
@ -71,3 +75,21 @@ test('Visual - Root and About', async ({ page }) => {
|
|||||||
await page.waitForTimeout(VISUAL_GRACE_PERIOD);
|
await page.waitForTimeout(VISUAL_GRACE_PERIOD);
|
||||||
await percySnapshot(page, 'About');
|
await percySnapshot(page, 'About');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Visual - Default Condition Set', async ({ page }) => {
|
||||||
|
//Go to baseURL
|
||||||
|
await page.goto('/', { waitUntil: 'networkidle' });
|
||||||
|
|
||||||
|
//Click the Create button
|
||||||
|
await page.click('button:has-text("Create")');
|
||||||
|
|
||||||
|
// Click text=Condition Set
|
||||||
|
await page.click('text=Condition Set');
|
||||||
|
|
||||||
|
// Click text=OK
|
||||||
|
await page.click('text=OK');
|
||||||
|
|
||||||
|
// Take a snapshot of the newly created Condition Set object
|
||||||
|
await page.waitForTimeout(VISUAL_GRACE_PERIOD);
|
||||||
|
await percySnapshot(page, 'Default Condition Set');
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user