Closed khteh closed 5 months ago
Hey there, are you sure you followed the upgrade guides while migrating from Cypress AE v4 to latest v5?
Both of these:
This seems a problem due to misconfiguration / poorly upgraded environment, as this problems isn't present into new installations AFAIK
Are you able to provide specifics of what I might miss? There are a lot to check.....
I honestly have no idea, have you tried generating a new project with latest Cypress AE and comparing the Cypress configuration files?
I made some progress. However, even starting with a fresh new quasar project installing the AE hits the following error:
$ n test
> quasar-project@0.0.1 test
> jest
FAIL src/components/__tests__/VModelComponent.cy.ts
● Test suite failed to run
ReferenceError: Cypress is not defined
> 1 | import { vModelAdapter } from '@quasar/quasar-app-extension-testing-e2e-cypress';
| ^
2 | import { ref } from 'vue';
3 | import VModelComponent from '../VModelComponent.vue';
4 |
at setupHooks (node_modules/cypress/vue/dist/cypress-vue.cjs.js:93:5)
at Object.<anonymous> (node_modules/cypress/vue/dist/cypress-vue.cjs.js:8583:1)
at Object.<anonymous> (node_modules/@quasar/quasar-app-extension-testing-e2e-cypress/src/helpers/install-quasar-plugin.ts:1:1)
at Object.<anonymous> (node_modules/@quasar/quasar-app-extension-testing-e2e-cypress/src/helpers/main.ts:3:1)
at Object.<anonymous> (src/components/__tests__/VModelComponent.cy.ts:1:1)
Are you're running Cypress tests with... Jest? How did you even manage to do that?
The scaffolding for Jest AE and Cypress AE are optimized to avoid mixing the 2 testing framework
As stated by the docs, these are the commands you should use to run Cypress tests
Software version
OS: Ubuntu 23.10 Node: v21.5.0 NPM: 10.3.0 Any other software related to your bug:
What did you get as the error?
What were you expecting?
No error running
npm test
What steps did you take, to get the error?
Upgrade my quasar application to the latest libraries and ecosystem (https://github.com/quasarframework/quasar-testing/tree/dev/packages/unit-jest#upgrade-from-jest-ae-v2--quasar-v1) and run
npm test