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

Expected there to be a timestamp for current step - New Issue #1249

Closed
acLebert opened this issue Oct 9, 2024 · 1 comment
Closed

Expected there to be a timestamp for current step - New Issue #1249

acLebert opened this issue Oct 9, 2024 · 1 comment

Comments

@acLebert
Copy link

acLebert commented Oct 9, 2024

Current behavior
I am encountering an error in my test suite while using @badeball/cypress-cucumber-preprocessor. The error occurs specifically in the after each hook, and causes all remaining tests in the current suite to be skipped. The following stack trace is generated:

javascript
Copy code
Error: Expected there to be a timestamp for current step (this might be a bug, please report at https://github.com/badeball/cypress-cucumber-preprocessor)
Because this error occurred during a after each hook we are skipping the remaining tests in the current suite: Backbar and Commission
Here is the relevant portion of my test where the issue occurs:

stack trace
at createError (webpack:///../../../node_modules/@badeball/cypress-cucumber-preprocessor/dist/helpers/error.js:10:0) at fail (webpack:///../../../node_modules/@badeball/cypress-cucumber-preprocessor/dist/helpers/assertions.js:14:0) at assert (webpack:///../../../node_modules/@badeball/cypress-cucumber-preprocessor/dist/helpers/assertions.js:20:0) at assertAndReturn (webpack:///../../../node_modules/@badeball/cypress-cucumber-preprocessor/dist/helpers/assertions.js:23:0) at Context.afterEachHandler (webpack:///../../../node_modules/@badeball/cypress-cucumber-preprocessor/dist/browser-runtime.js:610:0) at Context.eval (webpack:///../../../node_modules/@badeball/cypress-cucumber-preprocessor/dist/browser-runtime.js:207:0)

The error occurs within the Backbar and Commission test suite.
The issue seems to be connected with tracking timestamps for steps, but there are no issues reported within the steps themselves.
This happens after the test completes, during the after each hook, leading to test suite failures.
This might be a one off thing since this is used throughout 300+ spec files, and this happened this 1 time. But im following instructions to report this.

Desired behavior
The test should execute the after each hook without causing errors. Timestamps for steps should be correctly registered and the suite should not skip tests due to missing timestamps in steps.

Test code to reproduce
The error occurs in my test suite that utilizes @badeball/cypress-cucumber-preprocessor with the following configuration:

Cypress is set up to run a suite named Backbar and Commission, which involves API interceptions and assertions related to backbar and commission calculations.
The issue occurs specifically in the afterEach() hook of this suite.
Unfortunately, I am unable to share the full codebase, but I will attempt to outline the flow that triggers this error:

Test initiates and performs its steps.
The after each hook is invoked for cleanup tasks.
The error is thrown related to missing timestamp information for the current step, and subsequent tests are skipped.
If necessary, I can provide more details on my environment or test setup.

Versions
Cypress version: 13.15.0
Preprocessor version: 20.1.2
Node version: 18.16.0
Checklist
I've read the FAQ.
I've read instructions for logging issues.
I'm not using [email protected] (package name has changed and it is no longer the most recent version, see #689).

More info I found within the output

Estimated: 1 minute, 31 seconds

@badeball
Copy link
Owner

badeball commented Oct 9, 2024

Duplicate of #1222, thus closing.

In any case, the information you've provided unfortunately doesn't help me to reproduce the issue.

@badeball badeball closed this as completed Oct 9, 2024
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

No branches or pull requests

2 participants