testing-library / cypress-testing-library

🐅 Simple and complete custom Cypress commands and utilities that encourage good testing practices.
http://npm.im/@testing-library/cypress
MIT License
1.8k stars 152 forks source link

cy.findByText doesn't work on Cypress 13.6.4 in some situations #273

Open DawidJanczak opened 6 months ago

DawidJanczak commented 6 months ago

Relevant code or config

cy.findByText('some text').should('exist')

What you did:

Ran the snippet above

What happened:

Running the above crashes with

TypeError: Cannot set property message of  which has only a getter
  at $Cy.eval (webpack://cypress-deps/./node_modules/@testing-library/cypress/dist/index.js:51:0)

This happens consistently on Cypress 13.6.4, works fine on Cypress 13.6.3. Furthermore it only happens in one spec - we use it in other places and it works just fine there.

I'm not really sure what this error means, would appreciate some help.

Reproduction repository:

Problem description:

Suggested solution:

DawidJanczak commented 6 months ago

This may have been a regression in 13.6.4 because things work fine in 13.6.5 it seems, closing this.

DawidJanczak commented 5 months ago

This still happens so I'm reopening. The problem is that it happens very sporadically.