@@ -2,7 +2,7 @@ module.exports = {
2
2
'Hash mode' : function ( browser ) {
3
3
browser
4
4
. url ( 'http://localhost:8080/hash-mode/' )
5
- . waitForElementVisible ( '#app' , 1000 )
5
+ . waitForElementVisible ( '#app' , 2000 )
6
6
. assert . count ( 'li' , 5 )
7
7
. assert . count ( 'li a' , 4 )
8
8
. assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/hash-mode/#/' )
@@ -27,13 +27,25 @@ module.exports = {
27
27
. assert . urlEquals ( 'http://localhost:8080/hash-mode/#/bar' )
28
28
. assert . containsText ( '.view' , 'bar' )
29
29
30
- // check initial visit
30
+ // check initial visit
31
31
. url ( 'http://localhost:8080/hash-mode/#/foo' )
32
32
. waitForElementVisible ( '#app' , 1000 )
33
33
. assert . containsText ( '.view' , 'foo' )
34
34
. url ( 'http://localhost:8080/hash-mode/#/%C3%A9' )
35
35
. waitForElementVisible ( '#app' , 1000 )
36
36
. assert . containsText ( '.view' , 'unicode' )
37
37
. end ( )
38
+
39
+ // check hash placed correctly
40
+ . url ( 'http://localhost:8080/hash-mode/foo?page=123' )
41
+ . waitForElementVisible ( '#app' , 1000 )
42
+ . assert . urlEquals ( 'http://localhost:8080/hash-mode/#/foo?page=123' )
43
+ . assert . count ( 'li' , 4 )
44
+ . assert . count ( 'li a' , 3 )
45
+ . assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/hash-mode/#/' )
46
+ . assert . attributeContains ( 'li:nth-child(2) a' , 'href' , '/hash-mode/#/foo' )
47
+ . assert . attributeContains ( 'li:nth-child(3) a' , 'href' , '/hash-mode/#/bar' )
48
+ . assert . containsText ( '.view' , 'foo' )
49
+ . end ( )
38
50
}
39
51
}
0 commit comments