ember-test-helpers icon indicating copy to clipboard operation
ember-test-helpers copied to clipboard

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

Open tstormk opened this issue 3 years ago • 1 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.

tstormk avatar Aug 16 '22 14:08 tstormk

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.

bertdeblock avatar Feb 18 '23 08:02 bertdeblock

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

NullVoxPopuli avatar Aug 20 '24 14:08 NullVoxPopuli