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

before:spec emitted 5 times with experimentalInteractiveRunEvents #26634

Open
badeball opened this issue May 1, 2023 · 1 comment
Open

before:spec emitted 5 times with experimentalInteractiveRunEvents #26634

badeball opened this issue May 1, 2023 · 1 comment
Labels
E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.

Comments

@badeball
Copy link
Contributor

badeball commented May 1, 2023

Current behavior

The before:spec event is emitted five (!) times in open mode with experimentalInteractiveRunEvents under specific conditions (using esbuild as a preprocessor).

Desired behavior

Somewhat similar behavior in open-mode as in run-mode.

Test code to reproduce

https://github.com/badeball/reproducible-issues/tree/master/cypress/experimentalInteractiveRunEvents

  1. Clone it
  2. Run cypress open
  3. Open Electron
  4. Run spec.cy.js
  5. Watch the terminal output and see five "before:spec: invoked!"

This only happens the first time you run spec.cy.js. If you close the runner window, open it again and then run spec.cy.js, then before:spec is correctly emitted once.

Cypress Version

12.11.0

Node version

v18.8.0

Operating System

Arch Linux

Debug Logs

No response

Other

No response

badeball added a commit to badeball/cypress-cucumber-preprocessor that referenced this issue May 1, 2023
Messages are no longer lingering in the runtime, but passed along to the
backend using tasks immediately. This is a prerequisite for the
following issues:

 - 810 [1]
 - 824 [2]
 - 944 [3]

This is not to say that these will be fixed shortly or even at all, but
at least now it will be remotely possible.

Furthermore, this removes any doubt regarding whether reports work in
interactive mode. The experimental flag simply turns out to be too
broken [4-5]. Interactive mode is now detected and reports turned off.

Lastly, detecting interactive mode is a somewhat broken feature [6]. The
workaround (using `isTextTerminal`) is only available in Cypress v10 and
beyond. Thus is Cypress v9 now unsupported.

[1] #810
[2] #824
[3] #944
[4] cypress-io/cypress#18955
[5] cypress-io/cypress#26634
[6] cypress-io/cypress#20789
badeball added a commit to badeball/cypress-cucumber-preprocessor that referenced this issue May 1, 2023
Messages are no longer lingering in the runtime, but passed along to the
backend using tasks immediately. This is a prerequisite for the
following issues:

 - 810 [1]
 - 824 [2]
 - 944 [3]

This is not to say that these will be fixed shortly or even at all, but
at least now it will be remotely possible.

Furthermore, this removes any doubt regarding whether reports work in
interactive mode. The experimental flag simply turns out to be too
broken [4-5]. Interactive mode is now detected and reports turned off.

Lastly, detecting interactive mode is a somewhat broken feature [6]. The
workaround (using `isTextTerminal`) is only available in Cypress v10 and
beyond. Thus is Cypress v9 now unsupported.

[1] #810
[2] #824
[3] #944
[4] cypress-io/cypress#18955
[5] cypress-io/cypress#26634
[6] cypress-io/cypress#20789
badeball added a commit to badeball/cypress-cucumber-preprocessor that referenced this issue May 1, 2023
Messages are no longer lingering in the runtime, but passed along to the
backend using tasks immediately. This is a prerequisite for the
following issues:

 - 810 [1]
 - 824 [2]
 - 944 [3]

This is not to say that these will be fixed shortly or even at all, but
at least now it will be remotely possible.

Furthermore, this removes any doubt regarding whether reports work in
interactive mode. The experimental flag simply turns out to be too
broken [4-5]. Interactive mode is now detected and reports turned off.

Lastly, detecting interactive mode is a somewhat broken feature [6]. The
workaround (using `isTextTerminal`) is only available in Cypress v10 and
beyond. Thus is Cypress v9 now unsupported.

[1] #810
[2] #824
[3] #944
[4] cypress-io/cypress#18955
[5] cypress-io/cypress#26634
[6] cypress-io/cypress#20789
badeball added a commit to badeball/cypress-cucumber-preprocessor that referenced this issue May 1, 2023
Messages are no longer lingering in the runtime, but passed along to the
backend using tasks immediately. This is a prerequisite for the
following issues:

 - 810 [1]
 - 824 [2]
 - 944 [3]

This is not to say that these will be fixed shortly or even at all, but
at least now it will be remotely possible.

Furthermore, this removes any doubt regarding whether reports work in
interactive mode. The experimental flag simply turns out to be too
broken [4-5]. Interactive mode is now detected and reports turned off.

Lastly, detecting interactive mode is a somewhat broken feature [6]. The
workaround (using `isTextTerminal`) is only available in Cypress v10 and
beyond. Thus is Cypress v9 now unsupported.

[1] #810
[2] #824
[3] #944
[4] cypress-io/cypress#18955
[5] cypress-io/cypress#26634
[6] cypress-io/cypress#20789
@mschile mschile added E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. labels May 2, 2023
@mschile
Copy link
Contributor

mschile commented May 2, 2023

@badeball, thanks for logging this issue and providing the reproduction. I was able to reproduce the issue. Possibly related to #23627.

@mschile mschile removed their assignment May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Projects
None yet
Development

No branches or pull requests

2 participants