The click-dismiss and click-action are the emitted events from the component, and the clickDismiss and clickAction are those defined in the argTypes.
The issue is that when I run my unit testes using composeStories I got some warns in the terminal. They don't make the test fail, though I don't think that this is expected. The warns are:
[Vue warn]: Property or method "clickDismiss" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
console.error node_modules/vue/dist/vue.common.dev.js:630
[Vue warn]: Property or method "clickAction" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
console.error node_modules/vue/dist/vue.common.dev.js:630
[Vue warn]: Invalid handler for event "click-dismiss": got undefined
console.error node_modules/vue/dist/vue.common.dev.js:630
[Vue warn]: Invalid handler for event "click-action": got undefined
I think that It can be related to the way components are rendered from the stories.
Steps to reproduce the behavior
Create component docs with actions as events
Run a unit test of this component with composeStories
Describe the bug
I have a story with some actions defined in argTypes:
I also have those actions defined in my template:
The click-dismiss and click-action are the emitted events from the component, and the clickDismiss and clickAction are those defined in the argTypes.
The issue is that when I run my unit testes using composeStories I got some warns in the terminal. They don't make the test fail, though I don't think that this is expected. The warns are:
I think that It can be related to the way components are rendered from the stories.
Steps to reproduce the behavior
Expected behavior
It shouldn't show those warns.
Environment