diff --git a/.changeset/curvy-balloons-brake.md b/.changeset/curvy-balloons-brake.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/curvy-balloons-brake.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/rrweb/test/integration.test.ts b/packages/rrweb/test/integration.test.ts index 616b6e91cb..5ce9b76469 100644 --- a/packages/rrweb/test/integration.test.ts +++ b/packages/rrweb/test/integration.test.ts @@ -117,17 +117,19 @@ describe('record integration tests', function (this: ISuite) { ta.innerText = 'pre value'; document.body.append(ta); }); + await page.waitForTimeout(5); await page.evaluate(() => { const t = document.querySelector('textarea') as HTMLTextAreaElement; t.innerText = 'ok'; // this mutation should be recorded }); + await page.waitForTimeout(5); await page.evaluate(() => { const t = document.querySelector('textarea') as HTMLTextAreaElement; (t.childNodes[0] as Text).appendData('3'); // this mutation is also valid }); - + await page.waitForTimeout(5); await page.type('textarea', '1'); // types (inserts) at index 0, in front of existing text - + await page.waitForTimeout(5); await page.evaluate(() => { const t = document.querySelector('textarea') as HTMLTextAreaElement; // user has typed so childNode content should now be ignored @@ -138,7 +140,7 @@ describe('record integration tests', function (this: ISuite) { // there is nothing explicit in rrweb which enforces this, but this test may protect against // a future change where a mutation on a textarea incorrectly updates the .value }); - + await page.waitForTimeout(5); await page.type('textarea', '2'); // cursor is at index 1 const snapshots = (await page.evaluate( diff --git a/packages/rrweb/test/replay/ video.test.ts b/packages/rrweb/test/replay/video.test.ts similarity index 100% rename from packages/rrweb/test/replay/ video.test.ts rename to packages/rrweb/test/replay/video.test.ts