-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
type: regressionA bug that didn't appear until a specific Cy version releaseA bug that didn't appear until a specific Cy version release
Description
Current behavior:
After upgrading from Cypress 3.3.2 to 3.4.0, we now receive CypressError when attempting to use chai-jquery's ".and" chainer. It reports the following.
CypressError: Timed out retrying: Cannot read property 'have' of undefined
Here is what my test case looks like (from the and-chainer-undefined
branch of the https://github.com/proknow/cypress-test-tiny repo).
describe('page', () => {
it('should', () => {
cy.visit('https://docs.cypress.io');
cy.get('nav#main-nav').should(($nav) => {
var node = $nav[0];
var guides = node.querySelector('ul li:first-child a');
var $guides = Cypress.$(guides);
// Both of these assertions work in Cypress v3.3.2 and fail in Cypress v3.4.0
expect(guides).to.be.visible.and.have.class('active');
expect($guides).to.be.visible.and.have.class('active');
});
});
})
Desired behavior:
I would like the behavior of the ".and" chainer to function as it did in version 3.3.2 of Cypress.
Steps to reproduce: (app code and test code)
Please clone the and-chainer-undefined
branch of https://github.com/proknow/cypress-test-tiny. To reproduce:
- Run
npm install
. - Run
npx cypress open
and run thespec.js
integration script.
To see the behavior in 3.3.2:
- Change
package.json
to use 3.3.2 for Cypress. - Run
npm install
. - Run
npx cypress open
and run thespec.js
integration script.
Versions
Cypress: 3.4.0
OS: macOS 10.14.5 (18F132)
Browser: Chrome 75.0.3770.142
Metadata
Metadata
Assignees
Labels
type: regressionA bug that didn't appear until a specific Cy version releaseA bug that didn't appear until a specific Cy version release