Skip some tests, fix a mislabeled test, and add default condition for tabs (#7422)

* wrong format

* skip the flake for now

* Add Tabs test

* one more flake
This commit is contained in:
John Hill 2024-01-28 16:28:49 -08:00 committed by GitHub
parent dc5a3236b3
commit 735c8236e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 95 additions and 49 deletions

View File

@ -35,7 +35,7 @@ import { expect, test } from '../../../../pluginFixtures.js';
let conditionSetUrl;
test.describe.serial('Condition Set CRUD Operations on @localStorage', () => {
test.describe.serial('Condition Set CRUD Operations on @localStorage @2p', () => {
test.beforeAll(async ({ browser }) => {
//TODO: This needs to be refactored
const context = await browser.newContext();
@ -68,30 +68,35 @@ test.describe.serial('Condition Set CRUD Operations on @localStorage', () => {
});
//Begin suite of tests again localStorage
test('Condition set object properties persist in main view and inspector @localStorage', async ({
page
}) => {
//Navigate to baseURL with injected localStorage
await page.goto(conditionSetUrl, { waitUntil: 'networkidle' });
test.fixme(
'Condition set object properties persist in main view and inspector @localStorage',
async ({ page }) => {
test.info().annotations.push({
type: 'issue',
description: 'https://github.com/nasa/openmct/issues/7421'
});
//Navigate to baseURL with injected localStorage
await page.goto(conditionSetUrl, { waitUntil: 'networkidle' });
//Assertions on loaded Condition Set in main view. This is a stateful transition step after page.goto()
await expect
.soft(page.locator('.l-browse-bar__object-name'))
.toContainText('Unnamed Condition Set');
//Assertions on loaded Condition Set in main view. This is a stateful transition step after page.goto()
await expect
.soft(page.locator('.l-browse-bar__object-name'))
.toContainText('Unnamed Condition Set');
//Assertions on loaded Condition Set in Inspector
expect.soft(page.locator('_vue=item.name=Unnamed Condition Set')).toBeTruthy();
//Assertions on loaded Condition Set in Inspector
expect.soft(page.locator('_vue=item.name=Unnamed Condition Set')).toBeTruthy();
//Reload Page
await Promise.all([page.reload(), page.waitForLoadState('networkidle')]);
//Reload Page
await Promise.all([page.reload(), page.waitForLoadState('networkidle')]);
//Re-verify after reload
await expect
.soft(page.locator('.l-browse-bar__object-name'))
.toContainText('Unnamed Condition Set');
//Assertions on loaded Condition Set in Inspector
expect.soft(page.locator('_vue=item.name=Unnamed Condition Set')).toBeTruthy();
});
//Re-verify after reload
await expect
.soft(page.locator('.l-browse-bar__object-name'))
.toContainText('Unnamed Condition Set');
//Assertions on loaded Condition Set in Inspector
expect.soft(page.locator('_vue=item.name=Unnamed Condition Set')).toBeTruthy();
}
);
test('condition set object can be modified on @localStorage', async ({ page, openmctConfig }) => {
const { myItemsFolderName } = openmctConfig;

View File

@ -136,7 +136,11 @@ test.describe('Gauge', () => {
// TODO: Verify changes in the UI
});
test('Gauge does not display NaN when data not available', async ({ page }) => {
test.fixme('Gauge does not display NaN when data not available', async ({ page }) => {
test.info().annotations.push({
type: 'issue',
description: 'https://github.com/nasa/openmct/issues/7421'
});
// Create a Gauge
const gauge = await createDomainObjectWithDefaults(page, {
type: 'Gauge'

View File

@ -226,31 +226,37 @@ test.describe('Overlay Plot', () => {
expect(yAxis3Group.getByRole('listitem').nth(0).getByText(swgB.name)).toBeTruthy();
});
test('Clicking on an item in the elements pool brings up the plot preview with data points', async ({
page
}) => {
const overlayPlot = await createDomainObjectWithDefaults(page, {
type: 'Overlay Plot'
});
test.fixme(
'Clicking on an item in the elements pool brings up the plot preview with data points',
async ({ page }) => {
test.info().annotations.push({
type: 'issue',
description: 'https://github.com/nasa/openmct/issues/7421'
});
const swgA = await createDomainObjectWithDefaults(page, {
type: 'Sine Wave Generator',
parent: overlayPlot.uuid
});
const overlayPlot = await createDomainObjectWithDefaults(page, {
type: 'Overlay Plot'
});
await page.goto(overlayPlot.url);
// Wait for plot series data to load and be drawn
await waitForPlotsToRender(page);
await page.getByLabel('Edit Object').click();
const swgA = await createDomainObjectWithDefaults(page, {
type: 'Sine Wave Generator',
parent: overlayPlot.uuid
});
await page.getByRole('tab', { name: 'Elements' }).click();
await page.goto(overlayPlot.url);
// Wait for plot series data to load and be drawn
await waitForPlotsToRender(page);
await page.getByLabel('Edit Object').click();
await page.locator(`#inspector-elements-tree >> text=${swgA.name}`).click();
await page.getByRole('tab', { name: 'Elements' }).click();
const plotPixels = await getCanvasPixels(page, '.js-overlay canvas');
const plotPixelSize = plotPixels.length;
expect(plotPixelSize).toBeGreaterThan(0);
});
await page.locator(`#inspector-elements-tree >> text=${swgA.name}`).click();
const plotPixels = await getCanvasPixels(page, '.js-overlay canvas');
const plotPixelSize = plotPixels.length;
expect(plotPixelSize).toBeGreaterThan(0);
}
);
});
/**

View File

@ -52,7 +52,11 @@ test.describe('Plot Rendering', () => {
expect(createMineFolderRequests.length).toEqual(0);
});
test('Plot is rendered when infinity values exist', async ({ page }) => {
test.fixme('Plot is rendered when infinity values exist', async ({ page }) => {
test.info().annotations.push({
type: 'issue',
description: 'https://github.com/nasa/openmct/issues/7421'
});
// Edit Plot
await editSineWaveToUseInfinityOption(page, sineWaveGeneratorObject);

View File

@ -24,13 +24,18 @@ import { createDomainObjectWithDefaults } from '../../../../appActions.js';
import { expect, test } from '../../../../pluginFixtures.js';
test.describe('Tabs View', () => {
test('Renders tabbed elements', async ({ page }) => {
let tabsView;
let table;
let notebook;
let sineWaveGenerator;
test.beforeEach(async ({ page }) => {
await page.goto('./', { waitUntil: 'domcontentloaded' });
const tabsView = await createDomainObjectWithDefaults(page, {
tabsView = await createDomainObjectWithDefaults(page, {
type: 'Tabs View'
});
const table = await createDomainObjectWithDefaults(page, {
table = await createDomainObjectWithDefaults(page, {
type: 'Telemetry Table',
parent: tabsView.uuid
});
@ -38,16 +43,18 @@ test.describe('Tabs View', () => {
type: 'Event Message Generator',
parent: table.uuid
});
const notebook = await createDomainObjectWithDefaults(page, {
notebook = await createDomainObjectWithDefaults(page, {
type: 'Notebook',
parent: tabsView.uuid
});
const sineWaveGenerator = await createDomainObjectWithDefaults(page, {
sineWaveGenerator = await createDomainObjectWithDefaults(page, {
type: 'Sine Wave Generator',
parent: tabsView.uuid
});
});
page.goto(tabsView.url);
test('Renders tabbed elements', async ({ page }) => {
await page.goto(tabsView.url);
// select first tab
await page.getByLabel(`${table.name} tab`, { exact: true }).click();
@ -86,3 +93,23 @@ test.describe('Tabs View', () => {
await expect(page.locator('canvas[id=webglContext]')).toBeHidden();
});
});
test.describe('Tabs View CRUD', () => {
let tabsView;
test.beforeEach(async ({ page }) => {
await page.goto('./', { waitUntil: 'domcontentloaded' });
tabsView = await createDomainObjectWithDefaults(page, {
type: 'Tabs View'
});
});
test('Eager Load Tabs is the default', async ({ page }) => {
await page.goto(tabsView.url);
await page.getByLabel('Edit Object').click();
await page.getByLabel('More actions').click();
await page.getByLabel('Edit Properties...').click();
await expect(await page.getByLabel('Eager Load Tabs')).toHaveValue('true');
});
});