Closed
Description
Version
1.0.0-beta.29
Reproduction link
https://github.com/micgro42/vue-test-utils-disabled-bug
Steps to reproduce
- check out minimal reproduction repository
- run
npm install
- run
npm run test:unit
What is expected?
Test should pass, because the disabled
attribute on a link (HTML <a>
tag) is ignored by browsers and thus the component should handle the event (in this case: emit it to the parent component/wrapper)
What is actually happening?
Test fails, because wrapper.trigger() does nothing 😭.
This was caused by #424 in order to fix #395.
Unfortunately, this solution is too far-reaching. This also disables events, for example, on links with the disabled
attribute.
While that might be the desired final state, it is not something that is provided by the browser and thus needs to be programmed and asserted by tests. Just plainly disabling the wrapper.trigger method in that case prevents me from testing this.
Metadata
Metadata
Assignees
Labels
No labels