Skip to content

TestID's for e2e automation#2253

Merged
christopherdro merged 3 commits intoreact-native-maps:masterfrom
compojoom:testID
Apr 14, 2019
Merged

TestID's for e2e automation#2253
christopherdro merged 3 commits intoreact-native-maps:masterfrom
compojoom:testID

Conversation

@compojoom
Copy link
Copy Markdown
Contributor

@compojoom compojoom commented May 14, 2018

It seems that the following pull #1170 request has been abandoned, but testID is still required if one wants to make e2e tests

Does any other open PR do the same thing?

#1170

  • the previous PR is stalled, as it's really old and the author didn't continue working on it
  • there are conflicts with the master branch and the author didn't fix them

What issue is this PR fixing?

rendered markers don't have testID prop which is necessary for e2e tests
Closes #2252
Closes #1104

How did you test this PR?

  1. Create a marker and add it a testID
  2. Launch your app in ios simulator, then in XCode navigate to the debug navigator and press the debug View Hierarchy button. This will create a snapshot of your UI similar to this:

grafik

Select the marker and it should have an identifier set in the Accessibility section on the right.

This was tested on a real device and simulator. The change applies to ios only.

It seems that the following pull react-native-maps#1170 request has been abandoned, but testID is still required if one wants to make e2e tests

react-native-maps#2252
@andyesp
Copy link
Copy Markdown

andyesp commented Aug 8, 2018

Any chance to review and merge this? Would be great to allow Detox, for example, to find markers.

@AngelVenchev
Copy link
Copy Markdown

Hey, just a quick update for anyone wondering about this. 'react-native-maps' currently supports the testID prop for markers for google maps on iOS (v0.23.0). However markers are not interactable, meaning you cannot tap on them.

There are two workarounds I am currently implementing:

  1. TapAtPoint, assuming I know where the marker is drawn on the map.
  2. Custom marker view and adding the testID on that and trying to tap on that. This one is not tested.

I am using the first approach because in my e2e tests I am able to create all my markers and then I can test with the newly created ones.

@christopherdro christopherdro changed the title re-applying pull request 1170 TestID's for e2e automation Apr 14, 2019
@christopherdro christopherdro merged commit 35e9643 into react-native-maps:master Apr 14, 2019
@danielgindi
Copy link
Copy Markdown
Contributor

Currently with UITests (XCTest) I can't even test for the marker's existence via its id. I don't think its working.

pinpong pushed a commit to pinpong/react-native-maps that referenced this pull request Feb 28, 2025
* re-applying pull request 1170

It seems that the following pull react-native-maps#1170 request has been abandoned, but testID is still required if one wants to make e2e tests

react-native-maps#2252

* Update App.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Google Maps e2e tests TestID's for e2e automation

5 participants