cypress: "--spec" option does not run a single spec but runs all specs in ./integrations directory
Current behavior:
Runs all tests in ./integration/ directory
Desired behavior:
Run single test when using --spec for cypress run command
How to reproduce:
run cypress run --spec cypress/integration/**/*_spec.js
Additional Info (images, stack traces, etc)
- Operating System: Mac OS X
- Cypress Version: 1.4.1
- Browser Version: Chrome 63, Electron 53
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 26 (7 by maintainers)
The code for this is done, but this has yet to be released. We’ll update this issue and reference the changelog when it’s released.
@willischu Finally it worked …thank you so much for your help. the problem was running the command from Windows powerShell , instead I used Windows CMD and it worked !
One more challenge: when I run --headed I still don’t see any browser launched , I thought with --headed it will run the script on the browser and I can actually see what it does.
after it finish it generates a video recording but the video has nothing
@nadim1975 well it looks like the ‘–spec’ argument isn’t even being passed when you run that full command. i’m not sure if it’s a Windows thing but on my terminal, the output i get after running that command is
cypress run "--spec" "cypress/integration/*_spec.js"It is “npm run cypress:run — —spec …” syntax to pass arguments to npm script
Sent from my iPhone