We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Using vue3, vue-test-utils and vitest, checking for component visibility with isVisible does not work as it is always true.
To Reproduce Component under test :
<template> <span class="one" >LABEL NOT DISPLAYED</span> <span class="two" >LABEL ALWAYS DISPLAYED</span> </template> <style lang="scss"> .one{ visibility: hidden; } </style>
Test File:
const wrapper = mount(Component, { props:{...}, attachTo: document.body }) expect(wrapper.text()).toEqual("LABEL ALWAYS DISPLAYED") // Return false as both span are rendered : "LABEL NOT DISPLAYEDLABEL ALWAYS DISPLAYED"
using wrapper.find(".one").isVisible() return true as well
wrapper.find(".one").isVisible()
Expected behavior wrapper.find(".one") should not be found and Wrapper.text() should return only : LABEL ALWAYS DISPLAYED
wrapper.find(".one")
LABEL ALWAYS DISPLAYED
Related information:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Using vue3, vue-test-utils and vitest, checking for component visibility with isVisible does not work as it is always true.
To Reproduce
Component under test :
Test File:
using
wrapper.find(".one").isVisible()
return true as wellExpected behavior
wrapper.find(".one")
should not be found and Wrapper.text() should return only :LABEL ALWAYS DISPLAYED
Related information:
The text was updated successfully, but these errors were encountered: