Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 421 Bytes

no-chained-get.md

File metadata and controls

19 lines (13 loc) · 421 Bytes

Disallow chain of cy.get() calls (cypress/no-chained-get)

This rule disallows the usage of chained .get() calls as cy.get() always starts its search from the cy.root element.

Rule Details

Examples of incorrect code for this rule:

cy.get('parent').get('child')

Examples of correct code for this rule:

cy.get('parent')
  .find('child')