abramenal / cypress-shadow-dom

Extend Cypress commands with shadow DOM support
https://npm.im/cypress-shadow-dom
MIT License
49 stars 8 forks source link

fix(shadowType): dispatch input events #43

Closed gregfagan closed 4 years ago

gregfagan commented 4 years ago

Change the event dispatching of shadowType so that it sends input for each keystroke and change upon completion. Quoting MDN:

The input event is fired every time the value of the element changes. This is unlike the change event, which only fires when the value is committed, such as by pressing the enter key, selecting a value from a list of options, and the like.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event

Fixes an issue where a shadow DOM input element rendered by Preact was not updating its state.