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

Missing codeframe with the error that causes a test to be retried #30927

Open
cacieprins opened this issue Jan 22, 2025 · 0 comments · May be fixed by #30962
Open

Missing codeframe with the error that causes a test to be retried #30927

cacieprins opened this issue Jan 22, 2025 · 0 comments · May be fixed by #30962
Assignees
Labels
stage: investigating Someone from Cypress is looking into this type: regression A bug that didn't appear until a specific Cy version release v14.0.0 🐛 Issue present since 14.0.0

Comments

@cacieprins
Copy link
Contributor

cacieprins commented Jan 22, 2025

Current behavior

When a runnable fails and is retried, the error that caused the failure is missing the spec codeframe. Instead, a stack is displayed that includes cypress codepoints executed after the spec invocation point.

Desired behavior

When a runnable fails and is retried, the error that caused the failure displays the correct codeframe and stack.

Test code to reproduce

let counter = 0

describe('double digit retries', () => {
  // this test retries a double digit
  // amount of times until it passes:
  it('retries 10 times', { retries: 11 }, () => {
    counter++
    cy.wrap().then(() => {
      expect(counter).to.equal(10)
    })
  })
})

Cypress Version

14.0.0

Node version

v20.18.1

Operating System

macOS 14.6.1

Debug Logs

Other

No response

@cacieprins cacieprins self-assigned this Jan 22, 2025
@cacieprins cacieprins added v14.0.0 🐛 Issue present since 14.0.0 type: regression A bug that didn't appear until a specific Cy version release labels Jan 22, 2025
@jennifer-shehane jennifer-shehane added the stage: investigating Someone from Cypress is looking into this label Jan 23, 2025
@cacieprins cacieprins changed the title Missing codeframe the error that causes a runnable to be retried Missing codeframe with the error that causes a runnable to be retried Jan 28, 2025
@cacieprins cacieprins changed the title Missing codeframe with the error that causes a runnable to be retried Missing codeframe with the error that causes a test to be retried Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: investigating Someone from Cypress is looking into this type: regression A bug that didn't appear until a specific Cy version release v14.0.0 🐛 Issue present since 14.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants