react-native-google-places-autocomplete icon indicating copy to clipboard operation
react-native-google-places-autocomplete copied to clipboard

Feature Request: Add testID for each row on the adresse list

Open grolousi opened this issue 3 years ago • 4 comments

Is your feature request related to a problem? Please describe.

I'm doing E2E testing and I need to inject a testID prop to be able to interact with a component. Using the TextInputProps I'm able to do that with the input but not the with the items in the list.

Describe the solution you'd like

Add an "testID" prop to the TouchableHighlight on the "_renderRowComponent"

Note: Maybe there is a way to do that already and I didn't find it

Thank you for your time !

grolousi avatar Dec 28 '21 11:12 grolousi

@FaridSafi @bell-steven I'll be glad to do the PR if needed. Just want to be sure I didn't miss something

Thank for you time !

grolousi avatar Mar 07 '22 10:03 grolousi

using detox try this: <Box testID="address"> <GooglePlacesAutocomplete ref={ref} listViewDisplayed="auto" fetchDetails={true} onPress={(data, details = null) => { if (details) { handleLocationSelection(details) } }} placeholder="Search..." query={{ ... }} /> </Box>

access element: await element(by.id('address')).typeText('south west')

jomasim avatar Oct 12 '22 12:10 jomasim

I would also like this feature as tapping based on the accessible text using Maestro is inconsistent

KrisLau avatar May 15 '23 14:05 KrisLau

It would be a nice feature for integration tests

MarcHbb avatar Apr 13 '24 09:04 MarcHbb