Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' into iframe-remove-child-nodes
  • Loading branch information
Juice10 authored Jun 30, 2022
commit 4e7ae4a68e26c31a5fcceb29e1ca38bef1cec426
17 changes: 16 additions & 1 deletion packages/rrweb/test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,22 @@ describe('record integration tests', function (this: ISuite) {
// append an iframe to shadow dom #1
div.appendChild(iframe);
});
await waitForRAF(page);

await waitForRAF(page); // wait till browser loaded contents of frame

page.evaluate(() => {
const iframe: HTMLIFrameElement = document
.querySelector('iframe')!
.contentDocument!.body.shadowRoot!.querySelector('iframe')!;

const contentDocument2 = iframe.contentDocument!;
// create shadow dom #2 in the iframe
contentDocument2.body.attachShadow({ mode: 'open' });
contentDocument2.body.shadowRoot!.appendChild(
document.createElement('span'),
);
});
await waitForRAF(page); // wait till browser sent snapshots

const snapshots = await page.evaluate('window.snapshots');
assertSnapshot(snapshots);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.