Skip to content

Commit

Permalink
Wait for window.mockLiveUpdate function to be available
Browse files Browse the repository at this point in the history
  • Loading branch information
arelra committed Nov 26, 2024
1 parent a0fc2a3 commit 076c870
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions playwright/tests/liveblog-ad-limit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const MAX_AD_SLOTS = 8;
const addAndAwaitNewBlocks = async (page: Page, blockContent: string) => {
// scroll to the top so we get a toast to click on
await page.evaluate(() => window.scrollTo(0, 0));
// @ts-expect-error -- browser land
await page.waitForFunction(() => window.mockLiveUpdate !== undefined);
await page.evaluate((blockContent) => {
// @ts-expect-error -- browser land
// eslint-disable-next-line @typescript-eslint/no-unsafe-call -- browser land
Expand Down

0 comments on commit 076c870

Please sign in to comment.