Skip to content

Commit d6985ab

Browse files
authored
chore: Test SR processes large CSS in reasonable time (#1609)
1 parent 8d1093c commit d6985ab

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

tests/specs/session-replay/payload.e2e.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,16 @@ describe('Session Replay Payload Validation', () => {
183183
})
184184
})
185185

186-
// disabled while on rrweb v2.0.0-alpha.18
187-
// it('should process large css within timeout threshold', async () => {
188-
// const sessionReplaySnapshotCapture = await browser.testHandle.createNetworkCaptures('bamServer', { test: testSessionReplaySnapshotRequest })
189-
//
190-
// let [sessionReplaySnapshotHarvests] = await Promise.all([
191-
// sessionReplaySnapshotCapture.waitForResult({ timeout: 10000 }),
192-
// browser.url(await browser.testHandle.assetURL('rrweb-record-large-style-with-textnodes.html', srConfig()))
193-
// .then(() => browser.waitForFeatureAggregate('session_replay'))
194-
// ])
195-
//
196-
// expect(sessionReplaySnapshotHarvests.length).toEqual(1)
197-
// console.log(sessionReplaySnapshotHarvests[0].request.body)
198-
// })
186+
it('should process large css within timeout threshold', async () => {
187+
const sessionReplaySnapshotCapture = await browser.testHandle.createNetworkCaptures('bamServer', { test: testSessionReplaySnapshotRequest })
188+
189+
let [sessionReplaySnapshotHarvests] = await Promise.all([
190+
sessionReplaySnapshotCapture.waitForResult({ timeout: 10000 }), // 10 secs is just a "good enough" threshold to ensure the processing didn't hang or take too long
191+
browser.url(await browser.testHandle.assetURL('rrweb-record-large-style-with-textnodes.html', srConfig()))
192+
.then(() => browser.waitForFeatureAggregate('session_replay'))
193+
])
194+
195+
expect(sessionReplaySnapshotHarvests.length).toEqual(1)
196+
console.log(sessionReplaySnapshotHarvests[0].request.body)
197+
})
199198
})

0 commit comments

Comments
 (0)