Skip to content

Commit

Permalink
Add wait for RAF before evaluating snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Juice10 committed Dec 15, 2023
1 parent 2af0014 commit 09b041f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/rrweb/test/record/cross-origin-iframes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ describe('cross origin iframes', function (this: ISuite) {

await injectRecordScript(ctx.page.mainFrame().childFrames()[0]); // injects script into new iframe

await waitForRAF(ctx.page); // wait till script is loaded

const events: eventWithTime[] = await ctx.page.evaluate(
() => (window as unknown as IWindow).snapshots,
);
Expand Down

0 comments on commit 09b041f

Please sign in to comment.