@@ -9,8 +9,8 @@ module.exports = {
99 browser
1010 . url ( 'http://localhost:8080/basic/' )
1111 . 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 )
1414 // assert correct href with base
1515 . assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/basic/' )
1616 . assert . attributeContains ( 'li:nth-child(2) a' , 'href' , '/basic/foo' )
@@ -20,6 +20,7 @@ module.exports = {
2020 . assert . attributeContains ( 'li:nth-child(6) a' , 'href' , '/basic/%C3%A9?t=%25%C3%B1' )
2121 . assert . attributeContains ( 'li:nth-child(7) a' , 'href' , '/basic/%C3%A9#%25%C3%B1' )
2222 . assert . attributeContains ( 'li:nth-child(8) a' , 'href' , '/basic/foo' )
23+ . assert . attributeContains ( 'li:nth-child(10) a' , 'href' , '/basic/query/A%' )
2324 . assert . containsText ( '.view' , 'home' )
2425
2526 . click ( 'li:nth-child(2) a' )
@@ -70,6 +71,15 @@ module.exports = {
7071 . assert . cssClassPresent ( 'li:nth-child(8)' , 'exact-active' )
7172 . assert . attributeEquals ( 'li:nth-child(8) a' , 'class' , '' )
7273
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+
7383 // Listener cleanup
7484 . assert . containsText ( '#popstate-count' , '1 popstate listeners' )
7585 . click ( '#unmount' )
@@ -84,8 +94,8 @@ module.exports = {
8494 . waitForElementVisible ( '#app' , 1000 )
8595 . assert . containsText ( '.view' , 'home' )
8696 // go to foo with a delay
97+ . click ( 'li:nth-child(12) a' )
8798 . click ( 'li:nth-child(11) a' )
88- . click ( 'li:nth-child(10) a' )
8999 . waitFor ( 300 )
90100 // we should stay at /basic after the delay
91101 . assert . urlEquals ( 'http://localhost:8080/basic/?delay=200' )
0 commit comments