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