@@ -31,7 +31,7 @@ test('Appium iOS snapshots acquire facts and publish regular output through the
3131 [ 'XCUIElementTypeButton' , 'Continue' , 1 ] ,
3232 ] ,
3333 ) ;
34- assert . equal ( result . nodes ?. find ( ( node ) => node . label === 'Continue' ) ?. hittable , false ) ;
34+ assert . equal ( result . nodes ?. find ( ( node ) => node . label === 'Continue' ) ?. hittable , undefined ) ;
3535 assert . equal ( source . mock . calls . length , 1 ) ;
3636 assert . ok ( result . warnings ?. some ( ( warning ) => warning . includes ( 'hittability evidence' ) ) ) ;
3737 assert . deepEqual ( Object . keys ( result ) . sort ( ) , [
@@ -85,6 +85,22 @@ test('Appium iOS options become an engine plan and engine-owned projection', ()
8585 assert . deepEqual ( published . publication . comparisonIdentity . lineage , { } ) ;
8686} ) ;
8787
88+ test ( 'Appium regular presentation omits unavailable hittability while raw preserves supplied facts' , async ( ) => {
89+ const source =
90+ '<AppiumAUT><XCUIElementTypeApplication x="0" y="0" width="390" height="844">' +
91+ '<XCUIElementTypeButton name="Continue" x="24" y="700" width="160" height="48" hittable="true" />' +
92+ '</XCUIElementTypeApplication></AppiumAUT>' ;
93+
94+ const regular = await captureWebDriverIosSnapshot ( { source : async ( ) => source } ) ;
95+ const regularButton = regular . nodes ?. find ( ( node ) => node . label === 'Continue' ) ;
96+ assert . equal ( regularButton ?. hittable , undefined ) ;
97+ assert . equal ( 'hittable' in ( regularButton ?? { } ) , false ) ;
98+
99+ const raw = await captureWebDriverIosSnapshot ( { source : async ( ) => source } , { raw : true } ) ;
100+ assert . equal ( raw . nodes ?. find ( ( node ) => node . label === 'Continue' ) ?. hittable , true ) ;
101+ assert . ok ( raw . warnings ?. some ( ( warning ) => warning . includes ( 'does not guarantee' ) ) ) ;
102+ } ) ;
103+
88104test ( 'Appium iOS interactive requests stay provider-unpruned and use engine presentation' , ( ) => {
89105 const acquired = acquireWebDriverIosSnapshot ( SOURCE , { interactiveOnly : true } , 'ios-1' ) ;
90106
@@ -95,7 +111,10 @@ test('Appium iOS interactive requests stay provider-unpruned and use engine pres
95111 published . result . nodes ?. some ( ( node ) => node . label === 'Continue' ) ,
96112 true ,
97113 ) ;
98- assert . equal ( published . result . nodes ?. find ( ( node ) => node . label === 'Continue' ) ?. hittable , false ) ;
114+ assert . equal (
115+ published . result . nodes ?. find ( ( node ) => node . label === 'Continue' ) ?. hittable ,
116+ undefined ,
117+ ) ;
99118} ) ;
100119
101120test ( 'Appium iOS regular presentation fails typed when page source has no viewport' , ( ) => {
@@ -109,6 +128,7 @@ test('Appium iOS regular presentation fails typed when page source has no viewpo
109128 } ) ;
110129 assert . deepEqual ( acquired . input . acquisition . residue , [
111130 { kind : 'unavailable-fact' , fact : 'hittability' } ,
131+ { kind : 'unavailable-fact' , fact : 'acquisition-depth' } ,
112132 { kind : 'missing-viewport' , reason : 'not-provided' } ,
113133 ] ) ;
114134 assert . throws (
@@ -147,15 +167,12 @@ test('Appium iOS regular presentation fails typed when root geometry is invalid'
147167 ) ;
148168} ) ;
149169
150- test ( 'Appium iOS truncation is typed and disclosed at response level' , async ( ) => {
151- const result = await captureWebDriverIosSnapshot (
152- { source : async ( ) => SOURCE . replace ( '<AppiumAUT>' , '<AppiumAUT truncated="true">' ) } ,
153- { raw : true } ,
154- ) ;
170+ test ( 'Appium iOS hierarchy limits are typed and disclosed at response level' , async ( ) => {
171+ const result = await captureWebDriverIosSnapshot ( { source : async ( ) => SOURCE } , { raw : true } ) ;
155172
156- assert . equal ( result . truncated , true ) ;
173+ assert . equal ( result . truncated , false ) ;
157174 assert . deepEqual ( result . warnings , [
158- 'Appium page source does not provide hittability evidence; the capture carries no hittability fact .' ,
159- 'Appium page source is truncated; the snapshot hierarchy may be incomplete .' ,
175+ 'Appium page source does not guarantee hittability evidence; regular presentation treats it as unavailable .' ,
176+ 'Appium page source does not report hierarchy completeness; depth- or child-limited nodes may be absent .' ,
160177 ] ) ;
161178} ) ;
0 commit comments