@@ -3,55 +3,58 @@ import { expect } from '@playwright/test';
3
3
import { sentryTest } from '../../../../utils/fixtures' ;
4
4
import { getReplayRecordingContent , shouldSkipReplayTest , waitForReplayRequest } from '../../../../utils/replayHelpers' ;
5
5
6
- sentryTest ( 'handles large mutations with default options' , async ( { getLocalTestPath, page, forceFlushReplay } ) => {
7
- if ( shouldSkipReplayTest ( ) ) {
8
- sentryTest . skip ( ) ;
9
- }
10
-
11
- const reqPromise0 = waitForReplayRequest ( page , 0 ) ;
12
- const reqPromise1 = waitForReplayRequest ( page , 1 ) ;
13
- const reqPromise2 = waitForReplayRequest ( page , 2 ) ;
14
- const reqPromise3 = waitForReplayRequest ( page , 3 ) ;
15
-
16
- await page . route ( 'https://dsn.ingest.sentry.io/**/*' , route => {
17
- return route . fulfill ( {
18
- status : 200 ,
19
- contentType : 'application/json' ,
20
- body : JSON . stringify ( { id : 'test-id' } ) ,
6
+ sentryTest (
7
+ 'handles large mutations with default options' ,
8
+ async ( { getLocalTestPath, page, forceFlushReplay, browserName } ) => {
9
+ if ( shouldSkipReplayTest ( ) || [ 'webkit' , 'firefox' ] . includes ( browserName ) ) {
10
+ sentryTest . skip ( ) ;
11
+ }
12
+
13
+ const reqPromise0 = waitForReplayRequest ( page , 0 ) ;
14
+ const reqPromise1 = waitForReplayRequest ( page , 1 ) ;
15
+ const reqPromise2 = waitForReplayRequest ( page , 2 ) ;
16
+ const reqPromise3 = waitForReplayRequest ( page , 3 ) ;
17
+
18
+ await page . route ( 'https://dsn.ingest.sentry.io/**/*' , route => {
19
+ return route . fulfill ( {
20
+ status : 200 ,
21
+ contentType : 'application/json' ,
22
+ body : JSON . stringify ( { id : 'test-id' } ) ,
23
+ } ) ;
21
24
} ) ;
22
- } ) ;
23
25
24
- const url = await getLocalTestPath ( { testDir : __dirname } ) ;
26
+ const url = await getLocalTestPath ( { testDir : __dirname } ) ;
25
27
26
- await page . goto ( url ) ;
27
- const res0 = await reqPromise0 ;
28
+ await page . goto ( url ) ;
29
+ const res0 = await reqPromise0 ;
28
30
29
- await page . click ( '#button-add' ) ;
30
- await forceFlushReplay ( ) ;
31
- const res1 = await reqPromise1 ;
31
+ await page . click ( '#button-add' ) ;
32
+ await forceFlushReplay ( ) ;
33
+ const res1 = await reqPromise1 ;
32
34
33
- await page . click ( '#button-modify' ) ;
34
- await forceFlushReplay ( ) ;
35
- const res2 = await reqPromise2 ;
35
+ await page . click ( '#button-modify' ) ;
36
+ await forceFlushReplay ( ) ;
37
+ const res2 = await reqPromise2 ;
36
38
37
- await page . click ( '#button-remove' ) ;
38
- await forceFlushReplay ( ) ;
39
- const res3 = await reqPromise3 ;
39
+ await page . click ( '#button-remove' ) ;
40
+ await forceFlushReplay ( ) ;
41
+ const res3 = await reqPromise3 ;
40
42
41
- const replayData0 = getReplayRecordingContent ( res0 ) ;
42
- const replayData1 = getReplayRecordingContent ( res1 ) ;
43
- const replayData2 = getReplayRecordingContent ( res2 ) ;
44
- const replayData3 = getReplayRecordingContent ( res3 ) ;
43
+ const replayData0 = getReplayRecordingContent ( res0 ) ;
44
+ const replayData1 = getReplayRecordingContent ( res1 ) ;
45
+ const replayData2 = getReplayRecordingContent ( res2 ) ;
46
+ const replayData3 = getReplayRecordingContent ( res3 ) ;
45
47
46
- expect ( replayData0 . fullSnapshots . length ) . toBe ( 1 ) ;
47
- expect ( replayData0 . incrementalSnapshots . length ) . toBe ( 0 ) ;
48
+ expect ( replayData0 . fullSnapshots . length ) . toBe ( 1 ) ;
49
+ expect ( replayData0 . incrementalSnapshots . length ) . toBe ( 0 ) ;
48
50
49
- expect ( replayData1 . fullSnapshots . length ) . toBe ( 0 ) ;
50
- expect ( replayData1 . incrementalSnapshots . length ) . toBeGreaterThan ( 0 ) ;
51
+ expect ( replayData1 . fullSnapshots . length ) . toBe ( 0 ) ;
52
+ expect ( replayData1 . incrementalSnapshots . length ) . toBeGreaterThan ( 0 ) ;
51
53
52
- expect ( replayData2 . fullSnapshots . length ) . toBe ( 0 ) ;
53
- expect ( replayData2 . incrementalSnapshots . length ) . toBeGreaterThan ( 0 ) ;
54
+ expect ( replayData2 . fullSnapshots . length ) . toBe ( 0 ) ;
55
+ expect ( replayData2 . incrementalSnapshots . length ) . toBeGreaterThan ( 0 ) ;
54
56
55
- expect ( replayData3 . fullSnapshots . length ) . toBe ( 0 ) ;
56
- expect ( replayData3 . incrementalSnapshots . length ) . toBeGreaterThan ( 0 ) ;
57
- } ) ;
57
+ expect ( replayData3 . fullSnapshots . length ) . toBe ( 0 ) ;
58
+ expect ( replayData3 . incrementalSnapshots . length ) . toBeGreaterThan ( 0 ) ;
59
+ } ,
60
+ ) ;
0 commit comments