@@ -9,8 +9,8 @@ module.exports = {
9
9
browser
10
10
. url ( 'http://localhost:8080/basic/' )
11
11
. waitForElementVisible ( '#app' , 1000 )
12
- . assert . count ( 'li' , 11 )
13
- . assert . count ( 'li a' , 11 )
12
+ . assert . count ( 'li' , 12 )
13
+ . assert . count ( 'li a' , 12 )
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' )
@@ -20,6 +20,7 @@ module.exports = {
20
20
. assert . attributeContains ( 'li:nth-child(6) a' , 'href' , '/basic/%C3%A9?t=%25%C3%B1' )
21
21
. assert . attributeContains ( 'li:nth-child(7) a' , 'href' , '/basic/%C3%A9#%25%C3%B1' )
22
22
. assert . attributeContains ( 'li:nth-child(8) a' , 'href' , '/basic/foo' )
23
+ . assert . attributeContains ( 'li:nth-child(10) a' , 'href' , '/basic/query/A%' )
23
24
. assert . containsText ( '.view' , 'home' )
24
25
25
26
. click ( 'li:nth-child(2) a' )
@@ -70,6 +71,15 @@ module.exports = {
70
71
. assert . cssClassPresent ( 'li:nth-child(8)' , 'exact-active' )
71
72
. assert . attributeEquals ( 'li:nth-child(8) a' , 'class' , '' )
72
73
74
+ // encoded percentage as path param
75
+ // https://github.com/vuejs/vue-router/issues/2725
76
+ . url ( 'http://localhost:8080/basic/query/A%25' )
77
+ . waitForElementVisible ( '#app' , 1000 )
78
+ . assert . containsText ( '.view' , 'query: "A%"' )
79
+ . click ( 'li:nth-child(10) a' )
80
+ . assert . urlEquals ( 'http://localhost:8080/basic/query/A%25' )
81
+ . assert . containsText ( '.view' , 'query: "A%"' )
82
+
73
83
// Listener cleanup
74
84
. assert . containsText ( '#popstate-count' , '1 popstate listeners' )
75
85
. click ( '#unmount' )
@@ -84,8 +94,8 @@ module.exports = {
84
94
. waitForElementVisible ( '#app' , 1000 )
85
95
. assert . containsText ( '.view' , 'home' )
86
96
// go to foo with a delay
97
+ . click ( 'li:nth-child(12) a' )
87
98
. click ( 'li:nth-child(11) a' )
88
- . click ( 'li:nth-child(10) a' )
89
99
. waitFor ( 300 )
90
100
// we should stay at /basic after the delay
91
101
. assert . urlEquals ( 'http://localhost:8080/basic/?delay=200' )
0 commit comments