-
Notifications
You must be signed in to change notification settings - Fork 3
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
Dl/cypress@12 expect fix #235
Conversation
Signed-off-by: Dmitriy Lazarev <[email protected]>
Signed-off-by: Dmitriy Lazarev <[email protected]>
Signed-off-by: Dmitriy Lazarev <[email protected]>
🦋 Changeset detectedLatest commit: 4615e5b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for interactors canceled.
|
Signed-off-by: Dmitriy Lazarev <[email protected]>
packages/with-cypress/src/cypress.ts
Outdated
// NOTE: Add interaction assertion function, Cypress also overrides `expect` method to a wrapper function | ||
Cypress.Commands.overwrite('expect', interactionExpect); | ||
if ('_commands' in Cypress.Commands) { | ||
// @ts-expect-error Cypress stores a reference to commands object and use it to check overwiritability of commands |
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.
pedantic: s/overwiritability/overwritability/
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.
Thanks :)
Signed-off-by: Dmitriy Lazarev <[email protected]>
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.
Good to go! Although it looks like it's not passing on CI.
Hi @wKich! |
Signed-off-by: Dmitriy Lazarev <[email protected]>
Signed-off-by: Dmitriy Lazarev <[email protected]>
Signed-off-by: Dmitriy Lazarev <[email protected]>
@wKich Odd that this is still failing Any idea what's up? |
@cowboyd yep. It's time to fix cypress-io/cypress#22733 |
Hi @cowboyd @wKich This approach might look ugly but we will avoid any conflicts in the future. |
Signed-off-by: Dmitriy Lazarev <[email protected]>
Signed-off-by: Dmitriy Lazarev <[email protected]>
Motivation
Fix #234
Approach
It seems Cypress@12 doesn't expose
_commands
field https://github.com/cypress-io/cypress/blob/ae4cf2b553255f38ca83e14a09dd891b487e1a39/packages/driver/src/cypress/commands.ts#L45 which cause the error mentioned in #234