@@ -9,14 +9,17 @@ module.exports = {
9
9
browser
10
10
. url ( 'http://localhost:8080/basic/' )
11
11
. waitForElementVisible ( '#app' , 1000 )
12
- . assert . count ( 'li' , 7 )
13
- . assert . count ( 'li a' , 7 )
12
+ . assert . count ( 'li' , 8 )
13
+ . assert . count ( 'li a' , 8 )
14
14
// assert correct href with base
15
15
. assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/basic/' )
16
16
. assert . attributeContains ( 'li:nth-child(2) a' , 'href' , '/basic/foo' )
17
17
. assert . attributeContains ( 'li:nth-child(3) a' , 'href' , '/basic/bar' )
18
18
. assert . attributeContains ( 'li:nth-child(4) a' , 'href' , '/basic/bar' )
19
19
. assert . attributeContains ( 'li:nth-child(5) a' , 'href' , '/basic/%C3%A9' )
20
+ . assert . attributeContains ( 'li:nth-child(6) a' , 'href' , '/basic/%C3%A9?t=%25%C3%B1' )
21
+ . assert . attributeContains ( 'li:nth-child(7) a' , 'href' , '/basic/%C3%A9#%25%C3%B1' )
22
+ . assert . attributeContains ( 'li:nth-child(8) a' , 'href' , '/basic/foo' )
20
23
. assert . containsText ( '.view' , 'home' )
21
24
22
25
. click ( 'li:nth-child(2) a' )
@@ -55,6 +58,18 @@ module.exports = {
55
58
. click ( '#navigate-btn' )
56
59
. assert . containsText ( '#counter' , '2' )
57
60
61
+ // scoped slot
62
+ . assert . containsText ( 'li:nth-child(8) a' , '/foo (with v-slot)' )
63
+ . click ( 'li:nth-child(8) a' )
64
+ . assert . urlEquals ( 'http://localhost:8080/basic/foo' )
65
+ . assert . containsText ( '.view' , 'foo' )
66
+ . click ( 'li:nth-child(2) a' )
67
+ . assert . urlEquals ( 'http://localhost:8080/basic/foo' )
68
+ . assert . containsText ( '.view' , 'foo' )
69
+ . assert . cssClassPresent ( 'li:nth-child(8)' , 'active' )
70
+ . assert . cssClassPresent ( 'li:nth-child(8)' , 'exact-active' )
71
+ . assert . attributeEquals ( 'li:nth-child(8) a' , 'class' , '' )
72
+
58
73
. end ( )
59
74
}
60
75
}
0 commit comments