mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 23:53:49 +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:
@ -57,7 +57,7 @@ test.describe('Visual - Tree Pane', () => {
|
||||
name: 'Z Clock'
|
||||
});
|
||||
|
||||
const treePane = "#tree-pane";
|
||||
const treePane = "[role=tree][aria-label='Main Tree']";
|
||||
|
||||
await percySnapshot(page, `Tree Pane w/ collapsed tree (theme: ${theme})`, {
|
||||
scope: treePane
|
||||
@ -94,7 +94,7 @@ test.describe('Visual - Tree Pane', () => {
|
||||
* @param {string} name
|
||||
*/
|
||||
async function expandTreePaneItemByName(page, name) {
|
||||
const treePane = page.locator('#tree-pane');
|
||||
const treePane = page.getByTestId('tree-pane');
|
||||
const treeItem = treePane.locator(`role=treeitem[expanded=false][name=/${name}/]`);
|
||||
const expandTriangle = treeItem.locator('.c-disclosure-triangle');
|
||||
await expandTriangle.click();
|
||||
|
Reference in New Issue
Block a user