mapbox / mapbox-maps-ios

Interactive, thoroughly customizable maps for iOS powered by vector tiles and Metal
https://www.mapbox.com/mapbox-mobile-sdk
Other
450 stars 148 forks source link

Using accessibilityIdentifier for UITests #2107

Open jamesormond opened 5 months ago

jamesormond commented 5 months ago

Environment

Observed behavior and steps to reproduce

We are writing Xcode UI Tests for our app. Our test case requires that we tap a marker on the map, which would then launch another feature. In UI Tests, UI elements are accessed via their accessibilityIdentifier. However, we are not able to set an accessibilityIdentifier for the MapBox marker. How can we accomplish this task? Is there a way to set the accessibilityIdentifier, or is there another workaround we must do?

Expected behavior

N/A

Notes / preliminary analysis

N/A

Additional links and references

N/A

OdNairy commented 5 months ago

Hey @jamesormond What kind of marker we are talking about? Is it a ViewAnnotation or any other kind of Annotations?

jamesormond commented 5 months ago

We are looking at point annotations and features

jamesormond commented 4 months ago

@OdNairy just following up on this thread. What is your suggestion?

OdNairy commented 4 months ago

@jamesormond most of the elements on the MapView are rendered with a Metal as part of the single CAMetalLayer. It is not possible to accessibilityIdentifier for such elements, unfortunately.