[e2e] Update tests to be compatible with viper #5513 (#5520)

Co-authored-by: John Hill <john.c.hill@nasa.gov>
This commit is contained in:
Dean Lofts 2022-07-26 06:21:41 +10:00 committed by GitHub
parent 7e854f078e
commit 7e1337447f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 50 additions and 50 deletions

View File

@ -31,7 +31,7 @@ const TEST_FOLDER = 'test folder';
test.describe('forms set', () => {
test('New folder form has title as required field', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click button:has-text("Create")
await page.click('button:has-text("Create")');

View File

@ -30,7 +30,7 @@ const { expect } = require('@playwright/test');
test.describe('Branding tests', () => {
test('About Modal launches with basic branding properties', async ({ page }) => {
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click About button
await page.click('.l-shell__app-logo');
@ -48,7 +48,7 @@ test.describe('Branding tests', () => {
});
test('Verify Links in About Modal', async ({ page }) => {
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click About button
await page.click('.l-shell__app-logo');

View File

@ -30,7 +30,7 @@ const { expect } = require('@playwright/test');
test.describe('Example Event Generator Operations', () => {
test('Can create example event generator with a name', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// let's make an event generator
await page.locator('button:has-text("Create")').click();
// Click li:has-text("Event Message Generator")

View File

@ -32,7 +32,7 @@ test.describe('Sine Wave Generator', () => {
test.fixme(browserName === 'firefox', 'This test needs to be updated to work with firefox');
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');

View File

@ -32,7 +32,7 @@ test.describe('fixtures.js tests', () => {
test('Verify that tests fail if console.error is thrown', async ({ page }) => {
test.fail();
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Verify that ../fixtures.js detects console log errors
await Promise.all([
@ -43,7 +43,7 @@ test.describe('fixtures.js tests', () => {
});
test('Verify that tests pass if console.warn is thrown', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Verify that ../fixtures.js detects console log errors
await Promise.all([

View File

@ -30,7 +30,7 @@ const { expect } = require('@playwright/test');
test.describe('Move item tests', () => {
test('Create a basic object and verify that it can be moved to another folder', async ({ page }) => {
// Go to Open MCT
await page.goto('/');
await page.goto('./');
// Create a new folder in the root my items folder
let folder1 = "Folder1";
@ -82,7 +82,7 @@ test.describe('Move item tests', () => {
});
test('Create a basic object and verify that it cannot be moved to telemetry object without Composition Provider', async ({ page }) => {
// Go to Open MCT
await page.goto('/');
await page.goto('./');
// Create Telemetry Table
let telemetryTable = 'Test Telemetry Table';

View File

@ -39,7 +39,7 @@ const filePath = 'e2e/test-data/PerformanceDisplayLayout.json';
test.describe('Performance tests', () => {
test.beforeEach(async ({ page, browser }, testInfo) => {
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click a:has-text("My Items")
await page.locator('a:has-text("My Items")').click({
@ -100,7 +100,7 @@ test.describe('Performance tests', () => {
// https://chromedevtools.github.io/devtools-protocol/tot/Performance/#method-getMetrics
await client.send('Performance.enable');
// Go to baseURL
await page.goto('/');
await page.goto('./');
// Search Available after Launch
await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').click();

View File

@ -40,7 +40,7 @@ const filePath = 'e2e/test-data/PerformanceDisplayLayout.json';
test.describe.skip('Memory Performance tests', () => {
test.beforeEach(async ({ page, browser }, testInfo) => {
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click a:has-text("My Items")
await page.locator('a:has-text("My Items")').click({
@ -61,7 +61,7 @@ test.describe.skip('Memory Performance tests', () => {
test('Embedded View Large for Imagery is performant in Fixed Time', async ({ page, browser }) => {
await page.goto('/', {waitUntil: 'networkidle'});
await page.goto('./', {waitUntil: 'networkidle'});
// To to Search Available after Launch
await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').click();

View File

@ -38,7 +38,7 @@ const notebookFilePath = 'e2e/test-data/PerformanceNotebook.json';
test.describe('Performance tests', () => {
test.beforeEach(async ({ page, browser }, testInfo) => {
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click a:has-text("My Items")
await page.locator('a:has-text("My Items")').click({
@ -95,7 +95,7 @@ test.describe('Performance tests', () => {
// https://chromedevtools.github.io/devtools-protocol/tot/Performance/#method-getMetrics
await client.send('Performance.enable');
// Go to baseURL
await page.goto('/');
await page.goto('./');
// To to Search Available after Launch
await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').click();

View File

@ -41,7 +41,7 @@ test.describe('Persistence operations @addInit', () => {
description: 'https://github.com/nasa/openmct/issues/4323'
});
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click the Create button
await page.click('button:has-text("Create")');
@ -58,7 +58,7 @@ test.describe('Persistence operations @addInit', () => {
});
test('Non-persistable objects should not show persistence related actions', async ({ page }) => {
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click text=Persistence Testing >> nth=0
await page.locator('text=Persistence Testing').first().click({

View File

@ -35,7 +35,7 @@ test.describe('Clock Generator', () => {
description: 'https://github.com/nasa/openmct/issues/4878'
});
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');

View File

@ -37,7 +37,7 @@ test.describe.serial('Condition Set CRUD Operations on @localStorage', () => {
const context = await browser.newContext();
const page = await context.newPage();
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
@ -150,7 +150,7 @@ test.describe.serial('Condition Set CRUD Operations on @localStorage', () => {
});
test('condition set object can be deleted by Search Tree Actions menu on @localStorage', async ({ page }) => {
//Navigate to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Assertions on loaded Condition Set in main view. This is a stateful transition step after page.goto()
await expect(page.locator('a:has-text("Unnamed Condition Set Condition Set") >> nth=0')).toBeVisible();

View File

@ -37,7 +37,7 @@ test.describe('Example Imagery Object', () => {
test.beforeEach(async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
@ -237,7 +237,7 @@ test('Example Imagery in Display layout', async ({ page, browserName }) => {
});
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click the Create button
await page.click('button:has-text("Create")');
@ -348,7 +348,7 @@ test('Example Imagery in Display layout', async ({ page, browserName }) => {
test.describe('Example imagery thumbnails resize in display layouts', () => {
test('Resizing the layout changes thumbnail visibility and size', async ({ page }) => {
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
const thumbsWrapperLocator = page.locator('.c-imagery__thumbs-wrapper');
// Click button:has-text("Create")
@ -448,7 +448,7 @@ test.describe('Example Imagery in Flexible layout', () => {
});
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click the Create button
await page.click('button:has-text("Create")');

View File

@ -179,7 +179,7 @@ async function startAndAddRestrictedNotebookObject(page) {
// eslint-disable-next-line no-undef
await page.addInitScript({ path: path.join(__dirname, 'addInitRestrictedNotebook.js') });
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
// Click text=CUSTOME_NAME

View File

@ -34,7 +34,7 @@ const { test } = require('../../../fixtures');
*/
async function createNotebookAndEntry(page, iterations = 1) {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click button:has-text("Create")
await page.locator('button:has-text("Create")').click();
@ -149,7 +149,7 @@ test.describe('Tagging in Notebooks', () => {
});
test('Tags persist across reload', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Create a clock object we can navigate to
await page.click('button:has-text("Create")');

View File

@ -39,7 +39,7 @@ test.describe('ExportAsJSON', () => {
//This is necessary due to the size of the test suite.
test.slow();
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
await setTimeRange(page);

View File

@ -70,7 +70,7 @@ test.describe('Log plot tests', () => {
*/
async function makeOverlayPlot(page) {
// fresh page with time range from 2022-03-29 22:00:00.000Z to 2022-03-29 22:00:30.000Z
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Set a specific time range for consistency, otherwise it will change
// on every test to a range based on the current time.

View File

@ -82,7 +82,7 @@ test.describe('Handle missing object for plots', () => {
*/
async function makeStackedPlot(page) {
// fresh page with time range from 2022-03-29 22:00:00.000Z to 2022-03-29 22:00:30.000Z
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// create stacked plot
await page.locator('button.c-create-button').click();

View File

@ -33,7 +33,7 @@ test.describe('Telemetry Table', () => {
const bannerMessage = '.c-message-banner__message';
const createButton = 'button:has-text("Create")';
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click create button
await page.locator(createButton).click();

View File

@ -26,7 +26,7 @@ const { expect } = require('@playwright/test');
test.describe('Time conductor operations', () => {
test('validate start time does not exceeds end time', async ({ page }) => {
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
const year = new Date().getFullYear();
let startDate = 'xxxx-01-01 01:00:00.000Z';
@ -82,7 +82,7 @@ test.describe('Time conductor input fields real-time mode', () => {
};
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Switch to real-time mode
await setRealTimeMode(page);
@ -119,7 +119,7 @@ test.describe('Time conductor input fields real-time mode', () => {
const endDelta = (1 * 1000);
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Switch to real-time mode
await setRealTimeMode(page);

View File

@ -27,7 +27,7 @@ test.describe('Timer', () => {
test.beforeEach(async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');

View File

@ -39,7 +39,7 @@ const { expect } = require('@playwright/test');
test('Verify that the create button appears and that the Folder Domain Object is available for selection', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
@ -52,7 +52,7 @@ test('Verify that My Items Tree appears @ipad', async ({ page }) => {
//Test.slow annotation is currently broken. Needs to be fixed in https://github.com/nasa/openmct/issues/5374
test.slow();
//Go to baseURL
await page.goto('/');
await page.goto('./');
//My Items to be visible
await expect(page.locator('a:has-text("My Items")')).toBeEnabled();

View File

@ -33,7 +33,7 @@ const { test } = require('../../../../fixtures');
*/
async function createClockAndDisplayLayout(page) {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click button:has-text("Create")
await page.locator('button:has-text("Create")').click();

View File

@ -58,7 +58,7 @@ test('Visual - Restricted Notebook is visually correct @addInit', async ({ page
// eslint-disable-next-line no-undef
await page.addInitScript({ path: path.join(__dirname, '../plugins/notebook', './addInitRestrictedNotebook.js') });
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
// Click text=CUSTOM_NAME

View File

@ -57,7 +57,7 @@ test.use({ storageState: './e2e/test-data/VisualTestData_storage.json' });
test('Visual - Overlay Plot Loading Indicator @localstorage', async ({ page }) => {
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
await page.locator('a:has-text("Unnamed Overlay Plot Overlay Plot")').click();
//Ensure that we're on the Unnamed Overlay Plot object

View File

@ -57,7 +57,7 @@ test.beforeEach(async ({ context }) => {
test('Visual - Root and About', async ({ page }) => {
// Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Verify that Create button is actionable
await expect(page.locator('button:has-text("Create")')).toBeEnabled();
@ -81,7 +81,7 @@ test('Visual - Root and About', async ({ page }) => {
test('Visual - Default Condition Set', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
@ -103,7 +103,7 @@ test.fixme('Visual - Default Condition Widget', async ({ page }) => {
description: 'https://github.com/nasa/openmct/issues/5349'
});
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
@ -121,7 +121,7 @@ test.fixme('Visual - Default Condition Widget', async ({ page }) => {
test('Visual - Time Conductor start time is less than end time', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
const year = new Date().getFullYear();
let startDate = 'xxxx-01-01 01:00:00.000Z';
@ -160,7 +160,7 @@ test('Visual - Time Conductor start time is less than end time', async ({ page }
test('Visual - Sine Wave Generator Form', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
@ -181,7 +181,7 @@ test('Visual - Sine Wave Generator Form', async ({ page }) => {
test('Visual - Save Successful Banner', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
@ -201,7 +201,7 @@ test('Visual - Save Successful Banner', async ({ page }) => {
test('Visual - Display Layout Icon is correct', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');
@ -215,7 +215,7 @@ test('Visual - Display Layout Icon is correct', async ({ page }) => {
test('Visual - Default Gauge is correct', async ({ page }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
//Click the Create button
await page.click('button:has-text("Create")');

View File

@ -36,7 +36,7 @@ const { expect } = require('@playwright/test');
test('Generate Visual Test Data @localStorage', async ({ page, context }) => {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
await page.locator('button:has-text("Create")').click();

View File

@ -34,7 +34,7 @@ const percySnapshot = require('@percy/playwright');
*/
async function createClockAndDisplayLayout(page) {
//Go to baseURL
await page.goto('/', { waitUntil: 'networkidle' });
await page.goto('./', { waitUntil: 'networkidle' });
// Click button:has-text("Create")
await page.locator('button:has-text("Create")').click();