question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`pause()` should not be ignored with `cypress run --headed --no-exit`

See original GitHub issue

Current behavior:

cy.pause() is ignored when specs are run with cypress run

image

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

image

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:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:30 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
jennifer-shehanecommented, Apr 29, 2019

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.

3reactions
diminutivesloopcommented, Mar 4, 2021

My use case is that I need to debug why a test is failing only in cypress run and not cypress open. I tried the solution offered by @Konstruktour but cypress run apparently doesn’t take that config option anymore.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found