Display testID prop in DOM when using React Native Web
Opened this issue · 2 comments
JesseRWeigel commented
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
For e2e testing using Detox i found this solution:
<MenuOption customStyles={{ optionTouchable: { testID: 'option-open' } }} />
But not tested using React Native Web
sodik82 commented
with 0.15.10
there is new property testID
but not sure how it works in RN web.