mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 23:53:49 +00:00
[CI] Stabilize visual tests, remove appAction, and update pane buttons (#7033)
* Add a VISUAL_URL constant and remove all vestiges of hide inspector and tree * hide timer and add concurrency * turn off concurrency * factor out old appAction * Add expand button to panes * remove old slow annotations * fix fault * update domcontentloaded * missed refactor * driveby: setTimeBounds private * add comments to the percyCSS * suggest MISSION_TIME * more notes * regen * clean up test * driveby: clean up order * restructure * add new suite now that i'ts hidden * use mission time everywhere possible * driveby * rerun generatedata * comments * lintfix
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
Testsuite for plot autoscale.
|
||||
*/
|
||||
|
||||
const { selectInspectorTab, createDomainObjectWithDefaults } = require('../../../../appActions');
|
||||
const { createDomainObjectWithDefaults } = require('../../../../appActions');
|
||||
const { test, expect } = require('../../../../pluginFixtures');
|
||||
test.use({
|
||||
viewport: {
|
||||
@ -60,7 +60,7 @@ test.describe('Autoscale', () => {
|
||||
// enter edit mode
|
||||
await page.click('button[title="Edit"]');
|
||||
|
||||
await selectInspectorTab(page, 'Config');
|
||||
await page.getByRole('tab', { name: 'Config' }).click();
|
||||
await turnOffAutoscale(page);
|
||||
|
||||
await setUserDefinedMinAndMax(page, '-2', '2');
|
||||
|
@ -26,7 +26,7 @@ necessarily be used for reference when writing new tests in this area.
|
||||
*/
|
||||
|
||||
const { test, expect } = require('../../../../pluginFixtures');
|
||||
const { selectInspectorTab, setTimeConductorBounds } = require('../../../../appActions');
|
||||
const { setTimeConductorBounds } = require('../../../../appActions');
|
||||
|
||||
test.describe('Log plot tests', () => {
|
||||
test('Log Plot ticks are functionally correct in regular and log mode and after refresh', async ({
|
||||
@ -34,14 +34,13 @@ test.describe('Log plot tests', () => {
|
||||
openmctConfig
|
||||
}) => {
|
||||
const { myItemsFolderName } = openmctConfig;
|
||||
|
||||
//Test.slow decorator is currently broken. Needs to be fixed in https://github.com/nasa/openmct/issues/5374
|
||||
//Test is slow and should be split in the future
|
||||
test.slow();
|
||||
|
||||
await makeOverlayPlot(page, myItemsFolderName);
|
||||
await testRegularTicks(page);
|
||||
await enableEditMode(page);
|
||||
await selectInspectorTab(page, 'Config');
|
||||
await page.getByRole('tab', { name: 'Config' }).click();
|
||||
await enableLogMode(page);
|
||||
await testLogTicks(page);
|
||||
await disableLogMode(page);
|
||||
|
@ -29,7 +29,6 @@ const { test, expect } = require('../../../../pluginFixtures');
|
||||
const {
|
||||
createDomainObjectWithDefaults,
|
||||
getCanvasPixels,
|
||||
selectInspectorTab,
|
||||
waitForPlotsToRender
|
||||
} = require('../../../../appActions');
|
||||
|
||||
@ -50,7 +49,7 @@ test.describe('Overlay Plot', () => {
|
||||
|
||||
await page.goto(overlayPlot.url);
|
||||
|
||||
await selectInspectorTab(page, 'Config');
|
||||
await page.getByRole('tab', { name: 'Config' }).click();
|
||||
|
||||
// navigate to plot series color palette
|
||||
await page.click('.l-browse-bar__actions__edit');
|
||||
@ -91,7 +90,7 @@ test.describe('Overlay Plot', () => {
|
||||
await page.click('button[title="Edit"]');
|
||||
|
||||
// Expand the "Sine Wave Generator" plot series options and enable limit lines
|
||||
await selectInspectorTab(page, 'Config');
|
||||
await page.getByRole('tab', { name: 'Config' }).click();
|
||||
await page
|
||||
.getByRole('list', { name: 'Plot Series Properties' })
|
||||
.locator('span')
|
||||
@ -117,7 +116,7 @@ test.describe('Overlay Plot', () => {
|
||||
// Enter edit mode
|
||||
await page.click('button[title="Edit"]');
|
||||
|
||||
await selectInspectorTab(page, 'Elements');
|
||||
await page.getByRole('tab', { name: 'Elements' }).click();
|
||||
|
||||
// Drag Sine Wave Generator series from Y Axis 1 into Y Axis 2
|
||||
await page
|
||||
@ -168,7 +167,7 @@ test.describe('Overlay Plot', () => {
|
||||
await page.goto(overlayPlot.url);
|
||||
await page.click('button[title="Edit"]');
|
||||
|
||||
await selectInspectorTab(page, 'Elements');
|
||||
await page.getByRole('tab', { name: 'Elements' }).click();
|
||||
|
||||
// Drag swg a, c, e into Y Axis 2
|
||||
await page
|
||||
@ -182,7 +181,7 @@ test.describe('Overlay Plot', () => {
|
||||
.dragTo(page.locator('[aria-label="Element Item Group Y Axis 2"]'));
|
||||
|
||||
// Assert that Y Axis 1 and Y Axis 2 property groups are visible only
|
||||
await selectInspectorTab(page, 'Config');
|
||||
await page.getByRole('tab', { name: 'Config' }).click();
|
||||
|
||||
const yAxis1PropertyGroup = page.locator('[aria-label="Y Axis Properties"]');
|
||||
const yAxis2PropertyGroup = page.locator('[aria-label="Y Axis 2 Properties"]');
|
||||
@ -196,7 +195,7 @@ test.describe('Overlay Plot', () => {
|
||||
const yAxis2Group = page.getByLabel('Y Axis 2');
|
||||
const yAxis3Group = page.getByLabel('Y Axis 3');
|
||||
|
||||
await selectInspectorTab(page, 'Elements');
|
||||
await page.getByRole('tab', { name: 'Elements' }).click();
|
||||
|
||||
// Drag swg b into Y Axis 3
|
||||
await page
|
||||
@ -204,14 +203,14 @@ test.describe('Overlay Plot', () => {
|
||||
.dragTo(page.locator('[aria-label="Element Item Group Y Axis 3"]'));
|
||||
|
||||
// Assert that all Y Axis property groups are visible
|
||||
await selectInspectorTab(page, 'Config');
|
||||
await page.getByRole('tab', { name: 'Config' }).click();
|
||||
|
||||
await expect(yAxis1PropertyGroup).toBeVisible();
|
||||
await expect(yAxis2PropertyGroup).toBeVisible();
|
||||
await expect(yAxis3PropertyGroup).toBeVisible();
|
||||
|
||||
// Verify that the elements are in the correct buckets and in the correct order
|
||||
await selectInspectorTab(page, 'Elements');
|
||||
await page.getByRole('tab', { name: 'Elements' }).click();
|
||||
|
||||
expect(yAxis1Group.getByRole('listitem', { name: swgD.name })).toBeTruthy();
|
||||
expect(yAxis1Group.getByRole('listitem').nth(0).getByText(swgD.name)).toBeTruthy();
|
||||
@ -242,7 +241,7 @@ test.describe('Overlay Plot', () => {
|
||||
await waitForPlotsToRender(page);
|
||||
await page.click('button[title="Edit"]');
|
||||
|
||||
await selectInspectorTab(page, 'Elements');
|
||||
await page.getByRole('tab', { name: 'Elements' }).click();
|
||||
|
||||
await page.locator(`#inspector-elements-tree >> text=${swgA.name}`).click();
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
const { test, expect } = require('../../../../pluginFixtures');
|
||||
const { createDomainObjectWithDefaults, selectInspectorTab } = require('../../../../appActions');
|
||||
const { createDomainObjectWithDefaults } = require('../../../../appActions');
|
||||
const uuid = require('uuid').v4;
|
||||
|
||||
test.describe('Scatter Plot', () => {
|
||||
@ -54,7 +54,7 @@ test.describe('Scatter Plot', () => {
|
||||
// the SWG appears in the elements pool
|
||||
await page.goto(scatterPlot.url);
|
||||
await editButton.click();
|
||||
await selectInspectorTab(page, 'Elements');
|
||||
await page.getByRole('tab', { name: 'Elements' }).click();
|
||||
await expect.soft(page.locator(`#inspector-elements-tree >> text=${swg1.name}`)).toBeVisible();
|
||||
await saveButton.click();
|
||||
await page.locator('li[title="Save and Finish Editing"]').click();
|
||||
@ -82,7 +82,7 @@ test.describe('Scatter Plot', () => {
|
||||
await editButton.click();
|
||||
|
||||
// Click the "Elements" tab
|
||||
await selectInspectorTab(page, 'Elements');
|
||||
await page.getByRole('tab', { name: 'Elements' }).click();
|
||||
await expect.soft(page.locator(`#inspector-elements-tree >> text=${swg1.name}`)).toBeHidden();
|
||||
await expect.soft(page.locator(`#inspector-elements-tree >> text=${swg2.name}`)).toBeVisible();
|
||||
await saveButton.click();
|
||||
|
@ -26,11 +26,7 @@ necessarily be used for reference when writing new tests in this area.
|
||||
*/
|
||||
|
||||
const { test, expect } = require('../../../../pluginFixtures');
|
||||
const {
|
||||
createDomainObjectWithDefaults,
|
||||
selectInspectorTab,
|
||||
waitForPlotsToRender
|
||||
} = require('../../../../appActions');
|
||||
const { createDomainObjectWithDefaults, waitForPlotsToRender } = require('../../../../appActions');
|
||||
|
||||
test.describe('Stacked Plot', () => {
|
||||
let stackedPlot;
|
||||
@ -75,7 +71,7 @@ test.describe('Stacked Plot', () => {
|
||||
|
||||
await page.click('button[title="Edit"]');
|
||||
|
||||
await selectInspectorTab(page, 'Elements');
|
||||
await page.getByRole('tab', { name: 'Elements' }).click();
|
||||
|
||||
await swgBElementsPoolItem.click({ button: 'right' });
|
||||
await page
|
||||
@ -107,7 +103,7 @@ test.describe('Stacked Plot', () => {
|
||||
|
||||
await page.click('button[title="Edit"]');
|
||||
|
||||
await selectInspectorTab(page, 'Elements');
|
||||
await page.getByRole('tab', { name: 'Elements' }).click();
|
||||
|
||||
const stackedPlotItem1 = page.locator('.c-plot--stacked-container').nth(0);
|
||||
const stackedPlotItem2 = page.locator('.c-plot--stacked-container').nth(1);
|
||||
@ -152,7 +148,7 @@ test.describe('Stacked Plot', () => {
|
||||
}) => {
|
||||
await page.goto(stackedPlot.url);
|
||||
|
||||
await selectInspectorTab(page, 'Config');
|
||||
await page.getByRole('tab', { name: 'Config' }).click();
|
||||
|
||||
// Click on the 1st plot
|
||||
await page.locator(`[aria-label="Stacked Plot Item ${swgA.name}"] canvas`).nth(1).click();
|
||||
@ -193,7 +189,7 @@ test.describe('Stacked Plot', () => {
|
||||
// Go into edit mode
|
||||
await page.click('button[title="Edit"]');
|
||||
|
||||
await selectInspectorTab(page, 'Config');
|
||||
await page.getByRole('tab', { name: 'Config' }).click();
|
||||
|
||||
// Click on canvas for the 1st plot
|
||||
await page.locator(`[aria-label="Stacked Plot Item ${swgA.name}"]`).click();
|
||||
@ -238,7 +234,7 @@ test.describe('Stacked Plot', () => {
|
||||
// Go into edit mode
|
||||
await page.click('button[title="Edit"]');
|
||||
|
||||
await selectInspectorTab(page, 'Config');
|
||||
await page.getByRole('tab', { name: 'Config' }).click();
|
||||
|
||||
let legendProperties = await page.locator('[aria-label="Legend Properties"]');
|
||||
await legendProperties.locator('[title="Display legends per sub plot."]~div input').uncheck();
|
||||
|
@ -29,8 +29,7 @@ const {
|
||||
createDomainObjectWithDefaults,
|
||||
setRealTimeMode,
|
||||
setFixedTimeMode,
|
||||
waitForPlotsToRender,
|
||||
selectInspectorTab
|
||||
waitForPlotsToRender
|
||||
} = require('../../../../appActions');
|
||||
|
||||
test.describe('Plot Tagging', () => {
|
||||
@ -150,7 +149,7 @@ test.describe('Plot Tagging', () => {
|
||||
await waitForPlotsToRender(page);
|
||||
|
||||
await expect(page.getByRole('tab', { name: 'Annotations' })).not.toHaveClass(/is-current/);
|
||||
await selectInspectorTab(page, 'Annotations');
|
||||
await page.getByRole('tab', { name: 'Annotations' }).click();
|
||||
await expect(page.getByRole('tab', { name: 'Annotations' })).toHaveClass(/is-current/);
|
||||
|
||||
await expect(page.getByText('No tags to display for this item')).toBeVisible();
|
||||
|
Reference in New Issue
Block a user