-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not assume valid file info in error stack line (#9081)
- Loading branch information
Showing
8 changed files
with
535 additions
and
5 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
packages/driver/cypress/fixtures/error-stack-with-http-links.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
ReferenceError: The following error originated from your application code, not from Cypress. | ||
|
||
> b is not defined | ||
|
||
When Cypress detects uncaught errors originating from your application it will automatically fail the current test. | ||
|
||
This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event. | ||
at http://localhost:8888/js/utils.js:9:3 | ||
at http://localhost:8888/js/utils.js:60:3 | ||
From previous event: | ||
at run (http://localhost:8888/__cypress/runner/cypress_runner.js:169474:21) | ||
at $Cy.cy.<computed> [as visit] (http://localhost:8888/__cypress/runner/cypress_runner.js:169931:11) | ||
at Context.runnable.fn (http://localhost:8888/__cypress/runner/cypress_runner.js:170155:21) | ||
at callFn (http://localhost:8888/__cypress/runner/cypress_runner.js:104227:21) | ||
at Test.../driver/node_modules/mocha/lib/runnable.js.Runnable.run (http://localhost:8888/__cypress/runner/cypress_runner.js:104214:7) | ||
at http://localhost:8888/__cypress/runner/cypress_runner.js:175754:28 | ||
From previous event: | ||
at Object.onRunnableRun (http://localhost:8888/__cypress/runner/cypress_runner.js:175742:17) | ||
at $Cypress.action (http://localhost:8888/__cypress/runner/cypress_runner.js:166291:28) | ||
at Test.Runnable.run (http://localhost:8888/__cypress/runner/cypress_runner.js:174128:13) | ||
at Runner.../driver/node_modules/mocha/lib/runner.js.Runner.runTest (http://localhost:8888/__cypress/runner/cypress_runner.js:104886:10) | ||
at http://localhost:8888/__cypress/runner/cypress_runner.js:105012:12 | ||
at next (http://localhost:8888/__cypress/runner/cypress_runner.js:104795:14) | ||
at http://localhost:8888/__cypress/runner/cypress_runner.js:104805:7 | ||
at next (http://localhost:8888/__cypress/runner/cypress_runner.js:104707:14) | ||
at http://localhost:8888/__cypress/runner/cypress_runner.js:104773:5 | ||
at timeslice (http://localhost:8888/__cypress/runner/cypress_runner.js:98699:27) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
packages/reporter/cypress/fixtures/cy_command_failed_error.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "AssertionError", | ||
"message": "Timed out retrying: Expected to find element: `.new-todo`, but never found it.", | ||
"stack": "AssertionError: Timed out retrying: Expected to find element: `.new-todo`, but never found it.\n at getInputBox (http://localhost:8888/__cypress/tests?p=cypress/integration/spec.js:130:13)\n at Context.eval (http://localhost:8888/__cypress/tests?p=cypress/integration/spec.js:105:32)", | ||
"sourceMappedStack": "AssertionError: Timed out retrying: Expected to find element: `.new-todo`, but never found it.\n at getInputBox (webpack:///cypress/integration/test-utils.js:2:13)\n at Context.eval (webpack:///cypress/integration/spec.js:7:5)", | ||
"parsedStack": [ | ||
{ | ||
"message": "AssertionError: Timed out retrying: Expected to find element: `.new-todo`, but never found it.", | ||
"whitespace": "" | ||
}, | ||
{ | ||
"function": "getInputBox", | ||
"fileUrl": "http://localhost:8888/__cypress/tests?p=cypress/integration/spec.js", | ||
"originalFile": "webpack:///cypress/integration/test-utils.js", | ||
"relativeFile": "cypress/integration/test-utils.js", | ||
"absoluteFile": "/Users/gleb/git/cypress-example-todomvc/cypress/integration/test-utils.js", | ||
"line": 2, | ||
"column": 13, | ||
"whitespace": " " | ||
}, | ||
{ | ||
"function": "Context.eval", | ||
"fileUrl": "http://localhost:8888/__cypress/tests?p=cypress/integration/spec.js", | ||
"originalFile": "webpack:///cypress/integration/spec.js", | ||
"relativeFile": "cypress/integration/spec.js", | ||
"absoluteFile": "/Users/gleb/git/cypress-example-todomvc/cypress/integration/spec.js", | ||
"line": 7, | ||
"column": 5, | ||
"whitespace": " " | ||
} | ||
], | ||
"docsUrl": "", | ||
"templateType": "", | ||
"codeFrame": { | ||
"line": 2, | ||
"column": 13, | ||
"originalFile": "cypress/integration/test-utils.js", | ||
"relativeFile": "cypress/integration/test-utils.js", | ||
"absoluteFile": "/Users/gleb/git/cypress-example-todomvc/cypress/integration/test-utils.js", | ||
"frame": " 1 | export const getInputBox = () => {\n> 2 | return cy.get('.new-todo')\n | ^\n 3 | }\n 4 | ", | ||
"language": "js" | ||
} | ||
} |
Oops, something went wrong.
1c2a175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
1c2a175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor has built the
win32 ia32
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
1c2a175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor has built the
win32 x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally: