Skip to content

'Disabled' attribute on buttons is ignored during testing #395

Closed
@jamesoshea

Description

@jamesoshea

Version

1.0.0-beta.11

Reproduction link

https://github.com/jamesoshea/vue-test-utils-button-bug

Steps to reproduce

Run npm install, then npm test. The test will fail as vue-test-utils trigger a click on a disabled element, and the element's bound method is called anyway.

What is expected?

The method should not get called when the button is clicked.

What is actually happening?

When testing a vue component, I will sometimes call .trigger('click') on a wrapper containing just a button. If the button is disabled and a method is bound to its click event, the button is clicked and the method called anyway.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions