How do I retrieve the button text from a found element in vue-test-utils
? I am using v1.0.0-beta.10
For example, in my vue file I have a button like:
el-button(@click.native="cancel",
size="small",
native-type="button") Cancel
Then in my tests:
const button = wrapper.findAll({
name: "el-button"
})
console.log('buttonAll is', button.at(2).vnode.$attrs) // {}
I get an empty object. Even better, how can I directly query that Vue component based on button text?