Skip to content

Commit d4d050e

Browse files
committed
Use expand tree and expand inspector utility functions for display layout and planning tests
1 parent a6ca55a commit d4d050e

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

e2e/tests/visual-a11y/components/tree.visual.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test.describe('Visual - Tree Pane', () => {
3434
await page.goto(VISUAL_FIXED_URL, { waitUntil: 'domcontentloaded' });
3535

3636
//Open Tree
37-
expandTreePane(page);
37+
await expandTreePane(page);
3838

3939
//Create a Folder Structure
4040
const foo = await createDomainObjectWithDefaults(page, {

e2e/tests/visual-a11y/displayLayout.visual.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import percySnapshot from '@percy/playwright';
2525
import {
2626
createDomainObjectWithDefaults,
2727
createStableStateTelemetry,
28+
expandInspectorPane,
2829
linkParameterToObject
2930
} from '../../appActions.js';
3031
import { MISSION_TIME, VISUAL_FIXED_URL } from '../../constants.js';
@@ -105,7 +106,7 @@ test.describe('Visual - Display Layout @clock', () => {
105106
type: 'issue',
106107
description: 'https://github.com/nasa/openmct/issues/7036'
107108
});
108-
await page.getByLabel('Expand Inspect Pane').click();
109+
await expandInspectorPane(page);
109110
await page.getByLabel('Resize Inspect Pane').dragTo(page.getByLabel('X:'));
110111
await page.getByRole('tab', { name: 'Elements' }).click();
111112
await percySnapshot(page, `Toolbar does not overflow into inspector (theme: '${theme}')`);

e2e/tests/visual-a11y/notebook.visual.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ test.describe('Visual - Notebook @a11y', () => {
118118
await percySnapshot(page, `Notebook Entry (theme: '${theme}')`);
119119

120120
// Open the Inspector
121-
expandInspectorPane(page);
121+
await expandInspectorPane(page);
122122
// Open the Annotations tab
123123
await page.getByRole('tab', { name: 'Annotations' }).click();
124124

e2e/tests/visual-a11y/planning-gantt.visual.spec.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
import percySnapshot from '@percy/playwright';
2424
import fs from 'fs';
2525

26-
import { createDomainObjectWithDefaults, createPlanFromJSON } from '../../appActions.js';
26+
import {
27+
createDomainObjectWithDefaults,
28+
createPlanFromJSON,
29+
expandInspectorPane
30+
} from '../../appActions.js';
2731
import { scanForA11yViolations, test } from '../../avpFixtures.js';
2832
import { VISUAL_FIXED_URL } from '../../constants.js';
2933
import {
@@ -60,7 +64,7 @@ test.describe('Visual - Gantt Chart @a11y', () => {
6064
await percySnapshot(page, `Gantt Chart View (theme: ${theme}) - Clipped Activity Names`);
6165

6266
// Expand the inspect pane and uncheck the 'Clip Activity Names' option
63-
await page.getByRole('button', { name: 'Expand Inspect Pane' }).click();
67+
await expandInspectorPane(page);
6468
await page.getByRole('tab', { name: 'Config' }).click();
6569
await page.getByLabel('Edit Object').click();
6670
await page.getByLabel('Clip Activity Names').click();
@@ -94,7 +98,7 @@ test.describe('Visual - Gantt Chart @a11y', () => {
9498
await percySnapshot(page, `Gantt Chart View w/ draft status (theme: ${theme})`);
9599

96100
// Expand the inspect pane and uncheck the 'Clip Activity Names' option
97-
// await page.getByRole('button', { name: 'Expand Inspect Pane' }).click();
101+
await expandInspectorPane(page);
98102
await page.getByRole('tab', { name: 'Config' }).click();
99103
await page.getByLabel('Edit Object').click();
100104
await page.getByLabel('Clip Activity Names').click();

0 commit comments

Comments
 (0)