-
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
chore: add types to screenshots #22768
Conversation
Thanks for taking the time to open a PR!
|
7163ce7
to
5143ee5
Compare
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
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.
Cool, looks good, glad to see we are increasing usage of TS (although some parts of Cypress are not very TS friendly, heh).
// Window.Event is private and also deprecated. See https://developer.mozilla.org/en-US/docs/Web/API/Window/event. | ||
// @ts-ignore | ||
win.dispatchEvent(new win.Event('scroll')) |
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 believe the link you referenced is for window.event
not the Event
interface.
// Window.Event is private and also deprecated. See https://developer.mozilla.org/en-US/docs/Web/API/Window/event. | |
// @ts-ignore | |
win.dispatchEvent(new win.Event('scroll')) | |
win.dispatchEvent(new Event('scroll')) |
or you can add Event
to:
interface Window { |
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.
User facing changelog
N/A
Additional details
Goal of this PR is to act as a chore to make the types within the screenshot code a bit more accurate
Steps to test
N/A
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?