File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
examples/navigation-guards Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ const Bar = { template: '<div>bar</div>' }
1616function guardRoute ( route , redirect , next ) {
1717 if ( window . confirm ( `Navigate to ${ route . path } ?` ) ) {
1818 next ( )
19- } else if ( window . confirm ( `Redirect to home ?` ) ) {
20- redirect ( '/' )
19+ } else if ( window . confirm ( `Redirect to /baz ?` ) ) {
20+ redirect ( '/baz ' )
2121 }
2222}
2323
Original file line number Diff line number Diff line change @@ -38,11 +38,7 @@ module.exports = {
3838 . click ( 'li:nth-child(2) a' )
3939 . dismissAlert ( )
4040 . waitFor ( 100 )
41- . acceptAlert ( ) // redirect to home
42- . assert . urlEquals ( 'http://localhost:8080/navigation-guards/' )
43- . assert . containsText ( '.view' , 'home' )
44-
45- . click ( 'li:nth-child(4) a' )
41+ . acceptAlert ( ) // redirect to baz
4642 . assert . urlEquals ( 'http://localhost:8080/navigation-guards/baz' )
4743 . assert . containsText ( '.view' , 'baz (not saved)' )
4844
You can’t perform that action at this time.
0 commit comments