emberjs/ember-test-helpers

Support for finding elements by text, label, alt text, etc.?

tstormk opened this issue · 2 comments

Are there any plans to support finding elements by attributes such as text, label, alt text, etc., similar to Testing Library queries? I think this would be valuable to provide as an alternative to just finding elements by CSS selectors.

We could add functions findByText, findByLabelText, findByAltText, and so on.

I would opt for not having Ember-specific utils for this, and suggest that people use the Testing Library utils directly for querying the DOM. This has been working very well for us.

Gonna close as there is nothing stopping folks from using @testing-library/dom -- and I've confirmed the whole library works, and did a prototype for integrating the async interactions with the settled system here:

https://www.npmjs.com/package/testing-library-ember