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 @@ -281,15 +281,21 @@ describe('Automate operations on Namespaces: Automation -> Embedded Automate ->
281281 } ) ;
282282
283283 afterEach ( ( ) => {
284- // Selecting the created domain(Test_Domain) from the accordion list items
285- selectAccordionTree ( dataStoreAccordionItem ) ;
286- cy . accordionItem ( domainName ) ;
287- cy . wait ( '@getCreatedDomainInfo' ) ;
288- // Removing the domain
289- cy . expect_browser_confirm_with_text ( {
290- confirmTriggerFn : ( ) =>
291- cy . toolbar ( toolbarConfiguration , toolbarRemoveDomain ) ,
292- containsText : browserConfirmRemoveMessage ,
284+ // retrieve the id and token from the aliased state
285+ // to invoke api for deleting the created domain
286+ cy . get ( '@idAndToken' ) . then ( ( data ) => {
287+ const { domainId, csrfToken } = data ;
288+ if ( domainId && csrfToken ) {
289+ cy . request ( {
290+ method : 'POST' ,
291+ url : `/miq_ae_class/x_button/${ domainId } ?pressed=miq_ae_domain_delete` ,
292+ headers : {
293+ 'X-CSRF-Token' : csrfToken ,
294+ } ,
295+ } ) . then ( ( response ) => {
296+ expect ( response . status ) . to . eq ( 200 ) ;
297+ } ) ;
298+ }
293299 } ) ;
294300 } ) ;
295301} ) ;
You can’t perform that action at this time.
0 commit comments