Skip to content

unsafe-to-chain-command error thrown when chaining should() command to scrollIntoView #5160

Open
@tgdevereux

Description

@tgdevereux

In the latest version of eslint-plugin-cypress, version 2.13.2, cypress/unsafe-to-chain-command lint errors appear to be getting thrown for scrollIntoView commands, when 'should' test validations are chained to the command, i.e. cy.get('button#checkout').scrollIntoView().should('be.visible')

In the Cypress docs, it lists this type of verification as correct/safe usage of the scrollIntoView command, i.e. https://github.com/cypress-io/cypress-documentation/blob/main/docs/api/actions/scrollintoview.mdx#scrolling

Is this unexpected behavior in the latest eslint-plugin-cypress version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    E2EtriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions