Marker/Info Window Test Tags
I can't find a way to tap on map markers or their info windows as part of instrumentation UI tests. With other components in Compose, it's possible to find nodes during testing using testTags or contentDescriptions.
It would be useful to add these to markers or their modifiers to help with testing. Also keen to hear if there's another way of doing this!
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
bump
Be able to click a marker to show Markers info in order to validate it might be helpful for testing in compose, I tried with tag parameter but any node is being created with the passed tag in MarkerInfoWindowContent:
not working example:
MarkerInfoWindowContent(
state = rememberMarkerState(position = location),
tag = ID_TRACKING_MAP_MARKER_TAG
) { ... }
Output of the following:
this.composeTestRule.onRoot(true).printToLog("trackingMapAgentScreenMap_MarkersInfoTest")
is (see how any node has the passed tag):
printToLog:
Printing with useUnmergedTree = 'true'
Node #1 at (l=0.0, t=290.0, r=1080.0, b=2274.0)px
|-Node #2 at (l=0.0, t=290.0, r=1080.0, b=2274.0)px
MergeDescendants = 'true'
I tried using MarkerComposable with the testTag modifier, but it doesn't work either 😢