-
Notifications
You must be signed in to change notification settings - Fork 112
fireEvent click on disabled button fired #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, Just ran it locally and it passes, as expected. Maybe your test is failing due to something else? |
Closing as this doesn't look like a library issue. Feel free to reopen if it's not the case! :) |
I am currently dealing with this issue. |
const Component = {
template: `<button :disabled="disabled" @click="handleClick">Click Me</button>`,
props: ['disabled'],
methods: {
handleClick() {
this.$emit('save')
},
},
}
const { getByText, emitted, debug } = render(Component, {
props: {
disabled: true,
},
})
const saveButton = getByText('Click Me')
await fireEvent.click(saveButton)
expect(emitted('save').length).toBe(0) |
The test is failing |
Hi, this is expected (albeit counterintuitive): testing-library/dom-testing-library#217 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: