Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cy.run --headed --no-exit. Exits the browser after each spec. #19485

Closed
Tracked by #4307
scarsam opened this issue Dec 27, 2021 · 7 comments · Fixed by #19567
Closed
Tracked by #4307

cy.run --headed --no-exit. Exits the browser after each spec. #19485

scarsam opened this issue Dec 27, 2021 · 7 comments · Fixed by #19567
Assignees
Labels
type: regression A bug that didn't appear until a specific Cy version release

Comments

@scarsam
Copy link

scarsam commented Dec 27, 2021

Current behavior

Trying out Cypress run with the headed and no exit option, but after each test, it still exits the test runner.

Desired behavior

With the --headed --no-exit flag I expect the test runner to not close

Test code to reproduce

I tried this with a fresh cypress installation. And ran the run command with one of the example specs included when you install Cypress.

npx cypress run --headed --no-exit --spec "cypress/integration/1-getting-started/todo.spec.js"

Cypress Version

9.2.0

Other

No response

@ScriptyChris
Copy link

I have the same issue, though for me it happens without --spec param provided.

@ScriptyChris
Copy link

I noticed that the problem does not occur on version 9.1.1. @scarsam could you try to downgrade your Cypress and check if older version will also work for you?

@ejdaly
Copy link

ejdaly commented Dec 31, 2021

v9.1.1 works for me also (v9.2.0 not working)

This also broken as a result: #4044

@emilyrohrbough emilyrohrbough added the type: regression A bug that didn't appear until a specific Cy version release label Jan 3, 2022
@mjhenkes
Copy link
Member

mjhenkes commented Jan 3, 2022

This was introduced by #18896. By adding 'exit' to the default config we elevated the exit key from being in the root options object (options.exit) to being nested in the config object (options.config.exit), preventing us from reading it in run.js. A fix could would be reading from reading the 'exit' option from config.exit instead of options.exit in the above file.

We also added defaults for keystrokeDelay and isInteractive. We should confirm they are still being read correctly as well.

@mjhenkes mjhenkes added the stage: ready for work The issue is reproducible and in scope label Jan 3, 2022
@cypress-bot cypress-bot bot added stage: backlog and removed stage: ready for work The issue is reproducible and in scope labels Jan 3, 2022
@scarsam
Copy link
Author

scarsam commented Jan 4, 2022

Thanks, @ScriptyChris and @ejdaly. Downgrading to 9.1.1 works for me now.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 6, 2022

The code for this is done in cypress-io/cypress#19567, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jan 6, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 10, 2022

Released in 9.2.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v9.2.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: regression A bug that didn't appear until a specific Cy version release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants