Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmay-browserstack committed Dec 16, 2024
1 parent 0fdb2aa commit 9b7f763
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/index.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,10 @@ describe('percySnapshot', () => {

const mockedScroll = spyOn(percySnapshot, 'slowScrollToBottom').and.resolveTo(true);

mockedDriver.executeScript.calls.reset();
await percySnapshot(mockedDriver, 'Test Snapshot', { responsiveSnapshotCapture: true });

expect(mockedDriver.executeScript.calls.allArgs()).toEqual(jasmine.arrayContaining([jasmine.arrayContaining(['return window.outerHeight - window.innerHeight + 900'])]));
expect(mockedDriver.executeScript).toHaveBeenCalledTimes(4);
expect(mockedScroll).toHaveBeenCalledWith(mockedDriver, 0.45);
delete process.env.PERCY_ENABLE_LAZY_LOADING_SCROLL;
delete process.env.PERCY_RESPONSIVE_CAPTURE_MIN_HEIGHT;
Expand Down

0 comments on commit 9b7f763

Please sign in to comment.