Pattern: Missing use of data-*
attribute
Issue: -
Forces cy.get
to allow selectors that target data-*
attributes.
Example of incorrect code:
cy.get(".a")
cy.get('[daedta-cy=submit]').click()
cy.get('[d-cy=submit]')
cy.get(".btn-large").click()
cy.get(".btn-.large").click()
Example of correct code:
cy.get('[data-cy=submit]').click()
cy.get('[data-QA=submit]')