11import { expect } from '@playwright/test' ;
2- import type { Replay } from '@sentry/replay' ;
2+ import type { InternalReplay } from '@sentry/replay' ;
33import type { ReplayContainer } from '@sentry/replay/build/npm/types/types' ;
44
55import { sentryTest } from '../../../utils/fixtures' ;
@@ -68,7 +68,8 @@ sentryTest(
6868 expect (
6969 await page . evaluate ( ( ) => {
7070 // 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 ;
7273 // @ts -expect-error private
7374 const replay = replayIntegration . _replay ;
7475 replayIntegration . startBuffering ( ) ;
@@ -89,7 +90,7 @@ sentryTest(
8990 reqPromise0 ,
9091 page . evaluate ( async ( ) => {
9192 // 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 ;
9394 await replayIntegration . flush ( ) ;
9495 } ) ,
9596 ] ) ;
@@ -213,7 +214,8 @@ sentryTest(
213214 expect (
214215 await page . evaluate ( ( ) => {
215216 // 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 ;
217219 // @ts -expect-error private
218220 const replay = replayIntegration . _replay ;
219221 replayIntegration . startBuffering ( ) ;
@@ -234,7 +236,7 @@ sentryTest(
234236 reqPromise0 ,
235237 page . evaluate ( async ( ) => {
236238 // 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 ;
238240 await replayIntegration . flush ( { continueRecording : false } ) ;
239241 } ) ,
240242 ] ) ;
@@ -329,7 +331,8 @@ sentryTest(
329331 expect (
330332 await page . evaluate ( ( ) => {
331333 // 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 ;
333336 const replay = replayIntegration [ '_replay' ] ;
334337 replayIntegration . startBuffering ( ) ;
335338 return replay . isEnabled ( ) ;
@@ -348,7 +351,7 @@ sentryTest(
348351
349352 await page . evaluate ( async ( ) => {
350353 // 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 ;
352355 replayIntegration [ '_replay' ] . getOptions ( ) . errorSampleRate = 1.0 ;
353356 } ) ;
354357
0 commit comments