@@ -3,12 +3,14 @@ module.exports = {
33 browser
44 . url ( 'http://localhost:8080/hash-mode/' )
55 . waitForElementVisible ( '#app' , 1000 )
6- . assert . count ( 'li' , 5 )
7- . assert . count ( 'li a' , 4 )
6+ . assert . count ( 'li' , 8 )
7+ . assert . count ( 'li a' , 7 )
88 . assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/hash-mode/#/' )
99 . assert . attributeContains ( 'li:nth-child(2) a' , 'href' , '/hash-mode/#/foo' )
1010 . assert . attributeContains ( 'li:nth-child(3) a' , 'href' , '/hash-mode/#/bar' )
1111 . assert . attributeContains ( 'li:nth-child(5) a' , 'href' , '/hash-mode/#/%C3%A9' )
12+ . assert . attributeContains ( 'li:nth-child(6) a' , 'href' , '/hash-mode/#/%C3%A9/%C3%B1' )
13+ . assert . attributeContains ( 'li:nth-child(7) a' , 'href' , '/hash-mode/#/%C3%A9/%C3%B1?t=%25%C3%B1' )
1214 . assert . containsText ( '.view' , 'home' )
1315
1416 . click ( 'li:nth-child(2) a' )
@@ -31,9 +33,24 @@ module.exports = {
3133 . url ( 'http://localhost:8080/hash-mode/#/foo' )
3234 . waitForElementVisible ( '#app' , 1000 )
3335 . assert . containsText ( '.view' , 'foo' )
36+ // direct visit encoded unicode
3437 . url ( 'http://localhost:8080/hash-mode/#/%C3%A9' )
3538 . waitForElementVisible ( '#app' , 1000 )
3639 . assert . containsText ( '.view' , 'unicode' )
40+ // direct visit raw unicode
41+ . url ( 'http://localhost:8080/hash-mode/#/%C3%A9/%C3%B1' )
42+ . waitForElementVisible ( '#app' , 1000 )
43+ . assert . containsText ( '.view' , 'unicode: ñ' )
44+ // TODO: Doesn't seem to work on PhantomJS
45+ // .click('li:nth-child(7)')
46+ // .assert.urlEquals('http://localhost:8080/hash-mode/#/%C3%A9/%C3%B1?t=%25')
47+ // .assert.containsText('.view', 'unicode: ñ')
48+ // .assert.containsText('#query-t', '%')
49+ // direct visit
50+ . url ( 'http://localhost:8080/hash-mode/#/%C3%A9/%C3%B1?t=%25' )
51+ . waitForElementVisible ( '#app' , 1000 )
52+ . assert . containsText ( '.view' , 'unicode: ñ' )
53+ . assert . containsText ( '#query-t' , '%' )
3754 . end ( )
3855 }
3956}
0 commit comments