Skip to content

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

@DawidJanczak

Description

@DawidJanczak
  • cypress-testing-library version: 10.0.1
  • node version: 18.12.0
  • npm (or yarn) version: 1.22.19

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions