cypress
cypress copied to clipboard
CT Stack Traces
Summary
In E2E we show a stack trace if there is an error in the test. It is (5) here:
!image-2022-02-09-20-16-55-107.png|thumbnail!
We want the same thing for CT. Right now, webpack dev server does not supply the correct source map - in fact, it doesn't have one at all. Also, even if it did, the seam between the dev-server and CT runner is not set up for stack traces.
For CT we go here https://github.com/cypress-io/cypress/blob/10.0-release/packages/driver/src/cypress/script_utils.ts#L49 as opposed to E2E which goes on and calls this https://github.com/cypress-io/cypress/blob/10.0-release/packages/driver/src/cypress/script_utils.ts#L36 which gets the source map.
Acceptance Criteria
- Should return the source map from webpack dev server
- Should extract and display it for component testing
Resources
Brian telling Lachlan about source maps for an hour or so:
Meeting Recording: https://cypress-io.zoom.us/rec/share/hiYJyb9yjp7W7UKPbow0gG3gum1Az7kXA7Yq8XtQGU0AcNUEpdSTo43JL-Zs59uJ.-2OgUXVt2mTAcgZp Access Passcode: message @lmiller1990
Open Pull Requests
Any PRs needed for review
┆Issue is synchronized with this Jira Task by Unito ┆Attachments: image-2022-02-09-20-16-55-107.png ┆author: Lachlan Miller ┆epic: CT Post Unification Release ┆friendlyId: UNIFY-1070 ┆priority: Low ┆sprint: Unification Release Backlog ┆taskType: Task
➤ Brian Mann commented:
I paired with lachlan on this last night and explained everything to him, so he should be fully enabled on this
➤ Lachlan Miller commented:
PR will be here eventually https://github.com/cypress-io/cypress/pull/20138/files ( https://github.com/cypress-io/cypress/pull/20138/files|smart-link )
I have some OOO coming, and expect to have to pick up some other things while working on this, so opening this PR early just to give visibility to my work.
Hey team! Please add your planning poker estimate with ZenHub @astone123 @lmiller1990 @marktnoonan @ZachJW34 @mike-plummer @rockindahizzy @warrensplayer @amehta265
Do source maps for the vite-dev-server
work? Or is it just webpack-dev-server
?
Not sure, but I'm guessing source maps are a pre-requisite for correct and accurate stack traces.
The code for this is done in cypress-io/cypress#23916, but has yet to be released. We'll update this issue and reference the changelog when it's released.
Released in 10.9.0
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v10.9.0, please open a new issue.