Cypress: Chainer descendants not found

Created on 13 Sep 2017  路  8Comments  路  Source: cypress-io/cypress

Is this a Feature or Bug?

Bug

Current behavior:

Spits out error

CypressError: The chainer: 'descendants' was not found. Could not build assertion.

How to reproduce:

Add a spec with:

.should("have.descendants", ".some-selector")

Test code:

.should("have.descendants", ".some-selector")
bug

Most helpful comment

We rewrote chai-jquery in 0.20.0 and during that time we misspelled the word. It works right now as descendents but we'll update this to the proper spelling and get it out in the next patch release.

Perhaps we could do a levenshtein check to do the "Did you mean '...' suggestion

All 8 comments

Hopefully this is enough information for you guys! Seems to be broken in version 0.20.0.

I believe this is due to a typo. The chainer is spelled 'descendents' with all vowels being 'e's. The error could definitely be more helpful though.

Ah! Thanks! By the way, the documentation currently states this, I guess this should also be updated there 馃槂

screen shot 2017-09-13 at 14 51 15

See -> https://docs.cypress.io/guides/references/assertions.html#Chai-jQuery

Before I forget: this used to work in version 0.19.x

We rewrote chai-jquery in 0.20.0 and during that time we misspelled the word. It works right now as descendents but we'll update this to the proper spelling and get it out in the next patch release.

Perhaps we could do a levenshtein check to do the "Did you mean '...' suggestion

The code for this is merged, but it has not been released yet.

Fixed in 0.20.1.

Was this page helpful?
0 / 5 - 0 ratings