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

Cypress does not retry tests after a hot reload #28917

Closed
shennan opened this issue Feb 11, 2024 · 2 comments
Closed

Cypress does not retry tests after a hot reload #28917

shennan opened this issue Feb 11, 2024 · 2 comments

Comments

@shennan
Copy link

shennan commented Feb 11, 2024

Current behavior

Running the specs in Cypress's Chrome test runner, when I make changes to a spec file and save, Cypress acknowledges the save by dumping the current test results, white-screening the preview area and moving to the first test in the current spec; but does not run the tests again. I need to press the "Stop Running (S)" button at the top of the spec sheet and then the "Run All Tests (R)" button before all tests are run again.

If I don't press these buttons then it stays like the below image, with a continuously animated loading sprite next to the first test:

Screenshot 2024-02-11 at 10 38 40

It will do this indefinitely until further actual is taken.

Desired behavior

The tests are simply re-run once a file has changed. Or, at least, the test runner is put in a "stopped" state such that only one button click is needed to restart.

Test code to reproduce

Works on any tests. My config:

export default defineConfig({
  watchForFileChanges: true,
  e2e: {
    /** nothing **/
  }
})

Cypress Version

13.6.4

Node version

16.19.1

Operating System

macOS Ventura 13.1

Debug Logs

No response

Other

No response

@mszkb
Copy link

mszkb commented Feb 12, 2024

Duplicate of #28392

@shennan
Copy link
Author

shennan commented Feb 12, 2024

Thanks @mszkb, you're correct this does appear to be a duplicate. Using the current workaround does indeed fix the issue. I'll subscribe to the other thread for updates on a permanent fix.

Closing.

@shennan shennan closed this as completed Feb 12, 2024
@cypress-io cypress-io locked and limited conversation to collaborators Feb 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants