@@ -3,13 +3,14 @@ module.exports = {
3
3
browser
4
4
. url ( 'http://localhost:8080/route-alias/' )
5
5
. waitForElementVisible ( '#app' , 1000 )
6
- . assert . count ( 'li a' , 5 )
6
+ . assert . count ( 'li a' , 6 )
7
7
// assert correct href with base
8
8
. assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/route-alias/foo' )
9
9
. assert . attributeContains ( 'li:nth-child(2) a' , 'href' , '/route-alias/home/bar-alias' )
10
10
. assert . attributeContains ( 'li:nth-child(3) a' , 'href' , '/route-alias/baz' )
11
11
. assert . attributeContains ( 'li:nth-child(4) a' , 'href' , '/route-alias/home/baz-alias' )
12
12
. 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' )
13
14
14
15
. click ( 'li:nth-child(1) a' )
15
16
. assert . urlEquals ( 'http://localhost:8080/route-alias/foo' )
@@ -30,11 +31,17 @@ module.exports = {
30
31
. assert . urlEquals ( 'http://localhost:8080/route-alias/home/baz-alias' )
31
32
. assert . containsText ( '.view' , 'Home' )
32
33
. assert . containsText ( '.view' , 'baz' )
34
+
33
35
. click ( 'li:nth-child(5) a' )
34
36
. assert . urlEquals ( 'http://localhost:8080/route-alias/home' )
35
37
. assert . containsText ( '.view' , 'Home' )
36
38
. assert . containsText ( '.view' , 'default' )
37
39
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
+
38
45
// check initial visit
39
46
. url ( 'http://localhost:8080/route-alias/foo' )
40
47
. waitForElementVisible ( '#app' , 1000 )
@@ -65,6 +72,12 @@ module.exports = {
65
72
. assert . urlEquals ( 'http://localhost:8080/route-alias/home' )
66
73
. assert . containsText ( '.view' , 'Home' )
67
74
. 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' )
68
81
. end ( )
69
82
}
70
83
}
0 commit comments