-
Notifications
You must be signed in to change notification settings - Fork 667
Get deprecated notification while using findAll() on html/css selector (no Vue component) #1703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You cannot chain Why not just do |
@lmiller1990 Since our components are rendering VNodes, I do not feel like these are two are separate concepts. Let me explain my point via real world example - sometimes we want in GitLab to use DOM element VNode as root of our search. Something like "Find |
As a potential solution, WDYT of adding to |
This API is not forward compatible with Vue 3 + VTU v2 iirc - thus the deprecation. You cannot find a vnode from a DOM component, according to this comment. I am not exactly why this isn't forward compatible with Vue 3, since obviously it does work here. The VDOM implementation changed a lot in Vue 2 -> Vue 3, maybe that is why? I have not personally looked into it, since I am a fan of making the separation between testing the DOM output (via If we can support chaining both ways in V2, it would be fine to allow chaining both You could try implementing this in V2, to see if it's really not forward compatible. The relevant file is here, it is pretty confusing, though 😅 WDYT? |
@lmiller1990 will be happy to try 👍 |
Subject of the issue
It is not possible to run
findAll()
without getting the deprecation notice:But it is not possible to use
findAllComponents()
if the wrapper is a non-vue component.You will receive the following error:
Steps to reproduce
notice: I'm using
mocha
andchai-should
Expected behaviour
const rows = table.findAllComponents(TableRow)
should return aWrapperArray
containing allTableRow
components.OR
const rows = table.findAll(TableRow)
should return aWrapperArray
containing allTableRow
components without display a deprecation notice.Actual behaviour
receiving an error:
Possible Solution
Don't show deprecation notice if you're using
findAll()
on non-vue component.The text was updated successfully, but these errors were encountered: