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
349349 await page . click ( '#error' ) ;
350350 await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
351351
352- // 1 error, no replay
353- await reqErrorPromise ;
352+ // 1 unsampled error, no replay
353+ const reqError0 = await reqErrorPromise ;
354+ const errorEvent0 = envelopeRequestParser ( reqError0 ) ;
354355 expect ( callsToSentry ) . toEqual ( 1 ) ;
356+ expect ( errorEvent0 . tags ?. replayId ) . toBeUndefined ( ) ;
355357
356358 await page . evaluate ( async ( ) => {
357359 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
363365
364366 const req0 = await reqPromise0 ;
365367
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 ) ;
368371 expect ( callsToSentry ) . toEqual ( 3 ) ;
372+ expect ( errorEvent1 . tags ?. replayId ) . toBeDefined ( ) ;
369373
370374 const event0 = getReplayEvent ( req0 ) ;
371375 const content0 = getReplayRecordingContent ( req0 ) ;
You can’t perform that action at this time.
0 commit comments