-
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 for Cypress.session.clearAllSavedSessions #19412
chore: add types for Cypress.session.clearAllSavedSessions #19412
Conversation
Thanks for taking the time to open a PR!
|
cli/types/cypress.d.ts
Outdated
@@ -3117,6 +3122,11 @@ declare namespace Cypress { | |||
onAnyAbort(route: RouteOptions, proxy: any): void | |||
} | |||
|
|||
interface Session { | |||
clearAllSavedSessions: () => Promise<void>; |
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.
Mind adding a comment to describe clearAllSavedSessions? It helps with maintenance. You can pull something from https://docs.cypress.io/api/cypress-api/session.
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.
It mentions something like; Clear all saved sessions and re-run the current spec file.
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.
Yeah sorry, I missed that at first. :shame:
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.
No worries! It's not super obvious
…ert-with-stack * tgriesser/10.0-release/refactor-lifecycle: (50 commits) Remove unused test file update task spec to use correct projectRoot update Fix test Fix test Fix tests update tests fix test correct config path Fix TS resolve conflicts Fixing component & e2e tests build: fix dev process on windows (#19401) fix: `cy.contains()` ignores `<style>` and `<script>` without removing them. (#19424) Fix some tests chore: Fix the broken codeowners automation (#19431) chore: add types for Cypress.session.clearAllSavedSessions (#19412) fix: No unnecessary snapshotting (#19311) chore: Remove pkg/driver @ts-nocheck part 1 (#19353) fix: add CYPRESS_VERIFY_TIMEOUT param and a test for it (#19282) ...
User facing changelog
n/a
Additional details
I only added the public method that's documented, although there are other methods available.
I'm not positive I did this right. 😬 And I didn't see any type tests to modify. Is the return type of
Promise<void>
correct?How has the user experience changed?
Typescript types for
Cypress.session
should now be available.PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?