File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/browser-integration-tests/suites/replay/bufferMode Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -349,9 +349,11 @@ sentryTest('[buffer-mode] can sample on each error event', async ({ getLocalTest
349
349
await page . click ( '#error' ) ;
350
350
await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
351
351
352
- // 1 error, no replay
353
- await reqErrorPromise ;
352
+ // 1 unsampled error, no replay
353
+ const reqError0 = await reqErrorPromise ;
354
+ const errorEvent0 = envelopeRequestParser ( reqError0 ) ;
354
355
expect ( callsToSentry ) . toEqual ( 1 ) ;
356
+ expect ( errorEvent0 . tags ?. replayId ) . toBeUndefined ( ) ;
355
357
356
358
await page . evaluate ( async ( ) => {
357
359
const replayIntegration = ( window as unknown as Window & { Replay : Replay } ) . Replay ;
@@ -363,9 +365,11 @@ sentryTest('[buffer-mode] can sample on each error event', async ({ getLocalTest
363
365
364
366
const req0 = await reqPromise0 ;
365
367
366
- // 2 errors, 1 flush
367
- await reqErrorPromise ;
368
+ // 1 unsampled error, 1 sampled error -> 1 flush
369
+ const reqError1 = await reqErrorPromise ;
370
+ const errorEvent1 = envelopeRequestParser ( reqError1 ) ;
368
371
expect ( callsToSentry ) . toEqual ( 3 ) ;
372
+ expect ( errorEvent1 . tags ?. replayId ) . toBeDefined ( ) ;
369
373
370
374
const event0 = getReplayEvent ( req0 ) ;
371
375
const content0 = getReplayRecordingContent ( req0 ) ;
You can’t perform that action at this time.
0 commit comments