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:
@@ -22,7 +22,6 @@
|
||||
|
||||
<template>
|
||||
<mct-tree
|
||||
id="locator-tree"
|
||||
:is-selector-tree="true"
|
||||
:initial-selection="model.parent"
|
||||
@tree-item-selection="handleItemSelection"
|
||||
|
||||
@@ -270,9 +270,11 @@ button {
|
||||
flex: 0 0 auto;
|
||||
width: $d;
|
||||
position: relative;
|
||||
visibility: hidden;
|
||||
|
||||
&.is-enabled {
|
||||
cursor: pointer;
|
||||
visibility: visible;
|
||||
|
||||
&:hover {
|
||||
color: $colorDisclosureCtrlHov;
|
||||
|
||||
@@ -79,9 +79,7 @@
|
||||
<multipane
|
||||
type="vertical"
|
||||
>
|
||||
<pane
|
||||
id="tree-pane"
|
||||
>
|
||||
<pane>
|
||||
<mct-tree
|
||||
ref="mctTree"
|
||||
:sync-tree-navigation="triggerSync"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
ref="mainTree"
|
||||
class="c-tree-and-search__tree c-tree"
|
||||
role="tree"
|
||||
:aria-label="getAriaLabel"
|
||||
aria-expanded="true"
|
||||
>
|
||||
|
||||
@@ -192,6 +193,9 @@ export default {
|
||||
focusedItems() {
|
||||
return this.activeSearch ? this.searchResultItems : this.treeItems;
|
||||
},
|
||||
getAriaLabel() {
|
||||
return this.isSelectorTree ? "Create Modal Tree" : "Main Tree";
|
||||
},
|
||||
pageThreshold() {
|
||||
return Math.ceil(this.mainTreeHeight / this.itemHeight) + ITEM_BUFFER;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user