Closed jmetterrothan closed 1 year ago
@bahmutov @jennifer-shehane sorry for the missing example but this problem is problematic. This problem is probably caused by the no-native element type of our web component. Cypress don't find the right event to use for. Could you add an option to force the event to trigger? Something like that:
cy.get('...').shadow().find('textarea')
.type('example{enter}', {
event: 'input',
// or
forceEvent: 'input',
});
Was this solved with with version 9.1.1? https://docs.cypress.io/guides/references/changelog#9-1-1
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
This issue has been closed due to inactivity.
Current behavior
With React Unit Testing, when we spy the
input
event of a textarea inside the shadow DOM of a Web Component, we expect to have our function called when we type usingBut no event is triggered using the native
type
method.Until recently, we used cypress-shadow-dom. So we tried to reproduce the test mentioned above with the custom
shadowType
command and it did work fine. It seems the issue is only related to the newly introduced shadow feature.The target element for the mouse events is ok, but not for the keyboard events (which is
null
).Desired behavior
We would like to have a native
input
event triggered when we use the methodtype
inside a web component (shadow DOM).Test code to reproduce
I'm not able to provide an example since the source code is confidential and I do not have time to set up a proper test.
Versions
Cypress : 5.2.0 Cypress Shadow DOM 1.4.1