mirror of
https://github.com/nasa/openmct.git
synced 2025-06-22 17:08:57 +00:00
Make tree items more actionable and add AppAction for expanding the object tree (#5997)
* style: add `visibility` to tree expand triangles - The purpose of this is so that Playwright can perform actionability checks on the tree items. This will make operations involving expanding tree items much easier to perform in e2e. * feat(e2e): Add AppAction to expand the entire tree * fix: wait for loading indicator * test: add test for `expandEntireTree` * test: update `expandEntireTree` and tree selectors - Use dynamic aria-label for different tree implementations - Get rid of CSS ids which are only for testing - Update percy tree scope selector * chore(lint): remove unused variable * refactor(e2e): update tree locators Co-authored-by: John Hill <john.c.hill@nasa.gov>
This commit is contained in:
@ -40,7 +40,9 @@ test.describe('Flexible Layout', () => {
|
||||
});
|
||||
});
|
||||
test('panes have the appropriate draggable attribute while in Edit and Browse modes', async ({ page }) => {
|
||||
const treePane = page.locator('#tree-pane');
|
||||
const treePane = page.getByRole('tree', {
|
||||
name: 'Main Tree'
|
||||
});
|
||||
const sineWaveGeneratorTreeItem = treePane.getByRole('treeitem', {
|
||||
name: new RegExp(sineWaveObject.name)
|
||||
});
|
||||
@ -70,7 +72,9 @@ test.describe('Flexible Layout', () => {
|
||||
await expect(dragWrapper).toHaveAttribute('draggable', 'false');
|
||||
});
|
||||
test('items in a flexible layout can be removed with object tree context menu when viewing the flexible layout', async ({ page }) => {
|
||||
const treePane = page.locator('#tree-pane');
|
||||
const treePane = page.getByRole('tree', {
|
||||
name: 'Main Tree'
|
||||
});
|
||||
const sineWaveGeneratorTreeItem = treePane.getByRole('treeitem', {
|
||||
name: new RegExp(sineWaveObject.name)
|
||||
});
|
||||
@ -106,7 +110,9 @@ test.describe('Flexible Layout', () => {
|
||||
type: 'issue',
|
||||
description: 'https://github.com/nasa/openmct/issues/3117'
|
||||
});
|
||||
const treePane = page.locator('#tree-pane');
|
||||
const treePane = page.getByRole('tree', {
|
||||
name: 'Main Tree'
|
||||
});
|
||||
const sineWaveGeneratorTreeItem = treePane.getByRole('treeitem', {
|
||||
name: new RegExp(sineWaveObject.name)
|
||||
});
|
||||
|
Reference in New Issue
Block a user