Skip to content

Commit

Permalink
SBVT-2201: fixing the top.box issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tnelms1 committed Dec 5, 2023
1 parent 682203f commit 71baeb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ let takeScreenshot = (element, name, modifiedOptions, win) => {
}
};

// Reset browser to initial state
cy.task('logger', {type: 'trace', message: `After fullpage cy.screenshot('${name}')`});
win.eval(`window.scrollTo(${initialPageState.scrollX}, ${initialPageState.scrollY})`);
win.eval(`document.body.style.transform='${initialPageState.transform}'`);
ensureScrolledToTop(win)
Expand All @@ -244,8 +246,6 @@ let takeScreenshot = (element, name, modifiedOptions, win) => {
// Read the new image base64 to blob to be sent to AWS
readImageAndBase64ToBlob();
});
// Reset browser to initial state
cy.task('logger', {type: 'trace', message: `After lazyloaded fullpage cy.screenshot('${name}')`});
}
});
});
Expand Down

0 comments on commit 71baeb2

Please sign in to comment.