-
Notifications
You must be signed in to change notification settings - Fork 91
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
fix: issue with unsafe to chain command that is not an action #141
fix: issue with unsafe to chain command that is not an action #141
Conversation
|
…fe-to-chain-command-that-is-not-action # Conflicts: # tests/lib/rules/unsafe-to-chain-command.js
any update on this? |
Any update on when this will be merged and a new release cut? |
Are you interesting in reviving this PR? It seems that it is still relevant. |
|
@MikeMcC399
|
…ommand-that-is-not-action' into fix/issue-with-unsafe-to-chain-command-that-is-not-action
Thank you for explaining and adding the extra test! I found the reference in #140 (comment) to the custom command |
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 for your submission! It passes the tests and fixes the issue from cy.focused().type("text") shows cypress/unsafe-to-chain-command error #140 🎉
Tested against
https://github.com/cypress-io/cypress-example-kitchensink
using
npm install https://github.com/gkorakas-eli/eslint-plugin-cypress#fix/issue-with-unsafe-to-chain-command-that-is-not-action
and additional test-spec
/// <reference types="cypress" />
context('eslinting', () => {
it('custom command', () => {
cy.submitBtn().click()
})
})
eslint-plugin-cypress | result | PR |
---|---|---|
2.13.4 |
no failure | |
2.14.0 |
(1)(2) | #137 |
2.15.1 |
(2) | #144 |
PR #141 | no failure | #141 |
(1) failure: cy.focused().should('have.id', 'name')
(2) failure: cy.submitBtn().click()
🎉 This PR is included in version 3.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
On version v2.14.0 it seems there is a change in the unsafe-to-chain-command rule that causes the following issue:
#140
This is probably a quick fix on this without changing the Regex used by additional methods. The test covers the case where there is a command that is not considered an action for Cypress.