@@ -11,13 +11,14 @@ test('invokeMaestroTapOn resolves mutating taps from the current snapshot', asyn
1111 const selector =
1212 'label="Article by Gandalf" || text="Article by Gandalf" || id="Article by Gandalf"' ;
1313
14- const { response, clicks, snapshots } = await runTapOn ( selector , ( ) =>
14+ const { response, clicks, clickFlags , snapshots } = await runTapOn ( selector , ( ) =>
1515 currentBreadcrumbSnapshot ( ) ,
1616 ) ;
1717
1818 expect ( response . ok ) . toBe ( true ) ;
1919 expect ( snapshots ) . toBe ( 1 ) ;
2020 expect ( clicks ) . toEqual ( [ [ '86' , '89' ] ] ) ;
21+ expect ( clickFlags [ 0 ] ?. postGestureStabilization ) . toBe ( true ) ;
2122} ) ;
2223
2324test ( 'invokeMaestroTapOn uses optimized interactive snapshots by default' , async ( ) => {
@@ -125,6 +126,7 @@ test('invokeMaestroTapOn clicks explicit React Native overlay controls directly'
125126
126127test ( 'invokeMaestroSwipeScreen maps horizontal directional swipes to native gesture presets' , async ( ) => {
127128 const gestures : string [ ] [ ] = [ ] ;
129+ const gestureFlags : Array < DaemonRequest [ 'flags' ] > = [ ] ;
128130 const response = await invokeMaestroSwipeScreen ( {
129131 baseReq : {
130132 token : 'test' ,
@@ -135,6 +137,7 @@ test('invokeMaestroSwipeScreen maps horizontal directional swipes to native gest
135137 invoke : async ( req : DaemonRequest ) : Promise < DaemonResponse > => {
136138 if ( req . command === 'gesture' ) {
137139 gestures . push ( req . positionals ?? [ ] ) ;
140+ gestureFlags . push ( req . flags ) ;
138141 return { ok : true , data : { } } ;
139142 }
140143 return { ok : false , error : { code : 'UNEXPECTED_COMMAND' , message : req . command } } ;
@@ -143,6 +146,7 @@ test('invokeMaestroSwipeScreen maps horizontal directional swipes to native gest
143146
144147 expect ( response . ok ) . toBe ( true ) ;
145148 expect ( gestures ) . toEqual ( [ [ 'swipe' , 'left' , '300' ] ] ) ;
149+ expect ( gestureFlags [ 0 ] ?. postGestureStabilization ) . toBeUndefined ( ) ;
146150} ) ;
147151
148152test ( 'invokeMaestroSwipeScreen mirrors horizontal directional swipe presets' , async ( ) => {
@@ -169,6 +173,7 @@ test('invokeMaestroSwipeScreen mirrors horizontal directional swipe presets', as
169173
170174test ( 'invokeMaestroSwipeScreen preserves vertical percentage endpoints' , async ( ) => {
171175 const swipes : string [ ] [ ] = [ ] ;
176+ const swipeFlags : Array < DaemonRequest [ 'flags' ] > = [ ] ;
172177 const response = await invokeMaestroSwipeScreen ( {
173178 baseReq : {
174179 token : 'test' ,
@@ -182,6 +187,7 @@ test('invokeMaestroSwipeScreen preserves vertical percentage endpoints', async (
182187 }
183188 if ( req . command === 'swipe' ) {
184189 swipes . push ( req . positionals ?? [ ] ) ;
190+ swipeFlags . push ( req . flags ) ;
185191 return { ok : true , data : { } } ;
186192 }
187193 return { ok : false , error : { code : 'UNEXPECTED_COMMAND' , message : req . command } } ;
@@ -190,6 +196,7 @@ test('invokeMaestroSwipeScreen preserves vertical percentage endpoints', async (
190196
191197 expect ( response . ok ) . toBe ( true ) ;
192198 expect ( swipes ) . toEqual ( [ [ '200' , '600' , '200' , '280' , '300' ] ] ) ;
199+ expect ( swipeFlags [ 0 ] ?. postGestureStabilization ) . toBe ( true ) ;
193200} ) ;
194201
195202test ( 'invokeMaestroSwipeScreen keeps Android horizontal percentage swipes on the content lane' , async ( ) => {
@@ -219,6 +226,7 @@ test('invokeMaestroSwipeScreen keeps Android horizontal percentage swipes on the
219226
220227test ( 'invokeMaestroTapPointPercent shares percentage point geometry without clamping' , async ( ) => {
221228 const clicks : string [ ] [ ] = [ ] ;
229+ const clickFlags : Array < DaemonRequest [ 'flags' ] > = [ ] ;
222230 const response = await invokeMaestroTapPointPercent ( {
223231 baseReq : {
224232 token : 'test' ,
@@ -232,6 +240,7 @@ test('invokeMaestroTapPointPercent shares percentage point geometry without clam
232240 }
233241 if ( req . command === 'click' ) {
234242 clicks . push ( req . positionals ?? [ ] ) ;
243+ clickFlags . push ( req . flags ) ;
235244 return { ok : true , data : { } } ;
236245 }
237246 return { ok : false , error : { code : 'UNEXPECTED_COMMAND' , message : req . command } } ;
@@ -240,6 +249,7 @@ test('invokeMaestroTapPointPercent shares percentage point geometry without clam
240249
241250 expect ( response . ok ) . toBe ( true ) ;
242251 expect ( clicks ) . toEqual ( [ [ '500' , '-80' ] ] ) ;
252+ expect ( clickFlags [ 0 ] ?. postGestureStabilization ) . toBe ( true ) ;
243253} ) ;
244254
245255function currentBreadcrumbSnapshot ( ) : SnapshotState {
@@ -277,10 +287,12 @@ async function runTapOn(
277287 response : DaemonResponse ;
278288 commands : string [ ] ;
279289 clicks : string [ ] [ ] ;
290+ clickFlags : Array < DaemonRequest [ 'flags' ] > ;
280291 snapshots : number ;
281292} > {
282293 const commands : string [ ] = [ ] ;
283294 const clicks : string [ ] [ ] = [ ] ;
295+ const clickFlags : Array < DaemonRequest [ 'flags' ] > = [ ] ;
284296 let snapshots = 0 ;
285297 const response = await invokeMaestroTapOn ( {
286298 baseReq : {
@@ -297,12 +309,13 @@ async function runTapOn(
297309 }
298310 if ( req . command === 'click' ) {
299311 clicks . push ( req . positionals ?? [ ] ) ;
312+ clickFlags . push ( req . flags ) ;
300313 return { ok : true , data : { } } ;
301314 }
302315 return { ok : false , error : { code : 'UNEXPECTED_COMMAND' , message : req . command } } ;
303316 } ,
304317 } ) ;
305- return { response, commands, clicks, snapshots } ;
318+ return { response, commands, clicks, clickFlags , snapshots } ;
306319}
307320
308321function fullScreenSnapshot ( width : number , height : number ) : SnapshotState {
0 commit comments