Skip to content

Commit

Permalink
Scroll to different position
Browse files Browse the repository at this point in the history
  • Loading branch information
jdlrobson committed Jan 11, 2024
1 parent 99282aa commit 54c13d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/engine-scripts/puppet/onReady.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = async ( page, scenario ) => {
// check scroll
if ( hashtags.includes( '#scroll' ) ) {
await page.evaluate( () => {
if ( window.scrollY !== 5000 ) {
if ( window.scrollY !== 500 ) {
throw new Error( `ScrollY is in unexpected state ${window.scrollY}` );
}
} );
Expand Down
2 changes: 1 addition & 1 deletion src/engine-scripts/puppet/scroll.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = async ( page ) => {
await page.evaluate( () => {
window.scroll( 0, window.innerHeight * 2 );
window.scroll( 0, 500 );
return true;
} );
};

0 comments on commit 54c13d2

Please sign in to comment.