Open MikeMcC399 opened 1 year ago
Maybe related: https://github.com/cypress-io/cypress/issues/22777
@lmiller1990
Related:
The repo https://github.com/MikeMcC399/github-action reliably reproduces the issue (see original post), so hopefully you will be able to dig into this successfully.
Current behavior
If Cypress is launched with
after component testing dependencies have been installed and Cypress has not yet been set up for component testing then the dependencies may not always be detected.
(See Component Testing > Getting Started Open Cypress which specifically mentions
--component
as an option at this point.)Using the CLI option
--component
by-passes the launchpad. If this option is omitted and Component Testing is selected manually in the launchpad, then the dependencies are correctly detected.The issue affects some monorepo sub-directories.
Desired behavior
During Cypress component testing setup, when component testing dependencies have been installed, then dependencies should be reliably detected when Cypress is launched with
Test code to reproduce
Note that the Cypress app opens and requests a framework to be picked although a framework is already installed.
Close the Cypress app and restart with
Select "Component Testing" and note that now "React.js" and "Vite" are detected.
Cypress Version
First reported on version:
12.17.2
Continues to be reproducible on version:13.15.2
Node version
18.17.0
&v20.17.0
Operating System
Ubuntu
22.04.3
LTS (also reproducible on Windows 11)Debug Logs
zipped to
npx cypress open --component
npx cypress open
Other
Workaround
Initialize
git
in the monorepo sub-directory to prevent Cypress traversing upwards in the git hierarchy: