cypress-documentation
cypress-documentation copied to clipboard
Update `ensure*` references in Custom Queries documentation
Subject
API
Description
It seems like the usage of ensure* methods documented in Custom Queries has changed to Cypress.ensure.*, as seen in https://github.com/cypress-io/cypress/pull/24697.
I would open a PR fixing this myself, but I'm not entirely sure if that's the correct approach, so I just opened an issue, sorry :sweat_smile:
I just spent 45 minutes trying to figure out why a cy.ensure* method didn't exist ("it's RIGHT THERE in the documentation!" I said to myself). Then another 20 minutes trying to find which version it was released in (I'm on Cypress v13.6), when I finally found this line in the v12.0.0 changelog
Added a new Cypress.ensure API which provides several methods that can be helpful when writing customs commands. Addressed in #24697.
Diving into PR #24697, it turns out that cy.ensure* was deleted, but Cypress.ensure.* is now a thing. This updated documentation would have been a big time saver for me today.