File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
packages/browser-integration-tests
suites/replay/eventBufferError Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ import { expect } from '@playwright/test';
3
3
import { sentryTest } from '../../../utils/fixtures' ;
4
4
import { envelopeRequestParser } from '../../../utils/helpers' ;
5
5
import {
6
+ getDecompressedRecordingEvents ,
6
7
getReplaySnapshot ,
7
8
isReplayEvent ,
8
9
REPLAY_DEFAULT_FLUSH_MAX_DELAY ,
9
10
shouldSkipReplayTest ,
10
11
waitForReplayRequest ,
11
- replayEnvelopeParser ,
12
12
} from '../../../utils/replayHelpers' ;
13
13
14
14
sentryTest (
@@ -40,17 +40,11 @@ sentryTest(
40
40
41
41
// We only want to count replays here
42
42
if ( event && isReplayEvent ( event ) ) {
43
- called ++ ;
44
- }
45
-
46
- // TODO FN: Just for debugging....
47
- if ( called > 0 ) {
48
- // eslint-disable-next-line no-console
49
- console . log ( event ) ;
50
-
51
- const recordingEvents = replayEnvelopeParser ( route . request ( ) ) ;
52
- // eslint-disable-next-line no-console
53
- console . log ( JSON . stringify ( recordingEvents , null , 2 ) ) ;
43
+ const events = getDecompressedRecordingEvents ( route . request ( ) ) ;
44
+ // this makes sure we ignore e.g. mouse move events which can otherwise lead to flakes
45
+ if ( events . length > 0 ) {
46
+ called ++ ;
47
+ }
54
48
}
55
49
56
50
return route . fulfill ( {
Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ function getOptionsEvents(replayRequest: Request): CustomRecordingEvent[] {
267
267
return getAllCustomRrwebRecordingEvents ( events ) . filter ( data => data . tag === 'options' ) ;
268
268
}
269
269
270
- function getDecompressedRecordingEvents ( resOrReq : Request | Response ) : RecordingSnapshot [ ] {
270
+ export function getDecompressedRecordingEvents ( resOrReq : Request | Response ) : RecordingSnapshot [ ] {
271
271
const replayRequest = getRequest ( resOrReq ) ;
272
272
return (
273
273
( replayEnvelopeRequestParser ( replayRequest , 5 ) as eventWithTime [ ] )
You can’t perform that action at this time.
0 commit comments