cypress-documentation icon indicating copy to clipboard operation
cypress-documentation copied to clipboard

Update `ensure*` references in Custom Queries documentation

Open NoelDeMartin opened this issue 2 years ago • 1 comments

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:

NoelDeMartin avatar Jun 16 '23 16:06 NoelDeMartin

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.

jkjustjoshing avatar Feb 01 '24 22:02 jkjustjoshing