File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
cypress/e2e/ui/Automation/Embedded-Automate/Explorer Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -294,15 +294,21 @@ describe('Automate operations on Namespaces: Automation -> Embedded Automate ->
294
294
} ) ;
295
295
296
296
afterEach ( ( ) => {
297
- // Selecting the created domain(Test_Domain) from the accordion list items
298
- selectAccordionTree ( dataStoreAccordionItem ) ;
299
- cy . accordionItem ( domainName ) ;
300
- cy . wait ( '@getCreatedDomainInfo' ) ;
301
- // Removing the domain
302
- cy . expect_browser_confirm_with_text ( {
303
- confirmTriggerFn : ( ) =>
304
- cy . toolbar ( toolbarConfiguration , toolbarRemoveDomain ) ,
305
- containsText : browserConfirmRemoveMessage ,
297
+ // retrieve the id and token from the aliased state
298
+ // to invoke api for deleting the created domain
299
+ cy . get ( '@idAndToken' ) . then ( ( data ) => {
300
+ const { domainId, csrfToken } = data ;
301
+ if ( domainId && csrfToken ) {
302
+ cy . request ( {
303
+ method : 'POST' ,
304
+ url : `/miq_ae_class/x_button/${ domainId } ?pressed=miq_ae_domain_delete` ,
305
+ headers : {
306
+ 'X-CSRF-Token' : csrfToken ,
307
+ } ,
308
+ } ) . then ( ( response ) => {
309
+ expect ( response . status ) . to . eq ( 200 ) ;
310
+ } ) ;
311
+ }
306
312
} ) ;
307
313
} ) ;
308
314
} ) ;
You can’t perform that action at this time.
0 commit comments