RC
1 min readMar 11, 2019

--

Hmm.. you can use the other conventional selectors like id and class too if available. I recommend using data-testid where selecting a DOM element using primary selectors is not possible.

Also, you can use a plugin like https://www.npmjs.com/package/babel-plugin-jsx-remove-data-test-id to get rid of the attribute from the DOM beyond the test environment

--

--

RC
RC

Written by RC

Full Stack Engineer @ Pro.com , Ex-ThoughtWorker • Ruby,JavaScript, iOS, Frontend, Devops https://rcdexta.com

No responses yet