expo / react-native-action-sheet

A cross-platform ActionSheet for React Native
MIT License
1.4k stars 226 forks source link

Support for automated tests #286

Open HungDuc13 opened 1 year ago

HungDuc13 commented 1 year ago

Is it possible to add accessibility IDs/testIDs to action sheet buttons?

bradbyte commented 1 year ago

@HungDuc13 I assume you're referring to the custom action sheet? I believe the iOS side would just forward everything to the ActionSheetIOS api.

HungDuc13 commented 1 year ago

@bradbyte I'm trying to do an automation test on action sheet buttons of the showActionSheetWithOptions, but browsing through the list of universal props, i don't see a way to add accessibility IDs/test IDs specifically to the action sheet buttons.

bradbyte commented 1 year ago

I don't think the custom action sheet supports that, though I'm sure it could be added. I'm not sure how you would test it on iOS though as I don't see anything in the ActionSheetIOS documentation for these props.