@@ -147,7 +147,7 @@ extension RunnerTests {
147147 return result . elements
148148 }
149149
150- var nodes : [ SnapshotNode ] = [ ]
150+ var nodes : [ RawAXNode ] = [ ]
151151 var hiddenContentHintsByNodeIndex : [ Int : ( above : Bool , below : Bool ) ] = [ : ]
152152 let rootEvaluation = evaluateSnapshot ( context . rootSnapshot , in : context )
153153 nodes . append (
@@ -316,7 +316,7 @@ extension RunnerTests {
316316 }
317317
318318 return DataPayload (
319- nodes : applyHiddenContentHints ( hiddenContentHintsByNodeIndex , to : nodes ) ,
319+ presenting : applyHiddenContentHints ( hiddenContentHintsByNodeIndex , to : nodes ) ,
320320 truncated : false
321321 )
322322 }
@@ -422,7 +422,7 @@ extension RunnerTests {
422422 context : SnapshotTraversalContext ,
423423 options : SnapshotOptions
424424 ) throws -> DataPayload {
425- var nodes : [ SnapshotNode ] = [ ]
425+ var nodes : [ RawAXNode ] = [ ]
426426
427427 func walk ( _ snapshot : XCUIElementSnapshot , depth : Int , parentIndex : Int ? ) throws {
428428 if let limit = options . depth , depth > limit { return }
@@ -460,19 +460,19 @@ extension RunnerTests {
460460 }
461461
462462 try walk ( context . rootSnapshot , depth : 0 , parentIndex : nil )
463- return DataPayload ( nodes : nodes , truncated : false )
463+ return DataPayload ( presenting : nodes , truncated : false )
464464 }
465465
466466 func snapshotFlatInteractive (
467467 app : XCUIApplication ,
468468 options : SnapshotOptions ,
469469 planDeadline : Date = . distantFuture
470470 ) -> DataPayload {
471- var nodes : [ SnapshotNode ] = [
471+ var nodes : [ RawAXNode ] = [
472472 interactiveRootNode ( rect : . zero )
473473 ]
474474 if options . depth == 0 {
475- return DataPayload ( nodes : nodes , truncated : false )
475+ return DataPayload ( presenting : nodes , truncated : false )
476476 }
477477
478478 // Bounded by both its own sweep budget and the umbrella capture-plan deadline, so a
@@ -483,7 +483,7 @@ extension RunnerTests {
483483 let deadline = min ( sweepDeadline , planDeadline )
484484 let viewport = safeSnapshotViewport ( app : app )
485485 var seen = Set < String > ( )
486- var candidates : [ SnapshotNode ] = [ ]
486+ var candidates : [ RawAXNode ] = [ ]
487487 let flatElements = flatInteractiveElements ( app : app , deadline : deadline )
488488 var truncated = flatElements . truncated
489489 for element in flatElements . elements {
@@ -525,7 +525,7 @@ extension RunnerTests {
525525 nodes [ 0 ] = interactiveRootNode ( rect : rootRect )
526526 for candidate in candidates {
527527 nodes . append (
528- SnapshotNode (
528+ RawAXNode (
529529 index : nodes . count ,
530530 type : candidate . type ,
531531 label : candidate . label ,
@@ -543,7 +543,7 @@ extension RunnerTests {
543543 )
544544 )
545545 }
546- return DataPayload ( nodes : nodes , truncated : truncated )
546+ return DataPayload ( presenting : nodes , truncated : truncated )
547547 }
548548
549549 func snapshotAccessibilityUnavailable ( failure : SnapshotCaptureFailure ) -> DataPayload {
@@ -588,7 +588,7 @@ extension RunnerTests {
588588 ) -> DataPayload {
589589 return DataPayload (
590590 message : message ,
591- nodes : [ interactiveRootNode ( rect : . zero ) ] ,
591+ nodes : SnapshotPresentation . preservingCurrentSemantics ( [ interactiveRootNode ( rect : . zero ) ] ) ,
592592 truncated : true ,
593593 snapshotQuality : snapshotQuality ,
594594 runnerFatal : runnerFatal ,
@@ -830,8 +830,8 @@ extension RunnerTests {
830830 }
831831#endif
832832
833- private func interactiveRootNode ( rect : CGRect ) -> SnapshotNode {
834- SnapshotNode (
833+ private func interactiveRootNode ( rect : CGRect ) -> RawAXNode {
834+ RawAXNode (
835835 index : 0 ,
836836 type : " Application " ,
837837 label : nil ,
@@ -849,7 +849,7 @@ extension RunnerTests {
849849 )
850850 }
851851
852- private func interactiveRootFrame ( for candidates : [ SnapshotNode ] ) -> CGRect {
852+ private func interactiveRootFrame ( for candidates : [ RawAXNode ] ) -> CGRect {
853853 guard ! candidates . isEmpty else {
854854 return . zero
855855 }
@@ -1120,8 +1120,8 @@ extension RunnerTests {
11201120 depth : Int ,
11211121 index : Int ,
11221122 parentIndex : Int ?
1123- ) -> SnapshotNode {
1124- return SnapshotNode (
1123+ ) -> RawAXNode {
1124+ return RawAXNode (
11251125 index : index ,
11261126 type : elementTypeName ( snapshot . elementType ) ,
11271127 label : evaluation . label . isEmpty ? nil : evaluation . label ,
@@ -1241,7 +1241,7 @@ extension RunnerTests {
12411241 }
12421242
12431243 private func appendCollapsedTabFallbackNodes (
1244- to nodes : inout [ SnapshotNode ] ,
1244+ to nodes : inout [ RawAXNode ] ,
12451245 containerSnapshot : XCUIElementSnapshot ,
12461246 resolveElements : ( ) -> [ XCUIElement ] ,
12471247 depth : Int ,
@@ -1306,14 +1306,14 @@ extension RunnerTests {
13061306
13071307 func applyHiddenContentHints (
13081308 _ hints : [ Int : ( above : Bool , below : Bool ) ] ,
1309- to nodes : [ SnapshotNode ]
1310- ) -> [ SnapshotNode ] {
1309+ to nodes : [ RawAXNode ]
1310+ ) -> [ RawAXNode ] {
13111311 if hints . isEmpty { return nodes }
13121312 return nodes . map { node in
13131313 guard let hint = hints [ node . index ] else { return node }
13141314 let hiddenContentAbove : Bool ? = ( node . hiddenContentAbove == true || hint . above ) ? true : nil
13151315 let hiddenContentBelow : Bool ? = ( node . hiddenContentBelow == true || hint . below ) ? true : nil
1316- return SnapshotNode (
1316+ return RawAXNode (
13171317 index : node . index ,
13181318 type : node . type ,
13191319 label : node . label ,
@@ -1339,7 +1339,7 @@ extension RunnerTests {
13391339 startingIndex : Int ,
13401340 depth : Int ,
13411341 parentIndex : Int
1342- ) -> [ SnapshotNode ] {
1342+ ) -> [ RawAXNode ] {
13431343 if ! containerSnapshot . children . isEmpty { return [ ] }
13441344 guard shouldExpandCollapsedTabContainer ( containerSnapshot ) else { return [ ] }
13451345 let containerFrame = containerSnapshot . frame
@@ -1378,7 +1378,7 @@ extension RunnerTests {
13781378 if uniqueCandidates . count < 2 { return [ ] }
13791379
13801380 return uniqueCandidates . enumerated ( ) . map { offset , node in
1381- SnapshotNode (
1381+ RawAXNode (
13821382 index : startingIndex + offset ,
13831383 type : node . type ,
13841384 label : node . label ,
@@ -1401,8 +1401,8 @@ extension RunnerTests {
14011401 element : XCUIElement ,
14021402 containerSnapshot : XCUIElementSnapshot ,
14031403 containerFrame : CGRect
1404- ) -> SnapshotNode ? {
1405- var node : SnapshotNode ?
1404+ ) -> RawAXNode ? {
1405+ var node : RawAXNode ?
14061406 let exceptionMessage = RunnerObjCExceptionCatcher . catchException ( {
14071407 if ! element . exists { return }
14081408 let elementType = element . elementType
@@ -1430,7 +1430,7 @@ extension RunnerTests {
14301430 return
14311431 }
14321432
1433- node = SnapshotNode (
1433+ node = RawAXNode (
14341434 index : 0 ,
14351435 type : elementTypeName ( elementType ) ,
14361436 label : label . isEmpty ? nil : label ,
@@ -1568,8 +1568,8 @@ extension RunnerTests {
15681568 parentIndex : Int ? ,
15691569 viewport : CGRect ,
15701570 options : SnapshotOptions
1571- ) -> SnapshotNode ? {
1572- var node : SnapshotNode ?
1571+ ) -> RawAXNode ? {
1572+ var node : RawAXNode ?
15731573 let exceptionMessage = RunnerObjCExceptionCatcher . catchException ( {
15741574 if ! element . exists { return }
15751575 let frame = element . frame
@@ -1601,7 +1601,7 @@ extension RunnerTests {
16011601 return
16021602 }
16031603
1604- node = SnapshotNode (
1604+ node = RawAXNode (
16051605 index : index ,
16061606 type : elementTypeName ( elementType ) ,
16071607 label : label . isEmpty ? nil : label ,
0 commit comments