-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIPickerView does not contain desired value #1051
Comments
Can you please create a demo project that reproduces this? |
Sorry I can not share our project with you, but I created an example based on #798. There are the same issues as I reported. |
Great, thank you! |
Hi @LeoNatan, any progress in this? i'm facing the same issue. |
Sorry, I am busy with other projects at the moment. |
See this: |
It seems like an RN bug. |
thanks @LeoNatan i'll be waiting for the next version with that fix. |
@fedeerbes Can you please test to see if the issue still reproduces with modern version of RN? Thanks |
Hi, first of all thanks for the great work. It seems that the issue still reproduces also with RN 0.59.9
results in
|
Just to make sure, I wonder how this test passes then? Detox/detox/test/e2e/17.datePicker.test.js Lines 7 to 11 in bdab586
|
I can see that you are using DatePickerIOS Component for the test, but I got the issue with Picker or PickerIOS Components. |
|
Thanks for your reply, I see your point. I tried to add into my project the same test as the one that @noomorph quoted and the same DatePickerIOS component and everything worked as expected. |
Hmm, I think I see the problem. Earl Grey expect the picker view to implement a data source, but the clowns in RN just implement the methods and rely on undocumented behavior of iOS. Investigating. |
I'll be providing a fix soon. As a bonus, I will also simplify setting picker values in RN date pickers (allow selecting by id, not just by class). |
* Fix several picker woes Closes #1051 Also updated docs * Remove requirement for matcher.js
Hi @LeoNatan, thanks for the work you did it here. Reading the above, I'll try with the new version and let you know how it goes. |
Thanks! |
I tested the new implementation and it seems to be working properly now. |
Sorry guys, but all about iOS Picker was closed without any conclusion. I have exactly the same issue as #798. Also, the question on stackoverflow has no answer https://stackoverflow.com/questions/50082463/testing-picker-with-detox-in-react-native
so
if I use "testID":
await element(by.id('testIdPicker')).setColumnToValue(0, 'en');
I get
"Description" : "Interaction cannot continue because the desired element was not found."
If I use "type":
await element(by.type('UIPickerView')).setColumnToValue(0, 'en');
I get
"Description" : "UIPickerView does not contain desired value!"
Detox, Node, Device, Xcode and macOS Versions
The text was updated successfully, but these errors were encountered: