I'd like to write a Cypress test to verify that pressing ctrl-z (or cmd on a Mac but ignoring that for now) in an <input> text undoes the previously-typed text. For example:
cy.get('input')
.type('abc')
.should('have.value', 'abc')
.type('{ctrl+z}')
.should('have.value', '');
However, the .type('{ctrl+z}') doesn't actually seem to trigger the undo. This surprised me because I was able to trigger a custom keydown EventListener with the same .type('{ctrl+z}').
I know Cypress doesn't support keyboard shortcuts for copying/pasting, and I'm wondering if I'm running up against a limitation here.
I get that it's usually unnecessary to check something like this, which is default browser behavior and should work. But in my case, I want to make sure that my global ctrl-z listener isn't preventing the default undo behavior from firing.