Skip to content

fix: update stop button to immediately update UI in headed no-exit mode #31991

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

alexsch01
Copy link
Contributor

Amends #31984 for --headed --no-exit mode

@cypress-app-bot
Copy link
Collaborator

@alexsch01
Copy link
Contributor Author

@@ -1939,9 +1939,11 @@ export default {

_runner.stopped = true

// if we are in open mode, abort the run immediately
const isHeadedNoExit = Cypress.config('browser').isHeaded && !Cypress.config('exit')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe exit is stored in Cypress.config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It exists in the above code:

const isHeadedNoExit = Cypress.config('browser').isHeaded && !Cypress.config('exit')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately, that's probably wrong too then

Copy link
Contributor Author

@alexsch01 alexsch01 Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it detects isHeadedNoExit correctly, I tested the change myself

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess is Cypress.config('exit') returns undefined so that expression evaluates to true. But if you don't pass in --no-exit that would also evaluate to true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the type for Cypress.config('exit') seems to exist, no type error within that file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typing hasn't been fully completed in runner.ts yet so Cypress is any.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mschile YEP, isHeadedNoExit gives true in both cases
line 529 should be investigated #31991 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants