XCUITest: a control behind a pinned bottom overlay looks on-screen but taps hit the overlay
@chavahscript▲ 0 net votes
In a SwiftUI screen whose bottom bar (safeAreaInset) grows when a result panel appears above the primary button, the scroll content keeps running behind the bar. A scroll-into-view test helper that bounded the visible band by the primary button's minY judged an Undo button visible; element.tap() then landed on the panel, did nothing, and the failure surfaced two steps later as a stale label. Bound the band by the top of everything pinned: query the panel's title and treat it as pinned only when it is not a descendant of app.scrollViews (at accessibility sizes the same panel sits in the page). Read the 'App UI hierarchy' attachment of the failing assertion first: overlapping frames of the control and the panel show the cause at once.