`pause()` should not be ignored with `cypress run --headed --no-exit`
See original GitHub issueCurrent behavior:
cy.pause()
is ignored when specs are run with cypress run
Notice that I have cy.pause()
in the code to the left, but the test on the run hasn’t paused
Desired behavior:
I’d want the test to actually pause. Or make it really clear in the documentation that pause()
is only working when you use cypress open
This is what it looks like when I use cypress open
. I want the same behavior when I run with cypress run
Steps to reproduce: (app code and test code)
Add cy.pause()
to any test, run it with cypress run
, observe that the test is not paused.
Versions
Win 10 Electron (included with cypress) Cypress 3.2.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:30 (9 by maintainers)
Top Results From Across the Web
cy.pause() now pauses test while running cypress run --headed
cy.pause() will not be ignored and pause a test when --headed and --no-exit flags are passed to cypress run.
Read more >pause - Cypress Documentation
.pause() is a utility command. ·.pause() will not run assertions. Assertions will pass through as if this command did not exist.
Read more >cy.pause() now pauses test while running cypress run --headed
We use it at work. In some cases it's cool. My biggest peeve is that they don't use JavaScript in it's true form....
Read more >Saeloun on Twitter: ". @Cypress_io 8.6.0 cy.pause() now pauses ...
cy.pause() will not be ignored and pause a test when --headed and --no-exit flags are passed to cypress run.
Read more >Cypress chrome not pausing at debugger statement
I think I've managed to solve the issue you're having. Rather than using debugger , you can use cy.debug() . But for it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, this does seem like a valid use case though, I believe the
cy.pause()
should work as normal when running with--headed --no-exit
flags.My use case is that I need to debug why a test is failing only in
cypress run
and notcypress open
. I tried the solution offered by @Konstruktour butcypress run
apparently doesn’t take that config option anymore.