Skip to content

Commit

Permalink
test: try sleeping too?
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyjosephprice committed Mar 7, 2024
1 parent 00e9770 commit 83788d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion __tests__/browser/markdown.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* global page */

// const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
// eslint-disable-next-line no-promise-executor-return
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));

describe('visual regression tests', () => {
describe('rdmd syntax', () => {
Expand Down Expand Up @@ -33,6 +34,7 @@ describe('visual regression tests', () => {
await page.evaluate(() => {
window.scrollTo(0, window.document.body.scrollHeight);
});
await sleep(500);

const image = await page.screenshot({ fullPage: true });

Expand All @@ -47,6 +49,7 @@ describe('visual regression tests', () => {
await page.evaluate(() => {
window.scrollTo(0, window.document.body.scrollHeight);
});
await sleep(500);

const image = await page.screenshot({ fullPage: true });

Expand All @@ -59,6 +62,7 @@ describe('visual regression tests', () => {
await page.evaluate(() => {
window.scrollTo(0, window.document.body.scrollHeight);
});
await sleep(500);

const image = await page.screenshot({ fullPage: true });

Expand Down

0 comments on commit 83788d1

Please sign in to comment.