Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
billyvg committed Aug 8, 2024
1 parent 46f0b7a commit 7db0c46
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/rrweb/test/__snapshots__/integration.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13032,6 +13032,21 @@ exports[`record integration tests should not record blocked elements dynamically
{
\\"parentId\\": 16,
\\"nextId\\": 18,
\\"node\\": {
\\"type\\": 2,
\\"tagName\\": \\"iframe\\",
\\"attributes\\": {
\\"class\\": \\"rr-block\\",
\\"rr_width\\": \\"104px\\",
\\"rr_height\\": \\"104px\\"
},
\\"childNodes\\": [],
\\"id\\": 23
}
},
{
\\"parentId\\": 16,
\\"nextId\\": 23,
\\"node\\": {
\\"type\\": 2,
\\"tagName\\": \\"button\\",
Expand All @@ -13041,7 +13056,7 @@ exports[`record integration tests should not record blocked elements dynamically
\\"rr_height\\": \\"100px\\"
},
\\"childNodes\\": [],
\\"id\\": 23
\\"id\\": 24
}
}
]
Expand Down
7 changes: 7 additions & 0 deletions packages/rrweb/test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,15 @@ describe('record integration tests', function (this: ISuite) {
el.style.height = '100px';
el.innerText = 'Should not be recorded';

const iframe = document.createElement('iframe');
iframe.className = 'rr-block';
iframe.style.width = '100px';
iframe.style.height = '100px';
iframe.src = '#foo';

const nextElement = document.querySelector('.rr-block')!;
nextElement.parentNode!.insertBefore(el, nextElement);
nextElement.parentNode!.insertBefore(iframe, nextElement);
});

const snapshots = (await page.evaluate(
Expand Down

0 comments on commit 7db0c46

Please sign in to comment.