Reputation: 5601
I had thought that keyEvent('.my input', 'keypress', 13);
would trigger the input's newline
action, but it doesn't seem to.
It seems others have had a similar problem
Is there any other/better way to trigger the newline action from my acceptance test?
Upvotes: 1
Views: 100
Reputation: 5601
Looks like triggering a keydown
then a keyup
event (instead of a keypress
) does the trick:
keyEvent('.my input', 'keydown', 13);
keyEvent('.my input', 'keyup', 13);
Upvotes: 1