wrapper.findAllComponents() should Take CSS selectors as an argument.
Well maybe I'm doing something wrong by not throwing refs on every tiny element in my component or making sub components out of every div, but how can I safely test the amount of elements rendered to a list by referencing their class selector when I should not be using the findAll() method anymore?
Am I missing something (which is definitely not unlikely)? If not, this feature would be well appreciated.
wrapper.findAll() Has a deprecation warning, the suggested substitute wrapper.findAllComponents() does not cover the functionality.
As described in the Feature Description
An additional wrapper.findAllElements() function.
Hi! As stated in Update docs, you can use find/findAll on DOM nodes using the querySelector syntax. On the other hand, findComponent and findAllComponents accept a component reference/instance.
So it is likely that findAll would suit your needs.
Hope it helps!
@afontcu thanks for your answer but as I described: _"findAll() Has a deprecation warning"_ (docs), so I would like to avoid using it on new projects.
Hi!
The deprecation warning is only about using findAll to find all Components, not to find all DOM elements.
Well that make sense, I forgot to distinguish between these two, sometimes my brain needs a little kick in in the ass. Thank you for your help.
Most helpful comment
Hi!
The deprecation warning is only about using
findAllto find all Components, not to find all DOM elements.