File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
dev-packages/browser-integration-tests/suites/replay/canvas
withCanvasIntegrationFirst
withCanvasIntegrationSecond Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 11import { expect } from '@playwright/test' ;
22
33import { sentryTest } from '../../../../utils/fixtures' ;
4- import { getReplaySnapshot , shouldSkipReplayTest } from '../../../../utils/replayHelpers' ;
4+ import { getReplaySnapshot , shouldSkipReplayTest , waitForReplayRequest } from '../../../../utils/replayHelpers' ;
55
66sentryTest ( 'sets up canvas when adding ReplayCanvas integration first' , async ( { getLocalTestUrl, page } ) => {
77 if ( shouldSkipReplayTest ( ) ) {
88 sentryTest . skip ( ) ;
99 }
1010
11+ const reqPromise0 = waitForReplayRequest ( page , 0 ) ;
12+
1113 await page . route ( 'https://dsn.ingest.sentry.io/**/*' , route => {
1214 return route . fulfill ( {
1315 status : 200 ,
@@ -19,6 +21,7 @@ sentryTest('sets up canvas when adding ReplayCanvas integration first', async ({
1921 const url = await getLocalTestUrl ( { testDir : __dirname } ) ;
2022
2123 await page . goto ( url ) ;
24+ await reqPromise0 ;
2225
2326 const replay = await getReplaySnapshot ( page ) ;
2427 const canvasOptions = replay . _canvas ;
Original file line number Diff line number Diff line change 11import { expect } from '@playwright/test' ;
22
33import { sentryTest } from '../../../../utils/fixtures' ;
4- import { getReplaySnapshot , shouldSkipReplayTest } from '../../../../utils/replayHelpers' ;
4+ import { getReplaySnapshot , shouldSkipReplayTest , waitForReplayRequest } from '../../../../utils/replayHelpers' ;
55
66sentryTest ( 'sets up canvas when adding ReplayCanvas integration after Replay' , async ( { getLocalTestUrl, page } ) => {
77 if ( shouldSkipReplayTest ( ) ) {
88 sentryTest . skip ( ) ;
99 }
1010
11+ const reqPromise0 = waitForReplayRequest ( page , 0 ) ;
12+
1113 await page . route ( 'https://dsn.ingest.sentry.io/**/*' , route => {
1214 return route . fulfill ( {
1315 status : 200 ,
@@ -19,6 +21,7 @@ sentryTest('sets up canvas when adding ReplayCanvas integration after Replay', a
1921 const url = await getLocalTestUrl ( { testDir : __dirname } ) ;
2022
2123 await page . goto ( url ) ;
24+ await reqPromise0 ;
2225
2326 const replay = await getReplaySnapshot ( page ) ;
2427 const canvasOptions = replay . _canvas ;
You can’t perform that action at this time.
0 commit comments