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 time travel log for Fail Fast something logs in next test #181

Open
alexniculae opened this issue Dec 15, 2021 · 2 comments
Open
Labels
stage: needs information Not enough info to reproduce the issue

Comments

@alexniculae
Copy link

alexniculae commented Dec 15, 2021

Describe the bug
In some edge cases (stopping and restarting the Cypress Test Runner tests multiple times) will cause the Cypress time travel logs to be printed in the next test.

To Reproduce

  • Start the Cypress Test runner (npx cypress open)
  • Run the tests
  • Leave to run for 1 or 2 tests to finish
  • Stop and restart the tests
  • Do this 3-4-5 times
  • At some point the Time Travel Logs from Test#1 are printed in Test#2

Expected behavior
The logs should always be printed in the test they belong to, not the following one.

** Operating system, Node.js an npm versions, or browser version (please complete the following information):**

  • OS: Windows
  • Node.js: 14.16
  • npm: 6.14
  • Browser: Electron
@alexniculae
Copy link
Author

alexniculae commented Dec 15, 2021

My current set-up:

// cypress.json
{
  "env":
  {
    "FAIL_FAST_ENABLED": false
  }
}

// spec # 1
describe("Some tests", { failFast: { enabled: true } }, () => {
//code
//code
});

// spec # 2
describe("Other tests", () => {
//code
//code
});

// spec # 3
describe("Other other tests", () => {
//code
//code
});

@javierbrea
Copy link
Owner

Hi @testingJava2 , thanks for the notice.

Unfortunately, "edge cases" are hard to reproduce, and I haven't achieved it. Anyway, I won't close the issue, because I suspect it could be related to the internal usage of beforeEach and afterEach hooks. I have planned to refactor the plugin to use other Cypress events if possible in order interfere as less as possible with test definitions. So, when the new release is ready I will add a comment here to check if the issue still happens.

@javierbrea javierbrea added the stage: needs information Not enough info to reproduce the issue label Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs information Not enough info to reproduce the issue
Projects
None yet
Development

No branches or pull requests

2 participants