Skip to content

Add unsafe-to-chain-command exception for cy.wait command when used with alias. #131

@patrickcate

Description

@patrickcate

As mentioned in #127 (comment), one exception to the unsafe-to-chain-command rule is cy.wait when used with an alias:

// Example: assert status from cy.intercept() before proceeding
cy.wait('@alias').its('response.statusCode').should('eq', 200)

Currently the unsafe-to-chain-command is turned off for all cy.wait commands. Instead it would be most useful if the rule was applied for cy.wait commands unless they as used with an alias.

Example:

// BAD
cy.wait(5000);

// GOOD
cy.wait('@alias');

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions