@@ -9,7 +9,7 @@ module.exports = {
9
9
browser
10
10
. url ( 'http://localhost:8080/active-links/' )
11
11
. waitForElementVisible ( '#app' , 1000 )
12
- . assert . count ( 'li a' , 14 )
12
+ . assert . count ( 'li a' , 19 )
13
13
// assert correct href with base
14
14
. assert . attributeContains ( 'li:nth-child(1) a' , 'href' , '/active-links/' )
15
15
. assert . attributeContains ( 'li:nth-child(2) a' , 'href' , '/active-links/' )
@@ -23,8 +23,13 @@ module.exports = {
23
23
. assert . attributeContains ( 'li:nth-child(10) a' , 'href' , '/active-links/about' )
24
24
. assert . attributeContains ( 'li:nth-child(11) a' , 'href' , '/active-links/about' )
25
25
. assert . attributeContains ( 'li:nth-child(12) a' , 'href' , '/active-links/gallery' )
26
- . assert . attributeContains ( 'li:nth-child(13) a' , 'href' , '/active-links/gallery/image2' )
27
- . assert . attributeContains ( 'li:nth-child(14) a' , 'href' , '/active-links/gallery/image1' )
26
+ . assert . attributeContains ( 'li:nth-child(13) a' , 'href' , '/active-links/gallery/' )
27
+ . assert . attributeContains ( 'li:nth-child(14) a' , 'href' , '/active-links/gallery/image2' )
28
+ . assert . attributeContains ( 'li:nth-child(15) a' , 'href' , '/active-links/gallery/image1' )
29
+ . assert . attributeContains ( 'li:nth-child(16) a' , 'href' , '/active-links/redirect-gallery' )
30
+ . assert . attributeContains ( 'li:nth-child(17) a' , 'href' , '/active-links/redirect-gallery' )
31
+ . assert . attributeContains ( 'li:nth-child(18) a' , 'href' , '/active-links/redirect-image' )
32
+ . assert . attributeContains ( 'li:nth-child(19) a' , 'href' , '/active-links/redirect-image' )
28
33
. assert . containsText ( '.view' , 'Home' )
29
34
30
35
assertActiveLinks ( 1 , [ 1 , 2 ] , null , [ 1 , 2 ] )
@@ -38,9 +43,17 @@ module.exports = {
38
43
assertActiveLinks ( 9 , [ 1 , 3 , 5 , 7 , 9 ] , null , [ 9 ] )
39
44
assertActiveLinks ( 10 , [ 1 , 10 ] , [ 11 ] , [ 10 ] , [ 11 ] )
40
45
assertActiveLinks ( 11 , [ 1 , 10 ] , [ 11 ] , [ 10 ] , [ 11 ] )
41
- assertActiveLinks ( 12 , [ 1 , 12 , 14 ] , null , [ 14 ] )
42
- assertActiveLinks ( 13 , [ 1 , 12 , 13 ] , null , [ 13 ] )
43
- assertActiveLinks ( 14 , [ 1 , 12 , 14 ] , null , [ 14 ] )
46
+
47
+ // redirects
48
+ assertActiveLinks ( 12 , [ 1 , 12 , 13 , 15 ] , null , [ 15 ] )
49
+ assertActiveLinks ( 13 , [ 1 , 12 , 13 , 15 ] , null , [ 15 ] )
50
+ assertActiveLinks ( 14 , [ 1 , 12 , 13 , 14 ] , null , [ 14 ] )
51
+ assertActiveLinks ( 15 , [ 1 , 12 , 13 , 15 ] , null , [ 15 ] )
52
+ // different level redirect
53
+ assertActiveLinks ( 16 , [ 1 , 12 , 13 , 15 ] , null , [ 15 ] )
54
+ assertActiveLinks ( 17 , [ 1 , 12 , 13 , 15 ] , null , [ 15 ] )
55
+ assertActiveLinks ( 18 , [ 1 , 12 , 13 , 15 ] , null , [ 15 ] )
56
+ assertActiveLinks ( 19 , [ 1 , 12 , 13 , 15 ] , null , [ 15 ] )
44
57
45
58
browser . end ( )
46
59
0 commit comments