Migration to Cypress 10 causes tests to fail after the fact
See original GitHub issueCurrent Behavior
Using my existing project, with Cypress 9.7.0 has the test files called app.spec.ts. Running the nx g @nrwl/cypress:migrate-to-cypress-10
completes successfully. Attempting to run the tests however, errors out with:
Can't run because no spec files were found.
We searched for specs matching this glob pattern:
> ui-e2e\src\e2e\**\*.cy.{js,jsx,ts,tsx}
The issue is the test files are still called *.spec.ts
, while the new Cypress configuration is looking for *.cy.ts
. The pathing has also changed to require the test files in an e2e subdirectory (src/e2e/
instead of src/
).
Expected Behavior
The configuration should support the *.spec.ts
file specifications, or renaming the test files in the project accordingly including the new path change.
Steps to Reproduce
Take a project with the Cypress 9.7.x, and then run the nx g @nrwl/cypress:migrate-to-cypress-10
. When this is done, try to run the e2e test nx e2e ui-e2e
and the error will occur.
Failure Logs
Environment
Node : 18.5.0 OS : win32 x64 npm : 8.12.1
nx : 14.5.10 @nrwl/angular : 14.5.10 @nrwl/cypress : 14.5.10 @nrwl/detox : Not Found @nrwl/devkit : 14.5.10 @nrwl/eslint-plugin-nx : 14.5.10 @nrwl/express : Not Found @nrwl/jest : 14.5.10 @nrwl/js : 14.5.10 @nrwl/linter : 14.5.10 @nrwl/nest : 14.5.10 @nrwl/next : Not Found @nrwl/node : 14.5.10 @nrwl/nx-cloud : Not Found @nrwl/nx-plugin : Not Found @nrwl/react : Not Found @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : 14.5.10 @nrwl/web : 14.5.10 @nrwl/workspace : 14.5.10 typescript : 4.7.4
Local workspace plugins:
Community plugins: @jscutlery/semver: 2.26.0
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top GitHub Comments
thanks for the pointing out the trouble areas @robinpellegrims have a PR to address this issue.
I have emptied out the application, and have a basic environment available to show the issue on GitHub
Using the
nx e2e timesheet-ui-e2e
will run the tests and pass. Run thenx generate @nrwl/cypress:migrate-to-cypress-10
and the process finishes. Run the e2e test again, and you will see the failure.