-
Notifications
You must be signed in to change notification settings - Fork 668
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
Issue with Vue config keyCode aliases and triggering keydown events #1295
Comments
This seems to be working with me.
I also noticed that supplying key code doesn't work. |
@aholzner thanks for the comment! I modified my tests to to match how you triggered the keydown event and my tests are now passing, which is great! I guess the issue only manifests when using the vue-test-utils key aliases vs specifying the key in the event options. |
@tbcorr Awesome! 👍 |
I am still running into this issue in Can we consider re-opening this issue? Thanks! |
I simplified the example to just the As you will see I have tried |
Use "key" instead |
@dobromir-hristov ahhhh okay, I still think it may make sense to re-open this issue as it seems like |
Version
1.0.0-beta.29
Reproduction link
https://github.com/tbcorr/vue-test-utils-issue
Steps to reproduce
Run the unit tests and look at the failing tests.
What is expected?
I would expect keydown event handlers bound to specific keyCode aliases would only be called when the specific key is pressed.
What is actually happening?
It appears that keydown event handlers bound to keydown events with custom keyCode aliases are being called for all keydown events, regardless of the key which triggered the event.
I'm not sure if this is only related to triggering keydown events. It just so happens I noticed this issue while testing keydown events. I'm also not sure if this is only related to the keys I was testing which are Home, End, Page Up, Page Down. Also, in browser I get the expected behavior which makes me think this is related to vue-test-utils.
The text was updated successfully, but these errors were encountered: