rishabhbhatia / react-native-awesome-alerts

Awesome alerts for React Native, works with iOS and Android.
MIT License
525 stars 71 forks source link

Add testID for confirm and cancel btn #96

Closed fredlemieux closed 3 years ago

fredlemieux commented 3 years ago

Using the awesome alerts in automated tests is made difficult due to the lack of testIDs for buttons.

This PR adds testIDs to cancel and confirm buttons, and includes information about this in the README.md file.

rishabhbhatia commented 3 years ago

@fredlemieux Hey Frederique good initiative. Since we're going in this direction, I'd rather enable the library consumer to pass the testID from props, something like a cancelButtonTestID & confirmButtonTestID prop and default them to the ones you've added.

Possible to make this change and then let's merge it.

fredlemieux commented 3 years ago

No problem, all done 👍 Let me know if you need anything else changed.

fredlemieux commented 3 years ago

seems like the cancel button desc still says Confirm button testID, can you double-check it for me @fredlemieux

My goodness. It's one of these weeks. Apologies.

fredlemieux commented 3 years ago

I've updated the snapshots and did npm audit fix while I was at it.

rishabhbhatia commented 3 years ago

Looks good to me Frederique, merged them. I'll release a new version shortly.