@@ -3,13 +3,14 @@ module.exports = {
33 browser
44 . url ( 'http://localhost:8080/route-alias/' )
55 . waitForElementVisible ( '#app' , 1000 )
6- . assert . count ( 'li a' , 5 )
6+ . assert . count ( 'li a' , 6 )
77 // assert correct href with base
88 . assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/route-alias/foo' )
99 . assert . attributeContains ( 'li:nth-child(2) a' , 'href' , '/route-alias/home/bar-alias' )
1010 . assert . attributeContains ( 'li:nth-child(3) a' , 'href' , '/route-alias/baz' )
1111 . assert . attributeContains ( 'li:nth-child(4) a' , 'href' , '/route-alias/home/baz-alias' )
1212 . assert . attributeEquals ( 'li:nth-child(5) a' , 'href' , 'http://localhost:8080/route-alias/home' )
13+ . assert . attributeContains ( 'li:nth-child(6) a' , 'href' , '/route-alias/home/nested-alias/foo' )
1314
1415 . click ( 'li:nth-child(1) a' )
1516 . assert . urlEquals ( 'http://localhost:8080/route-alias/foo' )
@@ -30,11 +31,17 @@ module.exports = {
3031 . assert . urlEquals ( 'http://localhost:8080/route-alias/home/baz-alias' )
3132 . assert . containsText ( '.view' , 'Home' )
3233 . assert . containsText ( '.view' , 'baz' )
34+
3335 . click ( 'li:nth-child(5) a' )
3436 . assert . urlEquals ( 'http://localhost:8080/route-alias/home' )
3537 . assert . containsText ( '.view' , 'Home' )
3638 . assert . containsText ( '.view' , 'default' )
3739
40+ . click ( 'li:nth-child(6) a' )
41+ . assert . urlEquals ( 'http://localhost:8080/route-alias/home/nested-alias/foo' )
42+ . assert . containsText ( '.view' , 'Home' )
43+ . assert . containsText ( '.view' , 'nested foo' )
44+
3845 // check initial visit
3946 . url ( 'http://localhost:8080/route-alias/foo' )
4047 . waitForElementVisible ( '#app' , 1000 )
@@ -65,6 +72,12 @@ module.exports = {
6572 . assert . urlEquals ( 'http://localhost:8080/route-alias/home' )
6673 . assert . containsText ( '.view' , 'Home' )
6774 . assert . containsText ( '.view' , 'default' )
75+
76+ . url ( 'http://localhost:8080/route-alias/home/nested-alias/foo' )
77+ . waitForElementVisible ( '#app' , 1000 )
78+ . assert . urlEquals ( 'http://localhost:8080/route-alias/home/nested-alias/foo' )
79+ . assert . containsText ( '.view' , 'Home' )
80+ . assert . containsText ( '.view' , 'nested foo' )
6881 . end ( )
6982 }
7083}
0 commit comments