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

fix: Error codeframes in retry failures display the code that produced the error #30962

Merged
merged 11 commits into from
Feb 4, 2025

Conversation

cacieprins
Copy link
Contributor

Additional details

With Cypress 14.0.0, the raw user invocation stacks can include codepoints that are internal to Cypress. The patterns we were searching during 14.0.0 were not robust enough.

Depending on several factors, the path to the first userland codepoint had many potential patterns. Trying to include them all one by one proved troublesome. Instead, now, we identify which style of paths the internal codepoints use and strip them out - there are fewer potential options here.

Steps to test

Write an E2E test that fails a determinate number of times before passing, and configure it to retry until it passes. With the binary, run the test and expand one of the failed test attempts. The codeframe should point to the assertion failure in the test.

How has the user experience changed?

PR Tasks

@cacieprins cacieprins marked this pull request as ready for review January 28, 2025 15:05
@AtofStryker AtofStryker self-requested a review January 28, 2025 15:35
Copy link

cypress bot commented Jan 28, 2025

cypress    Run #60146

Run Properties:  status check passed Passed #60146  •  git commit 519cdf73f0: Merge branch 'develop' into cacie/30927/retry-error-codeframe
Project cypress
Branch Review cacie/30927/retry-error-codeframe
Run status status check passed Passed #60146
Run duration 18m 21s
Commit git commit 519cdf73f0: Merge branch 'develop' into cacie/30927/retry-error-codeframe
Committer Cacie Prins
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 7
Tests that did not run due to a developer annotating a test with .skip  Pending 1099
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 26522
View all changes introduced in this branch ↗︎
UI Coverage  45.43%
  Untested elements 192  
  Tested elements 164  
Accessibility  92.54%
  Failed rules  3 critical   8 serious   2 moderate   2 minor
  Failed elements 888  

Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with the built darwin arm64 binary and code frame is present in each retry which is not the case in 14.0.1

@cacieprins cacieprins merged commit 37ad232 into develop Feb 4, 2025
93 of 103 checks passed
@cacieprins cacieprins deleted the cacie/30927/retry-error-codeframe branch February 4, 2025 15:52
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 5, 2025

Released in 14.0.2.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v14.0.2, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing codeframe with the error that causes a test to be retried
2 participants