cypresscypress-conditional-testing

After updating to cypress 12.0.0, my test is throwing an error in the cypress-if package


After updating to cypress 12.0.0, I get the following error, how can I fix it? enter image description here


Solution

  • Cypress has split commands that return elements into a "queries" category and internally implemented them differently.

    This was partly to handle "detached from DOM" errors better and more automatically.

    The official word is the Cypress.Commands.overwrite() function was left out of the new query API due to the complexity, but they will consider adding it (back?) in if there are enough use-cases presented.

    Therefore, you should contribute your use-case to the issue here if you wish to continue using cypress-if and also keep up-to-date with Cypress versions.

    Note, you can still add new commands to Cypress, and you can still overwrite some commands just not cy.get(), cy.find(), and cy.contains().