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 @@ -345,9 +345,11 @@ sentryTest('[buffer-mode] can sample on each error event', async ({ getLocalTest
345
345
await page . click ( '#error' ) ;
346
346
await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
347
347
348
- // 1 error, no replay
349
- await reqErrorPromise ;
348
+ // 1 unsampled error, no replay
349
+ const reqError0 = await reqErrorPromise ;
350
+ const errorEvent0 = envelopeRequestParser ( reqError0 ) ;
350
351
expect ( callsToSentry ) . toEqual ( 1 ) ;
352
+ expect ( errorEvent0 . tags ?. replayId ) . toBeUndefined ( ) ;
351
353
352
354
await page . evaluate ( async ( ) => {
353
355
const replayIntegration = ( window as unknown as Window & { Replay : Replay } ) . Replay ;
@@ -359,9 +361,11 @@ sentryTest('[buffer-mode] can sample on each error event', async ({ getLocalTest
359
361
360
362
const req0 = await reqPromise0 ;
361
363
362
- // 2 errors, 1 flush
363
- await reqErrorPromise ;
364
+ // 1 unsampled error, 1 sampled error -> 1 flush
365
+ const reqError1 = await reqErrorPromise ;
366
+ const errorEvent1 = envelopeRequestParser ( reqError1 ) ;
364
367
expect ( callsToSentry ) . toEqual ( 3 ) ;
368
+ expect ( errorEvent1 . tags ?. replayId ) . toBeDefined ( ) ;
365
369
366
370
const event0 = getReplayEvent ( req0 ) ;
367
371
const content0 = getReplayRecordingContent ( req0 ) ;
You can’t perform that action at this time.
0 commit comments