@@ -16,39 +16,42 @@ 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' } ) ,
32
- } ) ;
33
- } ) ;
34
-
35
- const url = await getLocalTestPath ( { testDir : __dirname } ) ;
36
-
37
- await page . goto ( url ) ;
38
-
39
- await reqPromise0 ;
40
-
41
- await page . setInputFiles ( '#file-input' , {
42
- name : 'file.csv' ,
43
- mimeType : 'text/csv' ,
44
- buffer : Buffer . from ( 'this,is,test' ) ,
45
- } ) ;
46
-
47
- await forceFlushReplay ( ) ;
48
-
49
- const res1 = await reqPromise1 ;
50
-
51
- const snapshots = getIncrementalRecordingSnapshots ( res1 ) . filter ( isInputMutation ) ;
52
-
53
- expect ( snapshots ) . toEqual ( [ ] ) ;
54
- } ) ;
19
+ for ( let i = 0 ; i < 100 ; i ++ ) {
20
+ sentryTest (
21
+ `should not capture file input mutations RUN ${ i } ` ,
22
+ async ( { forceFlushReplay, getLocalTestPath, page } ) => {
23
+ if ( shouldSkipReplayTest ( ) ) {
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
+ } ) ;
36
+ } ) ;
37
+
38
+ const url = await getLocalTestPath ( { testDir : __dirname } ) ;
39
+ await page . goto ( url ) ;
40
+ await reqPromise0 ;
41
+
42
+ await page . setInputFiles ( '#file-input' , {
43
+ name : 'file.csv' ,
44
+ mimeType : 'text/csv' ,
45
+ buffer : Buffer . from ( 'this,is,test' ) ,
46
+ } ) ;
47
+ await page . click ( '#button' ) ;
48
+ await forceFlushReplay ( ) ;
49
+
50
+ const res1 = await reqPromise1 ;
51
+
52
+ const snapshots = getIncrementalRecordingSnapshots ( res1 ) . filter ( isInputMutation ) ;
53
+
54
+ expect ( snapshots ) . toEqual ( [ ] ) ;
55
+ } ,
56
+ ) ;
57
+ }
0 commit comments