@@ -193,7 +193,6 @@ describe('Automate Collect logs Edit form operations', () => {
193
193
beforeEach ( ( ) => {
194
194
registeredApiIntercepts = { } ;
195
195
cy . login ( ) ;
196
- cy . wait ( 500 ) ;
197
196
// Navigate to Application settings and Select Diagnostics
198
197
cy . menu ( settingsMenuOption , appSettingsMenuOption ) ;
199
198
interceptAndAwaitApi ( {
@@ -229,20 +228,19 @@ describe('Automate Collect logs Edit form operations', () => {
229
228
} ) ;
230
229
231
230
after ( ( ) => {
232
- cy ?. url ( ) ?. then ( ( url ) => {
233
- // Ensures navigation to Settings -> Application-Settings in the UI
234
- if ( url ?. includes ( componentRouteUrl ) ) {
231
+ cy . url ( )
232
+ ?. then ( ( url ) => {
233
+ // Ensures navigation to Settings -> Application-Settings in the UI
234
+ if ( ! url ?. includes ( componentRouteUrl ) ) {
235
+ // Navigate to Settings -> Application-Settings before cleanup
236
+ cy . menu ( settingsMenuOption , appSettingsMenuOption ) ;
237
+ }
238
+ } )
239
+ . then ( ( ) => {
235
240
resetProtocolDropdown ( {
236
241
currentApiIntercepts : registeredApiIntercepts ,
237
242
} ) ;
238
- } else {
239
- // Navigate to Settings -> Application-Settings before selecting Diagnostics
240
- cy . menu ( settingsMenuOption , appSettingsMenuOption ) ;
241
- resetProtocolDropdown ( {
242
- currentApiIntercepts : registeredApiIntercepts ,
243
- } ) ;
244
- }
245
- } ) ;
243
+ } ) ;
246
244
} ) ;
247
245
} ) ;
248
246
@@ -274,22 +272,20 @@ describe('Automate Collect logs Edit form operations', () => {
274
272
} ) ;
275
273
276
274
after ( ( ) => {
277
- cy ?. url ( ) ?. then ( ( url ) => {
278
- // Ensures navigation to Settings -> Application-Settings in the UI
279
- if ( url ?. includes ( componentRouteUrl ) ) {
275
+ cy . url ( )
276
+ ?. then ( ( url ) => {
277
+ // Ensures navigation to Settings -> Application-Settings in the UI
278
+ if ( ! url ?. includes ( componentRouteUrl ) ) {
279
+ // Navigate to Settings -> Application-Settings before cleanup
280
+ cy . menu ( settingsMenuOption , appSettingsMenuOption ) ;
281
+ }
282
+ } )
283
+ . then ( ( ) => {
280
284
resetProtocolDropdown ( {
281
285
currentApiIntercepts : registeredApiIntercepts ,
282
286
selectServerListItem : false ,
283
287
} ) ;
284
- } else {
285
- // Navigate to Settings -> Application-Settings before selecting Diagnostics
286
- cy . menu ( settingsMenuOption , appSettingsMenuOption ) ;
287
- resetProtocolDropdown ( {
288
- currentApiIntercepts : registeredApiIntercepts ,
289
- selectServerListItem : false ,
290
- } ) ;
291
- }
292
- } ) ;
288
+ } ) ;
293
289
} ) ;
294
290
} ) ;
295
291
} ) ;
0 commit comments