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