File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
packages/integration-tests/suites/replay/privacyInputMaskAll Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,26 @@ for (let i = 0; i < 100; i++) {
84
84
sentryTest . skip ( ) ;
85
85
}
86
86
87
+ // We want to ensure to check the correct event payloads
88
+ let firstInputMutationSegmentId : number | undefined = undefined ;
87
89
const reqPromise0 = waitForReplayRequest ( page , 0 ) ;
88
- const reqPromise1 = waitForReplayRequest ( page , 1 ) ;
89
- const reqPromise2 = waitForReplayRequest ( page , 2 ) ;
90
+ const reqPromise1 = waitForReplayRequest ( page , ( event , res ) => {
91
+ const check =
92
+ firstInputMutationSegmentId === undefined && getIncrementalRecordingSnapshots ( res ) . some ( isInputMutation ) ;
93
+
94
+ if ( check ) {
95
+ firstInputMutationSegmentId = event . segment_id ;
96
+ }
97
+
98
+ return check ;
99
+ } ) ;
100
+ const reqPromise2 = waitForReplayRequest ( page , ( event , res ) => {
101
+ return (
102
+ typeof firstInputMutationSegmentId === 'number' &&
103
+ firstInputMutationSegmentId < event . segment_id &&
104
+ getIncrementalRecordingSnapshots ( res ) . some ( isInputMutation )
105
+ ) ;
106
+ } ) ;
90
107
91
108
await page . route ( 'https://dsn.ingest.sentry.io/**/*' , route => {
92
109
return route . fulfill ( {
You can’t perform that action at this time.
0 commit comments