react-native-menu / menu

UIMenu Component for React Native
MIT License
998 stars 59 forks source link

feat(props): adding test id and library mock example #931

Closed mateoguzmana closed 1 month ago

mateoguzmana commented 1 month ago

Overview

As also mentioned in https://github.com/react-native-menu/menu/issues/817, having a testID is quite useful for unit testing and automation purposes. This PR addresses that

Additionally, I spent some time trying mock the MenuView behaviour and couldn't find any example around. I'm adding an example here as it's a common use case and would be very useful for future users of this library.

Fixes #817

Test Plan

Run: yarn typescript && yarn prepare