Closed volkanatalan closed 8 months ago
@volkanatalan could you share a simple repro example. I think i know what the issue is but i would need to reproduce it
@farfromrefug Thank you for your interest. Here it is:
https://github.com/volkanatalan/MDTextFieldTestIdIssue
I added both MDTextField and TextField components to the page. I can find TextField with its testID but can't find MDTextField.
@volkanatalan thanks but it is missing the maestro part isnt it? I never used maestro so would be nice for the sample project to have it set up
@farfromrefug To install Maestro you need to run the following command:
curl -Ls "https://get.maestro.mobile.dev" | bash
I think this will be enough to install it, but if you need any further information, you can check the Maestro documentation.
Then you need to run Maestro Studio with the following command from the terminal:
maestro studio
This will open a page in the browser, similar to this:
If you click on the text fields, you will see the suggestions (tap, assert etc.). You will notice that it gives the suggestions with an "id" for the component on the bottom (TextField) but not for the component on the top (MDTextField).
@volkanatalan i just released a new version which should fix this!
Awesome thanks @farfromrefug
@farfromrefug I installed the latest version but the issue still persists.
I think this.nativeViewProtected
should be passed to setAccessibilityIdentifier instead of this.nativeTextViewProtected
. When I do this change, I can find the component.
@volkanatalan damn what did i do :D Indeed my commit is wrong!
@volkanatalan new release up. Hopefully this one is good
@farfromrefug haha no worries now it works like a charm. Thank you very very much 👍 👍
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
1- Add an MDTextField component to the page with a
testID
attribute2- Run
maestro studio
and do assertVisible for the "text-field" idIt returns false for the assertion on Android. However it works fine on iOS.