Skip to content

Commit

Permalink
[e2e] Update tests to be compatible with viper nasa#5513
Browse files Browse the repository at this point in the history
  • Loading branch information
loftwah committed Jul 16, 2022
1 parent 413cb13 commit 97746bd
Show file tree
Hide file tree
Showing 28 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion e2e/tests/api/forms/forms.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")');
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/branding.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/example/eventGenerator.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")');
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/framework.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand 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([
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/moveObjects.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/performance/imagery.perf.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/performance/memleak-imagery.perf.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/performance/notebook.perf.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/persistence/persistability.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")');
Expand All @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/plugins/clock/Clock.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")');
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/plugins/condition/condition.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")');
Expand Down Expand Up @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")');
Expand Down Expand Up @@ -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")');
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")');
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/plugins/notebook/restrictedNotebook.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/plugins/notebook/tags.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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")');
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/plugins/plot/autoscale.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/plugins/plot/logPlot.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/plugins/plot/missingPlotObj.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/plugins/timeConductor/timeConductor.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/plugins/timer/timer.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")');
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/smoke.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")');
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/ui/layout/search/grandsearch.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/visual/addInit.visual.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/visual/controlledClock.visual.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 97746bd

Please # to comment.