@@ -3,12 +3,13 @@ module.exports = {
3
3
browser
4
4
. url ( 'http://localhost:8080/route-alias/' )
5
5
. waitForElementVisible ( '#app' , 1000 )
6
- . assert . count ( 'li a' , 4 )
6
+ . assert . count ( 'li a' , 5 )
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
+ . assert . attributeEquals ( 'li:nth-child(5) a' , 'href' , 'http://localhost:8080/route-alias/home' )
12
13
13
14
. click ( 'li:nth-child(1) a' )
14
15
. assert . urlEquals ( 'http://localhost:8080/route-alias/foo' )
@@ -29,6 +30,10 @@ module.exports = {
29
30
. assert . urlEquals ( 'http://localhost:8080/route-alias/home/baz-alias' )
30
31
. assert . containsText ( '.view' , 'Home' )
31
32
. assert . containsText ( '.view' , 'baz' )
33
+ . click ( 'li:nth-child(5) a' )
34
+ . assert . urlEquals ( 'http://localhost:8080/route-alias/home' )
35
+ . assert . containsText ( '.view' , 'Home' )
36
+ . assert . containsText ( '.view' , 'default' )
32
37
33
38
// check initial visit
34
39
. url ( 'http://localhost:8080/route-alias/foo' )
@@ -54,6 +59,12 @@ module.exports = {
54
59
. assert . urlEquals ( 'http://localhost:8080/route-alias/home/baz-alias' )
55
60
. assert . containsText ( '.view' , 'Home' )
56
61
. assert . containsText ( '.view' , 'baz' )
62
+
63
+ . url ( 'http://localhost:8080/route-alias/home' )
64
+ . waitForElementVisible ( '#app' , 1000 )
65
+ . assert . urlEquals ( 'http://localhost:8080/route-alias/home' )
66
+ . assert . containsText ( '.view' , 'Home' )
67
+ . assert . containsText ( '.view' , 'default' )
57
68
. end ( )
58
69
}
59
70
}
0 commit comments