You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hello component is not be rendered because of v-if="false", therefore the wrapper.find(Hello).exists() should return false. Furthermore wrapper.findAll(Hello).length should be 0.
What is actually happening?
wrapper.find(Hello).exists() returns true and wrapper.findAll(Hello).length returns 2. Furthermore the HTML of the Hello component is the same as the HTML of the wrapper. Whereas wrapper !== wrapper.find(Hello).
When using wrapper.find('.hello-message') the expect method returns false and findAll() did not find any Hello component as expected.
For me it seems to be a bug of the find(Component) method when using mount(). If I use shallowMount() the find method will work as expected.
The issue can also be reproduced using vue-test-utils 1.0.0-beta.13.
The text was updated successfully, but these errors were encountered:
Version
1.0.0-beta.20
Reproduction link
https://github.com/BeniRupp/vue-test-utils-getting-started
Steps to reproduce
Run the tests using
npm test
.What is expected?
The
hello
component is not be rendered because ofv-if="false"
, therefore thewrapper.find(Hello).exists()
should returnfalse
. Furthermorewrapper.findAll(Hello).length
should be0
.What is actually happening?
wrapper.find(Hello).exists()
returnstrue
andwrapper.findAll(Hello).length
returns2
. Furthermore the HTML of theHello
component is the same as the HTML of the wrapper. Whereaswrapper !== wrapper.find(Hello)
.When using
wrapper.find('.hello-message')
theexpect
method returnsfalse
andfindAll()
did not find anyHello
component as expected.For me it seems to be a bug of the
find(Component)
method when usingmount()
. If I useshallowMount()
thefind
method will work as expected.The issue can also be reproduced using vue-test-utils
1.0.0-beta.13
.The text was updated successfully, but these errors were encountered: