kentcdodds / jest-cypress-react-babel-webpack

Configure Jest for Testing JavaScript Applications and Install, Configure, and Script Cypress for JavaScript Web Applications on TestingJavaScript.com
https://testingjavascript.com
Other
512 stars 329 forks source link

Chaining Cy commands in the calculator.js file confuses 'findBy...' in Cypress #27

Closed Rehabescapi closed 4 years ago

Rehabescapi commented 4 years ago

Following from video 5. Chaining the cy commands after cy.visit will result in these following errors:

container.querySelectorAll is not a function

Timed out retrying: Expected to find element: 'findByText(/^+$/)', but never found it.

"expected { Object (selector) } to have text '3' "

Issue is resolved is the user restarts a 'cy.findBy...' when they need to select another element.

kentcdodds commented 4 years ago

Hi @Rehabescapi,

I think that this has now been resolved thanks to https://github.com/testing-library/cypress-testing-library/pull/100 (just an hour ago).

Thanks!