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

cy.focused() unsafe-to-chain-command after update #5415

Closed
1 of 6 tasks
Smuuts opened this issue Aug 9, 2023 · 2 comments
Closed
1 of 6 tasks

cy.focused() unsafe-to-chain-command after update #5415

Smuuts opened this issue Aug 9, 2023 · 2 comments

Comments

@Smuuts
Copy link

Smuuts commented Aug 9, 2023

Description

I get a unsafe-to-chain-command error on anything after cy.focused(). This started happening after a recent update.

URL of Issue(s)

https://docs.cypress.io/api/commands/focused

Steps to replicate

use cy.focused().anything() anywhere

  • part of package.json *

"cypress": "^12.13.0",
"cypress-file-upload": "^5.0.8",
"cypress-mochawesome-reporter": "^3.4.0",
"cypress-multi-reporters": "^1.6.3",
"eslint": "^8.40.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-cypress": "^2.13.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-unicorn": "^46.0.1",

Browser

No response

Device

  • PC
  • Mac
  • iPhone
  • iPad
  • Android Phone
  • Android Tablet

Additional Information

In the cy.focused() documentation (https://docs.cypress.io/api/commands/focused) it also states that:
"cy.focused() is a query, and it is safe to chain further commands."


I get the same error even when using almost the exact same examples used in the cypress documentation:
image

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Aug 9, 2023

@Smuuts

The advice there was to (at least temporarily) downgrade/pin to eslint-plugin-cypress@v2.13.4. You could for instance use

eslint-plugin-cypress@~2.13.3

to ensure that 2.14.x is not installed.

@nagash77
Copy link
Contributor

Hello @Smuuts , Thank you for opening an issue but this appears to be a duplicate. I am going to close this as a duplicate of cypress-io/eslint-plugin-cypress#140. Please follow that issue for updates.

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants