ember-test-helpers icon indicating copy to clipboard operation
ember-test-helpers copied to clipboard

Cannot use triggerKeyEvent using key of lowercase letters

Open AbhinavVishak opened this issue 5 years ago • 1 comments

Currently there is a check to not allow lowercase keys. I presume this is for a quick sanity check for non-printable keys like Enter etc. As a workaround, I need to use the keyCode instead.

triggerKeyEvent(SELECTOR, 'keydown', 'A'); // uppercase 'A'
triggerKeyEvent(SELECTOR, 'keydown', 65); // lowercase 'a'

Is it possible to extend the method argument to allow key lowercase letters ?

AbhinavVishak avatar Feb 06 '20 17:02 AbhinavVishak

that suggestion seems reasonable to me 👍

Turbo87 avatar Feb 26 '20 10:02 Turbo87