react-native-popup-menu icon indicating copy to clipboard operation
react-native-popup-menu copied to clipboard

Display testID prop in DOM when using React Native Web

Open JesseRWeigel opened this issue 6 years ago • 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 />

JesseRWeigel avatar Apr 30 '19 14:04 JesseRWeigel

For e2e testing using Detox i found this solution:

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

But not tested using React Native Web

mikbry avatar Dec 09 '20 15:12 mikbry

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

sodik82 avatar Dec 11 '20 13:12 sodik82