1
1
import { expect } from '@playwright/test' ;
2
- import type { Replay } from '@sentry/replay' ;
2
+ import type { InternalReplay } from '@sentry/replay' ;
3
3
import type { ReplayContainer } from '@sentry/replay/build/npm/types/types' ;
4
4
5
5
import { sentryTest } from '../../../utils/fixtures' ;
@@ -68,7 +68,8 @@ sentryTest(
68
68
expect (
69
69
await page . evaluate ( ( ) => {
70
70
// eslint-disable-next-line deprecation/deprecation
71
- const replayIntegration = ( window as unknown as Window & { Replay : InstanceType < typeof Replay > } ) . Replay ;
71
+ const replayIntegration = ( window as unknown as Window & { Replay : InstanceType < typeof InternalReplay > } )
72
+ . Replay ;
72
73
// @ts -expect-error private
73
74
const replay = replayIntegration . _replay ;
74
75
replayIntegration . startBuffering ( ) ;
@@ -89,7 +90,7 @@ sentryTest(
89
90
reqPromise0 ,
90
91
page . evaluate ( async ( ) => {
91
92
// eslint-disable-next-line deprecation/deprecation
92
- const replayIntegration = ( window as unknown as Window & { Replay : Replay } ) . Replay ;
93
+ const replayIntegration = ( window as unknown as Window & { Replay : InternalReplay } ) . Replay ;
93
94
await replayIntegration . flush ( ) ;
94
95
} ) ,
95
96
] ) ;
@@ -213,7 +214,8 @@ sentryTest(
213
214
expect (
214
215
await page . evaluate ( ( ) => {
215
216
// eslint-disable-next-line deprecation/deprecation
216
- const replayIntegration = ( window as unknown as Window & { Replay : InstanceType < typeof Replay > } ) . Replay ;
217
+ const replayIntegration = ( window as unknown as Window & { Replay : InstanceType < typeof InternalReplay > } )
218
+ . Replay ;
217
219
// @ts -expect-error private
218
220
const replay = replayIntegration . _replay ;
219
221
replayIntegration . startBuffering ( ) ;
@@ -234,7 +236,7 @@ sentryTest(
234
236
reqPromise0 ,
235
237
page . evaluate ( async ( ) => {
236
238
// eslint-disable-next-line deprecation/deprecation
237
- const replayIntegration = ( window as unknown as Window & { Replay : Replay } ) . Replay ;
239
+ const replayIntegration = ( window as unknown as Window & { Replay : InternalReplay } ) . Replay ;
238
240
await replayIntegration . flush ( { continueRecording : false } ) ;
239
241
} ) ,
240
242
] ) ;
@@ -329,7 +331,8 @@ sentryTest(
329
331
expect (
330
332
await page . evaluate ( ( ) => {
331
333
// eslint-disable-next-line deprecation/deprecation
332
- const replayIntegration = ( window as unknown as Window & { Replay : InstanceType < typeof Replay > } ) . Replay ;
334
+ const replayIntegration = ( window as unknown as Window & { Replay : InstanceType < typeof InternalReplay > } )
335
+ . Replay ;
333
336
const replay = replayIntegration [ '_replay' ] ;
334
337
replayIntegration . startBuffering ( ) ;
335
338
return replay . isEnabled ( ) ;
@@ -348,7 +351,7 @@ sentryTest(
348
351
349
352
await page . evaluate ( async ( ) => {
350
353
// eslint-disable-next-line deprecation/deprecation
351
- const replayIntegration = ( window as unknown as Window & { Replay : Replay } ) . Replay ;
354
+ const replayIntegration = ( window as unknown as Window & { Replay : InternalReplay } ) . Replay ;
352
355
replayIntegration [ '_replay' ] . getOptions ( ) . errorSampleRate = 1.0 ;
353
356
} ) ;
354
357
0 commit comments