mapbox-maps-ios icon indicating copy to clipboard operation
mapbox-maps-ios copied to clipboard

Using accessibilityIdentifier for UITests

Open jamesormond opened this issue 1 year ago • 4 comments

Environment

  • Xcode version: 15.2
  • iOS version: 17.0.1
  • Devices affected:
  • Maps SDK Version: 10.16.0

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

jamesormond avatar Jan 31 '24 19:01 jamesormond

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

OdNairy avatar Feb 01 '24 05:02 OdNairy

We are looking at point annotations and features

jamesormond avatar Feb 01 '24 23:02 jamesormond

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

jamesormond avatar Feb 22 '24 19:02 jamesormond

@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.

OdNairy avatar Feb 27 '24 08:02 OdNairy