-
Notifications
You must be signed in to change notification settings - Fork 34
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
Unable to trigger shortcut event from unit tests #142
Comments
I actually never tested it, can you please provide a minimal reproduction repository where I can debug it? |
This is the correct version by the way, the clone repo was created due to lack of activity on my side, but I am back in business |
Thanks you for the quick response, im quite a novice so I couldnt quit figure out to create a reproduction enviroment from our project, so I just cloned and cleaned it. Here is the link, I also added the cloned lib ng-hotkeys in there, to show the same test works for one but not the other. Thank you for you time, I hope you can figure it out. Kinds regards, Pieter |
Dear omridevk, Do you have any update regarding this issue? Kinds regards, Pieter |
sorry, for the delay, I hope i'll find a time this weekend. |
+1, same issue, when I try to test the command callback |
Describe the bug
From the angular .spec file I'm not able to test if the shortcuts are working. Below is an example of the code. They keyboard event does not seem to be trigged.
I also ran the same test with a clone of this repo https://www.npmjs.com/package/ng-hotkeys, and there the unit test work as expected.
Did I make any mistake or am I running the wrong version?
<ng-keyboard-shortcuts [shortcuts]="shortcuts"></ng-keyboard-shortcuts>
"ng-keyboard-shortcuts": "^13.0.8",
"@angular/animations": "^13.2.4",
"@angular/cdk": "^13.2.4",
"@angular/common": "^13.2.4",
"@angular/compiler": "^13.2.4",
"@angular/core": "^13.2.4",
"@angular/forms": "^13.2.4",
"@angular/localize": "^13.2.4",
"@angular/platform-browser": "^13.2.4",
"@angular/platform-browser-dynamic": "^13.2.4",
The text was updated successfully, but these errors were encountered: