@@ -333,6 +333,50 @@ describe('Routing', () => {
333
333
cy . ionPageVisible ( 'home' ) ;
334
334
cy . ionPageDoesNotExist ( 'routing' ) ;
335
335
cy . ionPageDoesNotExist ( 'routingparameter-abc' ) ;
336
+ } ) ;
337
+
338
+ it . only ( 'should choose correct view when navigating back' , ( ) => {
339
+ cy . visit ( 'http://localhost:8080' ) ;
340
+
341
+ cy . routerPush ( '/routing' ) ;
342
+ cy . ionPageVisible ( 'routing' ) ;
343
+ cy . ionPageHidden ( 'home' ) ;
344
+
345
+ cy . routerPush ( '/routing/123/view' ) ;
346
+ cy . ionPageVisible ( 'routingparameterview' ) ;
347
+ cy . ionPageHidden ( 'routing' ) ;
348
+
349
+ cy . routerPush ( '/routing/child' ) ;
350
+ cy . ionPageVisible ( 'routingchild' ) ;
351
+ cy . ionPageHidden ( 'routing' ) ;
352
+
353
+ cy . ionBackClick ( 'routingchild' ) ;
354
+ cy . ionPageVisible ( 'routingparameterview' ) ;
355
+ cy . ionPageDoesNotExist ( 'routingchild' ) ;
356
+
357
+ cy . ionBackClick ( 'routingparameterview' ) ;
358
+ cy . ionPageVisible ( 'routing' ) ;
359
+ cy . ionPageDoesNotExist ( 'routingparameterview' ) ;
360
+
361
+ cy . ionBackClick ( 'routing' ) ;
362
+ cy . ionPageVisible ( 'home' ) ;
363
+ cy . ionPageDoesNotExist ( 'routing' ) ;
364
+
365
+ cy . routerPush ( '/routing' ) ;
366
+ cy . ionPageVisible ( 'routing' ) ;
367
+ cy . ionPageHidden ( 'home' ) ;
368
+
369
+ cy . routerPush ( '/routing/456/view' ) ;
370
+ cy . ionPageVisible ( 'routingparameterview' ) ;
371
+ cy . ionPageHidden ( 'routing' ) ;
372
+
373
+ cy . routerPush ( '/routing/child' ) ;
374
+ cy . ionPageVisible ( 'routingchild' ) ;
375
+ cy . ionPageHidden ( 'routing' ) ;
376
+
377
+ cy . ionBackClick ( 'routingchild' ) ;
378
+ cy . ionPageVisible ( 'routingparameterview' ) ;
379
+ cy . ionPageDoesNotExist ( 'routingchild' ) ;
336
380
} )
337
381
} ) ;
338
382
0 commit comments