Repository navigation
docs(api): fix the findComponent example with CSS selectors - #3075
Merged
cexbrayat merged 2 commits intoDec 3, 2026
Merged
Conversation
👷 Deploy request for vue-test-utils-docs pending review.Visit the deploys page to approve it
|
commit: |
cexbrayat
requested changes
Dec 3, 2026
cexbrayat
left a comment
Member
There was a problem hiding this comment.
Could we say “the root element of the wrapper you’re searching from” instead of “the root element of the mounted component” in all three translations? The same DOM node can return Root when searched from an outer wrapper and Child when searched from the nested Root wrapper, no?
Contributor
Author
|
Yes, exactly: searched from the |
cexbrayat
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Usage with CSS selectors" example of
findComponentsays thatfindComponent('.root')andfindComponent('.child')both returnRoot, but both returnChild: on the root element of the mounted component,findComponentreturns the component rendered at the root (since #2327). Here's a playground with 2.6.0: https://play.vuejs.org/#eNqFU01v2zAM/SuEUMAOFsvDPnowHCNbsNtOS3vToZ6jJOpsSZDkZIXh/z5Kjp02TTBAF4qPjx+P7Mg3remh5SQjua2M0A4sd60umBSNVsZBB4ZvoYetUQ1ECI1euRrVSjc5l+hNHbcuaZ2oLQKZTFNwew78b9nomg9A/8HIoy13HI7C7WG1XmPamldOGcsIHEsjhdyB2sJWyM1KYT7JpWOyUtI6WO1Fff6FBXRMAsiy4RlEwRnN/Y/jmLR0/jffiANUdWntgpHKQxgp8hR/C6yzH5l/KeVuEXvfwFuNCJvhEC6q6d+lDumSKWgqwyAhdpueKhhrUK3PjFOPI9NKPwhKaTRjEpV5EA1HfxzPYFEM1Q1BR1NqzQ0GBk3iN41g7IjzOb+/rKxF5CmGvplxHFGP8fnGmFD//4ICaIjCAumhrFsOC28Cju7H+vHnA8QXGwKf6D39OGNMRvBhgD5dLyYD2KjKgi1fgkZz2CkHd93UDj009E5pJ7Bi6gXrkfXpJuup2uw667nh67QoFzaap8PF4K2gMQqOFkCuDS+6LkjZ93nqTR/wCkTmZDijpCk1fbZK4g0GQdnJgZeA6zU0wAhOztuM7J3TNkvTVuo/O4pblaJr+Zl+pV/ucZ+t8zbltkl+G3W0KNUzMoWl9DwXEtzivIAtg1ITfXL2vMvkE+E24yP9P7nfgw8=I updated the example and its explanation in the en, fr and zh docs.