You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BottomSheet: tell the header buttons of two stacked sheets apart in UI tests #86
When one BottomSheet is presented over another, a UI test can tell their header close buttons apart, and their back buttons.
Current Behavior
BottomSheet draws its header buttons with NavigationBarElement.back.button and NavigationBarElement.close.button, so both sheets' close buttons answer to navigationbar-close:
#85 adds NavigationBarElement.button(accessibilityIdentifier:action:), which lets a host name a bar button it draws itself. The sheet's header does not pass one, and BottomSheet takes no identifier of its own. A host can wrap a sheet's content in .accessibilityElement(children: .contain) with an identifier and query inside it, if the header is part of that element.
Possible Solution
An optional identifier for the header's back and close buttons on BottomSheet, passed to the new overload; nil keeps the fixed ones. Additive.
Or document scoping the query to a container per sheet, after checking that it reaches the header.
Steps to Reproduce
Present a BottomSheet with its close button, and from it a second BottomSheet with its own.
In XCUITest, query app.buttons["navigationbar-close"]: two elements match.
Activity