Skip to content

Commit

Permalink
feat(playwright): disable animations when taking screenshots (#1601)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarous authored Oct 17, 2022
1 parent fe56111 commit 4e63034
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ export async function saveSnapshot(page: Page, options: SaveSnapshotOptions = {}

if (saveScreenshot) {
const screenshotName = `${key}.jpg`;
const screenshotBuffer = await page.screenshot({ fullPage: true, quality: screenshotQuality, type: 'jpeg' });
const screenshotBuffer = await page.screenshot({ fullPage: true, quality: screenshotQuality, type: 'jpeg', animations: 'disabled' });
await store.setValue(screenshotName, screenshotBuffer, { contentType: 'image/jpeg' });
}

Expand Down

0 comments on commit 4e63034

Please sign in to comment.