File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ module.exports = {
48
48
return document . getElementById ( 'anchor' ) . getBoundingClientRect ( ) . top < 1
49
49
} , null , 'scroll to anchor' )
50
50
51
+ // scroll back to top so we can click the butotn
52
+ . execute ( function ( ) {
53
+ window . scrollTo ( 0 , 0 )
54
+ } )
51
55
. click ( 'li:nth-child(5) a' )
52
56
. assert . evaluate ( function ( ) {
53
57
return document . getElementById ( 'anchor2' ) . getBoundingClientRect ( ) . top < 101
Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ module.exports = {
31
31
history . scrollRestoration = 'manual'
32
32
} )
33
33
. click ( 'li:nth-child(2) a' )
34
+ . waitForElementPresent ( '.view.foo' , TIMEOUT )
34
35
. assert . containsText ( '.view' , 'foo' )
35
36
. execute ( function ( ) {
36
37
window . scrollTo ( 0 , 200 )
37
38
window . history . back ( )
38
39
} )
40
+ . waitForElementPresent ( '.view.home' , TIMEOUT )
39
41
. assert . containsText ( '.view' , 'home' )
40
42
. assert . evaluate ( function ( ) {
41
43
return window . pageYOffset === 100
You can’t perform that action at this time.
0 commit comments