@@ -40,6 +40,9 @@ const textConstants = {
40
40
editNamespaceFormHeader : 'Editing Automate Namespace' ,
41
41
namespaceFormSubHeader : 'Info' ,
42
42
43
+ // List items
44
+ dataStoreAccordionItem : 'Datastore' ,
45
+
43
46
// Buttons
44
47
addButton : 'Add' ,
45
48
cancelButton : 'Cancel' ,
@@ -98,6 +101,7 @@ const {
98
101
flashMessageNameAlreadyExists,
99
102
flashMessageResetNamespace,
100
103
browserConfirmRemoveMessage,
104
+ dataStoreAccordionItem,
101
105
nameInputFieldId,
102
106
descriptionInputFieldId,
103
107
namespacePathInputFieldId,
@@ -124,7 +128,10 @@ function selectAccordionTree(textValue) {
124
128
'POST' ,
125
129
new RegExp ( `/miq_ae_class/tree_select\\?id=.*&text=${ textValue } ` )
126
130
) . 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 ] ) ;
128
135
cy . wait ( `@${ aliasObject [ textValue ] } ` ) ;
129
136
}
130
137
0 commit comments