Skip to content
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

waitForAnimations is not a valid option for .click TS type #8854

Closed
mariotsi opened this issue Oct 15, 2020 · 7 comments · Fixed by #8837
Closed

waitForAnimations is not a valid option for .click TS type #8854

mariotsi opened this issue Oct 15, 2020 · 7 comments · Fixed by #8837
Labels
type: typings Issue related to Cypress types (for TypeScript)

Comments

@mariotsi
Copy link

Current behavior

cy.get('body').click({ waitForAnimations: false }) gets TS error because waitForAnimations is not a valid option on the Type even if is a suggested command https://docs.cypress.io/guides/references/error-messages.html#cy-failed-because-the-element-is-currently-animating

Desired behavior

cy.get('body').click({ waitForAnimations: false }) will not throw TS error

Versions

5.3.0 MacOS

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Oct 16, 2020

Yah, I can see how this error message is very confusing. This should be updated. You're meant to pass the waitForAnimations or animationDistanceThreshold options to your Cypress configuration - not within the command itself.

Disregard - this is accurate.

@jennifer-shehane
Copy link
Member

Oh actually I see this waitForAnimations should work when passed to cy.click() but is not documented at all in the click document: https://on.cypress.io/click#Arguments

This is likely why the types don't reflect reality.

@lukeapage
Copy link
Contributor

I noticed this and fixed it already in #8837

@jennifer-shehane
Copy link
Member

Nice.

@mariotsi
Copy link
Author

Thank you very much

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Nov 30, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 30, 2020

The code for this is done in cypress-io/cypress#8837, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 7, 2020

Released in 6.1.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.1.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: typings Issue related to Cypress types (for TypeScript)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants