Skip to content
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

fix: wrapper.element with nested multiple roots #1463

Merged
merged 3 commits into from May 6, 2022

Conversation

freakzlike
Copy link
Collaborator

fix #1461

wrapper.element did not return the correct element for some edge cases with multiple root nodes.
For example when using another component in template which has multiple root elements:

<template>
  <WithMultipleRoots />
</template>

This has led to issues with wrapper.text() (#1461)

I had to differ between stateful and functional components to avoid other failing tests. Maybe not all edge cases covered.

@netlify
Copy link

netlify bot commented Apr 29, 2022

Deploy Preview for vue-test-utils-docs ready!

Name Link
🔨 Latest commit fcae60f
🔍 Latest deploy log https://app.netlify.com/sites/vue-test-utils-docs/deploys/626c0e6ac127980008eef510
😎 Deploy Preview https://deploy-preview-1463--vue-test-utils-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@aethr
Copy link
Contributor

aethr commented Apr 30, 2022

Legend! 🥇

Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job figuring this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: wrapper.text() is empty for components that only render a slot
4 participants