Support for testing-library #1117
-
What about adding support for test-id to use with the testing-library? I'm finding myself in a bind to find if is loaded in the page. https://testing-library.com/docs/dom-testing-library/api-queries#bytestid |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@WebDevTmas You should be able to pass Check out the codesandbox below, and inspect the https://codesandbox.io/s/jolly-keldysh-5hnl9?file=/src/App.js |
Beta Was this translation helpful? Give feedback.
@WebDevTmas You should be able to pass
test-id
as a prop to all Evergreen components. Evergreen embraces "passthrough props" so anything that isn't captured byui-box
and transformed into a classname ends up on the rendered DOM element itself.Check out the codesandbox below, and inspect the
<Pane />
to see thattest-id
ends up in the DOM.https://codesandbox.io/s/jolly-keldysh-5hnl9?file=/src/App.js