@@ -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' ,
@@ -99,6 +102,7 @@ const {
99
102
flashMessageNameAlreadyExists,
100
103
flashMessageResetNamespace,
101
104
browserConfirmRemoveMessage,
105
+ dataStoreAccordionItem,
102
106
nameInputFieldId,
103
107
descriptionInputFieldId,
104
108
namespacePathInputFieldId,
@@ -125,7 +129,10 @@ function selectAccordionTree(textValue) {
125
129
'POST' ,
126
130
new RegExp ( `/miq_ae_class/tree_select\\?id=.*&text=${ textValue } ` )
127
131
) . as ( aliasObject [ textValue ] ) ;
128
- cy . accordionItem ( textValue ) ;
132
+ // Datastore is already set in the tree path, add domain/namespace to the path
133
+ const pathToTargetNode =
134
+ textValue === namespaceName ? [ domainName , namespaceName ] : [ domainName ] ;
135
+ cy . selectAccordionItem ( [ dataStoreAccordionItem , ...pathToTargetNode ] ) ;
129
136
cy . wait ( `@${ aliasObject [ textValue ] } ` ) ;
130
137
}
131
138
0 commit comments