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