@@ -16,39 +16,43 @@ function isInputMutation(
16
16
return snap . data . source == IncrementalSource . Input ;
17
17
}
18
18
19
- sentryTest ( 'should not capture file input mutations' , async ( { forceFlushReplay, getLocalTestPath, page } ) => {
20
- if ( shouldSkipReplayTest ( ) ) {
21
- sentryTest . skip ( ) ;
22
- }
23
-
24
- const reqPromise0 = waitForReplayRequest ( page , 0 ) ;
25
- const reqPromise1 = waitForReplayRequest ( page , 1 ) ;
26
-
27
- await page . route ( 'https://dsn.ingest.sentry.io/**/*' , route => {
28
- return route . fulfill ( {
29
- status : 200 ,
30
- contentType : 'application/json' ,
31
- body : JSON . stringify ( { id : 'test-id' } ) ,
19
+ sentryTest (
20
+ 'should not capture file input mutations' ,
21
+ async ( { forceFlushReplay, getLocalTestPath, page, browserName } ) => {
22
+ // This seems to be flaky on webkit, so skipping there
23
+ if ( shouldSkipReplayTest ( ) || browserName === 'webkit' ) {
24
+ sentryTest . skip ( ) ;
25
+ }
26
+
27
+ const reqPromise0 = waitForReplayRequest ( page , 0 ) ;
28
+ const reqPromise1 = waitForReplayRequest ( page , 1 ) ;
29
+
30
+ await page . route ( 'https://dsn.ingest.sentry.io/**/*' , route => {
31
+ return route . fulfill ( {
32
+ status : 200 ,
33
+ contentType : 'application/json' ,
34
+ body : JSON . stringify ( { id : 'test-id' } ) ,
35
+ } ) ;
32
36
} ) ;
33
- } ) ;
34
37
35
- const url = await getLocalTestPath ( { testDir : __dirname } ) ;
38
+ const url = await getLocalTestPath ( { testDir : __dirname } ) ;
36
39
37
- await page . goto ( url ) ;
40
+ await page . goto ( url ) ;
38
41
39
- await reqPromise0 ;
42
+ await reqPromise0 ;
40
43
41
- await page . setInputFiles ( '#file-input' , {
42
- name : 'file.csv' ,
43
- mimeType : 'text/csv' ,
44
- buffer : Buffer . from ( 'this,is,test' ) ,
45
- } ) ;
44
+ await page . setInputFiles ( '#file-input' , {
45
+ name : 'file.csv' ,
46
+ mimeType : 'text/csv' ,
47
+ buffer : Buffer . from ( 'this,is,test' ) ,
48
+ } ) ;
46
49
47
- await forceFlushReplay ( ) ;
50
+ await forceFlushReplay ( ) ;
48
51
49
- const res1 = await reqPromise1 ;
52
+ const res1 = await reqPromise1 ;
50
53
51
- const snapshots = getIncrementalRecordingSnapshots ( res1 ) . filter ( isInputMutation ) ;
54
+ const snapshots = getIncrementalRecordingSnapshots ( res1 ) . filter ( isInputMutation ) ;
52
55
53
- expect ( snapshots ) . toEqual ( [ ] ) ;
54
- } ) ;
56
+ expect ( snapshots ) . toEqual ( [ ] ) ;
57
+ } ,
58
+ ) ;
0 commit comments