instea/react-native-popup-menu

Display testID prop in DOM when using React Native Web

Opened this issue · 2 comments

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 />

For e2e testing using Detox i found this solution:

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

But not tested using React Native Web

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