@@ -26,6 +26,12 @@ function geometrySnapshot(kind: IosViewportEvidence['kind']) {
2626 label : 'Geometry action' ,
2727 rect : { x : root . x + 240 , y : root . y + 90 , width : 220 , height : 42 } ,
2828 hittable : true ,
29+ nativePressTarget : {
30+ type : 9 ,
31+ identifier : 'geometry-action' ,
32+ label : 'Geometry action' ,
33+ rect : { x : root . x + 240 , y : root . y + 90 , width : 220 , height : 42 } ,
34+ } ,
2935 } ,
3036 ] ;
3137 attachSnapshotViewportEvidence (
@@ -126,6 +132,10 @@ for (const kind of ['derived', 'missing'] as const) {
126132 const calls : unknown [ ] = [ ] ;
127133 const snapshot = geometrySnapshot ( kind ) ;
128134 const device = createInteractionDevice ( snapshot , {
135+ readPressReadiness : async ( ) => {
136+ calls . push ( 'readiness' ) ;
137+ return 'ready' ;
138+ } ,
129139 tap : async ( _context , point ) => {
130140 calls . push ( point ) ;
131141 } ,
@@ -158,20 +168,35 @@ for (const kind of ['derived', 'missing'] as const) {
158168
159169test ( 'reported screen geometry still activates the resolved selector and saved ref' , async ( ) => {
160170 const taps : Point [ ] = [ ] ;
171+ const readinessTargets : unknown [ ] = [ ] ;
161172 const device = createInteractionDevice ( geometrySnapshot ( 'reported' ) , {
173+ readPressReadiness : async ( _context , target ) => {
174+ readinessTargets . push ( target ) ;
175+ return 'ready' ;
176+ } ,
162177 tap : async ( _context , point ) => {
163178 taps . push ( point ) ;
164179 } ,
165180 } ) ;
166181 const observed = await device . capture . snapshot ( { session : 'default' } ) ;
167182 const target = observed . nodes . find ( ( node ) => node . identifier === 'geometry-action' ) ;
168183 assert . ok ( target ?. ref ) ;
184+ assert . equal ( 'nativePressTarget' in target , false ) ;
169185 await device . interactions . press ( selector ( 'id=geometry-action' ) , { session : 'default' } ) ;
170186 await device . interactions . press ( ref ( `@${ target . ref } ` ) , { session : 'default' } ) ;
171187 assert . deepEqual ( taps , [
172188 { x : 591 , y : 335 } ,
173189 { x : 591 , y : 335 } ,
174190 ] ) ;
191+ assert . equal ( readinessTargets . length , 2 ) ;
192+ for ( const binding of readinessTargets ) {
193+ assert . deepEqual ( binding , {
194+ type : 9 ,
195+ identifier : 'geometry-action' ,
196+ label : 'Geometry action' ,
197+ rect : { x : 481 , y : 314 , width : 220 , height : 42 } ,
198+ } ) ;
199+ }
175200} ) ;
176201
177202test ( 'unknown capture authority refuses before an offscreen rescue can replace geometry' , async ( ) => {
0 commit comments