-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Current behavior:
Our CI/CI pipeline runs our Cypress tests on a schedule. This has been working as expected. However, yesterday (12 September 2019), the behavior changed. Instead of running to completion (with or without errors), the test suite now hangs on one particular test case. The CI/CD pipeline eventually times out after 60 minutes.
Running the tests manually on my machine with Chrome via npx cypress run --browser chrome
or npx cypress open --browser chrome
works just fine.
Running the tests manually with Electron, headless or headless, does not. It exhibits the same hang that our CI/CD pipeline exhibits.
Digging into it I see that it is hanging on the afterEach()
action, trying to revisit the same page, via cy.visit()
on which the test started. Playing around with things, It seems to fail the same way, any time cy.visit()
is called twice in the context of the same test of describe()
block.
Even odder, turning on debug logging via
env DEBUG=cypress:* npx cypress run --browser electron 2>&1 | tee cypress-log.txt
completed successfully.
Desired behavior:
Tests should run to completion and not hang.
Steps to reproduce: (app code and test code)
- Clone this repo: https://github.com/nbcarey/cypress-io-hangs-with-electron
- Running the command
npm run succeeds-with-chrome
gives you the happy path. - Running the command
npm run hangs-with-electron
gives you the unhappy path.
Versions
-
MacOS Mojave, v10.14.6
-
Chrome, v77.0.3865.75
-
Node.js, v10.16.3
-
Npm, v6.11.3
-
Cypress, v3.4.1 (and Electron 61?)