1
+
1
2
module . exports = {
2
3
'active links' : function ( browser ) {
3
4
browser
4
5
. url ( 'http://localhost:8080/active-links/' )
5
6
. waitForElementVisible ( '#app' , 1000 )
6
- . assert . count ( 'li a' , 10 )
7
+ . assert . count ( 'li a' , 11 )
7
8
// assert correct href with base
8
9
. assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/active-links/' )
9
10
. assert . attributeContains ( 'li:nth-child(2) a' , 'href' , '/active-links/' )
@@ -12,9 +13,10 @@ module.exports = {
12
13
. assert . attributeContains ( 'li:nth-child(5) a' , 'href' , '/active-links/users/evan' )
13
14
. assert . attributeContains ( 'li:nth-child(6) a' , 'href' , '/active-links/users/evan#foo' )
14
15
. assert . attributeContains ( 'li:nth-child(7) a' , 'href' , '/active-links/users/evan?foo=bar' )
15
- . assert . attributeContains ( 'li:nth-child(8) a' , 'href' , '/active-links/users/evan?baz=qux& foo=bar' )
16
- . assert . attributeContains ( 'li:nth-child(9) a' , 'href' , '/active-links/about ' )
16
+ . assert . attributeContains ( 'li:nth-child(8) a' , 'href' , '/active-links/users/evan?foo=bar' )
17
+ . assert . attributeContains ( 'li:nth-child(9) a' , 'href' , '/active-links/users/evan?baz=qux&foo=bar ' )
17
18
. assert . attributeContains ( 'li:nth-child(10) a' , 'href' , '/active-links/about' )
19
+ . assert . attributeContains ( 'li:nth-child(11) a' , 'href' , '/active-links/about' )
18
20
. assert . containsText ( '.view' , 'Home' )
19
21
20
22
assertActiveLinks ( 1 , [ 1 , 2 ] )
@@ -23,10 +25,11 @@ module.exports = {
23
25
assertActiveLinks ( 4 , [ 1 , 3 , 4 ] )
24
26
assertActiveLinks ( 5 , [ 1 , 3 , 5 ] )
25
27
assertActiveLinks ( 6 , [ 1 , 3 , 5 , 6 ] )
26
- assertActiveLinks ( 7 , [ 1 , 3 , 5 , 7 ] )
28
+ assertActiveLinks ( 7 , [ 1 , 3 , 5 , 7 , 8 ] )
27
29
assertActiveLinks ( 8 , [ 1 , 3 , 5 , 7 , 8 ] )
28
- assertActiveLinks ( 9 , [ 1 , 9 ] , [ 10 ] )
29
- assertActiveLinks ( 10 , [ 1 , 9 ] , [ 10 ] )
30
+ assertActiveLinks ( 9 , [ 1 , 3 , 5 , 7 , 9 ] )
31
+ assertActiveLinks ( 10 , [ 1 , 10 ] , [ 11 ] )
32
+ assertActiveLinks ( 11 , [ 1 , 10 ] , [ 11 ] )
30
33
31
34
browser . end ( )
32
35
0 commit comments