Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Nested' assertions not working in 3.4.1 #5004

Closed
hannaofsweden opened this issue Aug 19, 2019 · 3 comments
Closed

'Nested' assertions not working in 3.4.1 #5004

hannaofsweden opened this issue Aug 19, 2019 · 3 comments

Comments

@hannaofsweden
Copy link

hannaofsweden commented Aug 19, 2019

Current behavior:
According to the documentation this should work:

expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]')

(Or cy.something().should('have.nested.property, 'a.b[1]') )

However if you do that you will get:

TypeError: Cannot read property 'property' of undefined

Desired behavior:

Nested assertions should work as specified in the documentation.

Versions
Cypress: 3.4.1
Chrome: 74
Electron: 61

@cypress-bot cypress-bot bot added the stage: investigating Someone from Cypress is looking into this label Oct 11, 2019
@jennifer-shehane jennifer-shehane added stage: pending release and removed stage: investigating Someone from Cypress is looking into this labels Oct 11, 2019
@jennifer-shehane
Copy link
Member

The nested was introduced in Chai 4.0.0. Cypress is currently using Chai 3.5.0.

This will be fixed in our breaking Cypress v4 release - I will be closing this issue as 'pending release' since the code for this is done, but has yet to be released.

@jennifer-shehane
Copy link
Member

I've confirmed that this works in upcoming 4.0 release. The code for this is done, but this has yet to be released. We'll update this issue and reference the changelog when it's released.

Screen Shot 2020-01-29 at 3 47 50 PM

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 6, 2020

Released in 4.0.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.0.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants