Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix: add missing expect
Browse files Browse the repository at this point in the history
  • Loading branch information
soundofspace committed Jan 13, 2023
1 parent ff16a06 commit 42f48fe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions agent/core/test/Page.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,19 +260,21 @@ describe('Pages', () => {
it('should be able to take a clipped rect screenshot outside of viewport', async () => {
await setContent(
page,
`<div style="height: 500px; width: 500px; background:blue">&nbsp;</div>
<div style="height: 5000px; width: 100px; background:red">&nbsp;</div>`,
`<style>body,div {margin:0;padding:0}</style>
<div style="height: 2500px; width: 50px; background:blue">&nbsp;</div>
<div style="height: 200px; width: 100px; background:red">&nbsp;</div>`,
);
const screenshot = await page.screenshot({
format: 'png',
rectangle: {
width: 500,
height: 5000,
height: 2700,
x: 0,
y: 0,
scale: 1,
},
});
expect(sizeOf(screenshot).height).toBe(2700);
});
});

Expand Down

0 comments on commit 42f48fe

Please sign in to comment.