Add `data-testid` prop to control components
Opened this issue · 4 comments
birdofpreyru commented
Button
, Input
, etc. should pass it to their underlying control elements to facilitate their look-up in DOM by react-dom testing library.
birdofpreyru commented
Added to Button, Dropdown, Modal components. More to come.
birdofpreyru commented
Also... update to avoid any test ids being used in production builds.
i.e. use inline process.env.NODE_ENV !== 'production'
check, so that Webpack can completely optimize it out of production code.
birdofpreyru commented
These are done now:
- Add testId
to Checkbox!
- Add testIdForOverlay
to Modal!
birdofpreyru commented
TextArea needs it!