1
+ const $attrs = ' { "foo": "123" }'
2
+
1
3
module . exports = {
2
4
'route-props' : function ( browser ) {
3
5
browser
@@ -6,23 +8,29 @@ module.exports = {
6
8
. assert . count ( 'li a' , 5 )
7
9
8
10
. assert . urlEquals ( 'http://localhost:8080/route-props/' )
9
- . assert . containsText ( '.hello' , 'Hello Vue!' )
11
+ . assert . containsText ( '.hello' , 'Hello Vue!' + $attrs )
10
12
11
13
. click ( 'li:nth-child(2) a' )
12
14
. assert . urlEquals ( 'http://localhost:8080/route-props/hello/you' )
13
- . assert . containsText ( '.hello' , 'Hello you' )
15
+ . assert . containsText ( '.hello' , 'Hello you' + $attrs )
14
16
15
17
. click ( 'li:nth-child(3) a' )
16
18
. assert . urlEquals ( 'http://localhost:8080/route-props/static' )
17
- . assert . containsText ( '.hello' , 'Hello world' )
19
+ . assert . containsText ( '.hello' , 'Hello world' + $attrs )
18
20
19
21
. click ( 'li:nth-child(4) a' )
20
22
. assert . urlEquals ( 'http://localhost:8080/route-props/dynamic/1' )
21
- . assert . containsText ( '.hello' , 'Hello ' + ( ( new Date ( ) ) . getFullYear ( ) + 1 ) + '!' )
23
+ . assert . containsText ( '.hello' , 'Hello ' + ( ( new Date ( ) ) . getFullYear ( ) + 1 ) + '!' + $attrs )
22
24
23
25
. click ( 'li:nth-child(5) a' )
24
26
. assert . urlEquals ( 'http://localhost:8080/route-props/attrs' )
25
- . assert . containsText ( '.hello' , 'Hello attrs' )
27
+ . assert . containsText ( '.hello' , 'Hello attrs' + $attrs )
28
+
29
+ // should be consistent
30
+ . click ( 'li:nth-child(4) a' )
31
+ . click ( 'li:nth-child(5) a' )
32
+ . assert . urlEquals ( 'http://localhost:8080/route-props/attrs' )
33
+ . assert . containsText ( '.hello' , 'Hello attrs' + $attrs )
26
34
27
35
. end ( )
28
36
}
0 commit comments