Skip to content

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

Closed
@peterkrieg

Description

@peterkrieg

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions