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