@@ -3,12 +3,14 @@ module.exports = {
3
3
browser
4
4
. url ( 'http://localhost:8080/hash-mode/' )
5
5
. 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 )
8
8
. assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/hash-mode/#/' )
9
9
. assert . attributeContains ( 'li:nth-child(2) a' , 'href' , '/hash-mode/#/foo' )
10
10
. assert . attributeContains ( 'li:nth-child(3) a' , 'href' , '/hash-mode/#/bar' )
11
11
. 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' )
12
14
. assert . containsText ( '.view' , 'home' )
13
15
14
16
. click ( 'li:nth-child(2) a' )
@@ -31,9 +33,24 @@ module.exports = {
31
33
. url ( 'http://localhost:8080/hash-mode/#/foo' )
32
34
. waitForElementVisible ( '#app' , 1000 )
33
35
. assert . containsText ( '.view' , 'foo' )
36
+ // direct visit encoded unicode
34
37
. url ( 'http://localhost:8080/hash-mode/#/%C3%A9' )
35
38
. waitForElementVisible ( '#app' , 1000 )
36
39
. 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' , '%' )
37
54
. end ( )
38
55
}
39
56
}
0 commit comments