Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component Tests Can't Run When Cypress Is In a Different Project Folder #16053

Closed
peterkrieg opened this issue Apr 18, 2021 · 3 comments · Fixed by #16056
Closed

Component Tests Can't Run When Cypress Is In a Different Project Folder #16053

peterkrieg opened this issue Apr 18, 2021 · 3 comments · Fixed by #16056
Assignees

Comments

@peterkrieg
Copy link

Current behavior

I have a cypress project where we have the cypress config in a different folder, so that we run cypress open --project spec/e2e. This has always worked fine with the traditional cypress e2e tests.

I tried out the component tests and encountered a bug where the cypress test runner doesn't seem able to execute the test. (screenshot below). The webpack compiles successfully, the tests are shown correctly, but clicking on a test results in the console error below 👇

Screen Shot 2021-04-18 at 10 25 49 AM

If I move the cypress config to the root folder, as is the more common case with cypress examples/docs, everything works fine. It appears to be a path resolution error.

Desired behavior

Able to run component tests inside of a different project folder.

Test code to reproduce

Minimal Repo to observe, with additional instructions in the readme: https://github.com/peterkrieg/cypress-bug-repro

Thank you for looking at this! Cypress component testing looks awesome and I can't wait to try it some more.

Versions

Cypress: 7.1.0
@cypress/webpack-dev-server: 1.1.3

@lmiller1990
Copy link
Contributor

Thanks for reporting this. I am investigating. I reproduced the issue in here and will make a fix in the same PR.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 21, 2021

The code for this is done in cypress-io/cypress#16056, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@jennifer-shehane
Copy link
Member

Released in 7.2.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v7.2.0, please open a new issue.

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants