1.0.0-beta.29
https://github.com/alexanderstudte/propsdatatest
run the unit test as is -> test fails.
add empty <div> around the <Panel> in HelloWorld.vue and run the test again -> test successful
I should be able to test the props from the child component if it is root
I need to add an element around the child for it to be no longer root.
It's also failing for me and adding a wrapping div to the component is also making the test pass. In my case, I have a presenter component inside a wrapper component. The wrapper component is listening to the events sent by the presenter component. I'm able to test that the event has been triggered, but the methods bound to the event are never called.
Came across this issue today also, the workaround I am using is to access the children.
expect(wrapper.find('some-stub-name').vm.$children[0].$props.somepropname).toStrictEqual(somepropvalue);
I am also facing the same issue and actually I observed one more thing that when I am using wrapper.props() method it gives the component's(the one which I am writing test cases of) props and when I usewrapper.attribues() I get the props of the root child component.
Most helpful comment
Came across this issue today also, the workaround I am using is to access the children.