@@ -16,39 +16,43 @@ function isInputMutation(
1616 return snap . data . source == IncrementalSource . Input ;
1717}
1818
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+ } ) ;
3236 } ) ;
33- } ) ;
3437
35- const url = await getLocalTestPath ( { testDir : __dirname } ) ;
38+ const url = await getLocalTestPath ( { testDir : __dirname } ) ;
3639
37- await page . goto ( url ) ;
40+ await page . goto ( url ) ;
3841
39- await reqPromise0 ;
42+ await reqPromise0 ;
4043
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+ } ) ;
4649
47- await forceFlushReplay ( ) ;
50+ await forceFlushReplay ( ) ;
4851
49- const res1 = await reqPromise1 ;
52+ const res1 = await reqPromise1 ;
5053
51- const snapshots = getIncrementalRecordingSnapshots ( res1 ) . filter ( isInputMutation ) ;
54+ const snapshots = getIncrementalRecordingSnapshots ( res1 ) . filter ( isInputMutation ) ;
5255
53- expect ( snapshots ) . toEqual ( [ ] ) ;
54- } ) ;
56+ expect ( snapshots ) . toEqual ( [ ] ) ;
57+ } ,
58+ ) ;
0 commit comments