Closed jazpearson closed 11 months ago
Also have same issue -- occurred after setting e2e.testIsolation
to false
.
Looking at the source code compared to the dist code, I don't see an immediate problem. My guess based on the error is the this
keyword not being defined in a specific context. It passed tests, meaning the non-transformed code passed.
Is this error while running Chrome, Firefox, or Electron?
The error reported was originally in Chrome, but i tested in Firefox and Electron was able to reproduce there, too.
I'm getting the same error - I patched the lib locally with the following change and no more errors:
// type: this.get('prev').get('chainerId') === this.get('chainerId') ? 'child' : 'parent',
type: this.get('prev') && this.get('prev').get('chainerId') === this.get('chainerId') ? 'child' : 'parent',
I'm hitting this issue also, after upgrading to Cypress 12.3.0, and setting testIsolation to false (patching the lib locally like Matt suggested above in 'testing-library/cypress/dist/index.js:41:1' did address the error)
Having the same issues here! If anyone has a workaround that they can share, I'd appreciate it.
Updating, downgrading version to 8.0.0
solved my problem
Also running into this same issue when upgrading to 9.0.0
I'm busy adding "cypress/testing-library" to an existing project and I've run into this issue too. Things work fine inside a single it
test function, but as soon as I have a second it
, I get this error.
Using:
testing-library/cypress
version 9.0.0
cypress
version 12.7.1
It's been fixed on cypress-testing-library v10.0.1 :tada: https://github.com/testing-library/cypress-testing-library/releases/tag/v10.0.1
@jazpearson We can close this issue!
I'm not entirely sure how to report this will enough since i'm under NDA, but i was on the latest v8 and just upgraded to the latest (9.0.0). Cypress version is 12.1.0. Everything working as expected with v8, but i noticed v9 was out and supported Cypress v12, so thought i'd give it a go and i just wanted to report the issues in case it helps. I'm sorry that i can't give anything reproducible just yet, but if i get chance, i will.
This is a FANTASTIC library by the way.
Possibly an important point is that we are using
{ testIsolation: false }
in our tests?cypress-testing-library
version: 9.0.0node
version: 16.17.0npm
(oryarn
) version: 8.15.0Relevant code or config
Examples that seem to be an issue have included these two commands. That doesn't mean that each time we call the commands they fail. It looks like they work ok in one test, but then in a following test (part of the same test suite) and not in isolation, the same call errors, as shown in the screenshot.
and our tests are scaffolded like this
What you did:
Upgraded to the latest version of the library
What happened:
Reproduction repository:
Problem description:
Suggested solution: