Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Get deprecated notification while using findAll() on html/css selector (no Vue component) #1703
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 |
@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.