instea / react-native-popup-menu

Popup menu component for React Native
ISC License
1.48k stars 248 forks source link

Display testID prop in DOM when using React Native Web #155

Open JesseRWeigel opened 5 years ago

JesseRWeigel commented 5 years ago

Right now, setting a testID on a react-native-popup-menu component does not cause that to be displayed in the DOM when using React Native Web. It should pass that testID on so that it actually gets included in the DOM. This is important for running end-to-end testing.

For Example:

<MenuOption testID="menu-option-id" />

Expected result:

<div data-testid="menu-option-id" />

Actual Result:

<div />
mikbry commented 3 years ago

For e2e testing using Detox i found this solution:

<MenuOption customStyles={{ optionTouchable: { testID: 'option-open' } }} />

But not tested using React Native Web

sodik82 commented 3 years ago

with 0.15.10 there is new property testID but not sure how it works in RN web.