ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

ember testing method fillIn fires only change event on input fields, events like keyup does not fire

Open abousamra opened this issue 12 years ago • 3 comments

keyup should be added to be fired at fillin method or find a better way and make it totally dynamic by firing any event associated with this input field

abousamra avatar Sep 30 '14 08:09 abousamra

@abousamra I think this is less trivial than you would like it to be.

What keyCode do we use? Do we fire an event for each character in the string passed to fillIn? Do we fire key codes for shift before a caps letter?

I believe keeping the fillIn helper simpler is a better direction- but we should have a recommended and documented pattern for firing keyUp events. And document it in the guides.

mixonic avatar Sep 30 '14 14:09 mixonic

@mixonic keyUp event listens for any key event.

I believe we can have the option to specify the event type or the key pattern to the fillin or somehow something around this. I am not sure from the best way to do this but we should have at least support for the different events types supported in input fields.

abousamra avatar Oct 07 '14 21:10 abousamra

@abousamra my concern is not about the listeners firing, it is about what data to pass in the event object.

For reference, this is the implementation of fillIn

And above it is keyEvent, which might be what you want to use for single key events.

I'm going to close this general issue, but it is safe to say that we would welcome specific suggestions on what else could be done with fillIn.

mixonic avatar Oct 13 '14 21:10 mixonic