-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(event-construction): use CustomEvent constructor #6247
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
It looks like the constructor that was used before to create custom events(e.g. KeyboardEvent) is not supported/available in all browsers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've manually confirmed that this does solve the original issue.
We will need a test to cover this change. A test that fails without this change and now passes with this change. Can you add this?
Keyboard tests can be found here: https://github.com/cypress-io/cypress/blob/develop/packages/driver/test/cypress/integration/e2e/keyboard_spec.coffee#L4:L4
To run the tests:
- within
cypress
root, runnpm i
- cd to
cypress/packages/runner
and runnpm watch
- cd to
cypress/packages/driver
and runcypress open
- click on the test you're writing to run it within Cypress
Instructions for running the driver
tests can always be found here: https://github.com/cypress-io/cypress/blob/develop/packages/driver/README.md
I don't see why we can't use the Event constructor. and notice the |
User facing changelog
Additional details
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?