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

Utilize source maps #3966

Closed
chrisbreiding opened this issue Apr 15, 2019 · 3 comments · Fixed by #6724 or #3930
Closed

Utilize source maps #3966

chrisbreiding opened this issue Apr 15, 2019 · 3 comments · Fixed by #6724 or #3930

Comments

@chrisbreiding
Copy link
Contributor

chrisbreiding commented Apr 15, 2019

As part of adding code frames for the improved error experience, we need to do the following:

  • Enable source maps (unless the user has explicitly disabled them) in the preprocessor
  • Gracefully handle the case where the user has disabled source maps
  • For errors with a stack:
    • Translate the stack into source code stack
  • For command errors:
    • Capture the stack when a command runs
    • If the command fails, use the source maps to trace the command back to the source spec file
    • Pull out the line from the spec file and one two above and below it to display in the error code frame
  • For assertion errors:
    • Same as commands but point to and show the assertion
  • For reporter UI:
    • Capture the stack when an it runs
    • Display a button in the UI next to the test name that opens the file at that line when clicked

Related: #881

@chrisbreiding chrisbreiding self-assigned this Apr 15, 2019
@cypress-bot cypress-bot bot added the stage: work in progress There is an open PR for this issue [WIP] label Apr 17, 2019
@chrisbreiding chrisbreiding changed the title Obtain spec file source lines when a command fails Utilize source maps Apr 26, 2019
@cypress-bot cypress-bot bot added stage: pending release There is a closed PR for this issue and removed stage: work in progress There is an open PR for this issue [WIP] labels Jan 8, 2020
@chrisbreiding chrisbreiding mentioned this issue Mar 13, 2020
3 tasks
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: pending release There is a closed PR for this issue labels Mar 16, 2020
@cypress-bot cypress-bot bot added stage: pending release There is a closed PR for this issue and removed stage: needs review The PR code is done & tested, needs review labels Mar 17, 2020
@chrisbreiding
Copy link
Contributor Author

This won't be complete until #3930 is merged.

@chrisbreiding chrisbreiding reopened this Mar 30, 2020
@cypress-io cypress-io deleted a comment from cypress-bot bot Mar 30, 2020
@jennifer-shehane jennifer-shehane added stage: work in progress There is an open PR for this issue [WIP] and removed stage: pending release There is a closed PR for this issue labels Mar 30, 2020
@cypress-io cypress-io deleted a comment from cypress-bot bot Mar 30, 2020
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: work in progress There is an open PR for this issue [WIP] labels May 4, 2020
@cypress-bot cypress-bot bot added stage: pending release There is a closed PR for this issue and removed stage: needs review The PR code is done & tested, needs review labels May 6, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 6, 2020

The code for this is done in cypress-io/cypress#3930, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 20, 2020

Released in 4.6.0.

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

@cypress-bot cypress-bot bot removed the stage: pending release There is a closed PR for this issue label May 20, 2020
@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants