-
Notifications
You must be signed in to change notification settings - Fork 89
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
cypress/unsafe-to-chain-command errors being throw for wait with alias (v2.13.1) #127
Comments
Running into this same issue with the https://docs.cypress.io/api/commands/wait even includes examples such as: // Example: assert status from cy.intercept() before proceeding
cy.wait('@alias').its('response.statusCode').should('eq', 200) and cy.wait('@userPut').its('request.url').should('include', 'users') |
Here's a PR to solve the issue: #128 |
I just merged that PR and the build should publish the latest shortly. I am going to close this issue for the time being. Please comment back if the latest version doesn't resolve your issue. |
The PR and new release does fix the issue. Rather than not applying the rule to any |
Hi @patrickcate , Can you open a new feature request for that please? |
With the latest version of eslint-plugin-cypress, version 2.13.1, cypress/unsafe-to-chain-command lint errors appear to be getting thrown for wait commands that chain commands from it, when wait is given an alias argument.
Based on the Cypress docs here, it is unsafe to chain further commands that rely on the subject after .wait(), when given a time argument. However, it doesn't say it is unsafe when given an alias argument, as that would be used to wait and return a response from a request, for use in the test.
Based on the above, should the cypress/unsafe-to-chain-command not be getting applied to wait commands with alias arguments?
The text was updated successfully, but these errors were encountered: