@@ -40,6 +40,9 @@ const textConstants = {
4040 editNamespaceFormHeader : 'Editing Automate Namespace' ,
4141 namespaceFormSubHeader : 'Info' ,
4242
43+ // List items
44+ dataStoreAccordionItem : 'Datastore' ,
45+
4346 // Buttons
4447 addButton : 'Add' ,
4548 cancelButton : 'Cancel' ,
@@ -98,6 +101,7 @@ const {
98101 flashMessageNameAlreadyExists,
99102 flashMessageResetNamespace,
100103 browserConfirmRemoveMessage,
104+ dataStoreAccordionItem,
101105 nameInputFieldId,
102106 descriptionInputFieldId,
103107 namespacePathInputFieldId,
@@ -124,7 +128,10 @@ function selectAccordionTree(textValue) {
124128 'POST' ,
125129 new RegExp ( `/miq_ae_class/tree_select\\?id=.*&text=${ textValue } ` )
126130 ) . as ( aliasObject [ textValue ] ) ;
127- cy . accordionItem ( textValue ) ;
131+ // Datastore is already set in the tree path, add domain/namespace to the path
132+ const pathToTargetNode =
133+ textValue === namespaceName ? [ domainName , namespaceName ] : [ domainName ] ;
134+ cy . selectAccordionItem ( [ dataStoreAccordionItem , ...pathToTargetNode ] ) ;
128135 cy . wait ( `@${ aliasObject [ textValue ] } ` ) ;
129136}
130137
0 commit comments