-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: Recovered Error Handling and Session Recovered Errors #24511
Conversation
# Conflicts: # packages/app/cypress/e2e/runner/sessions.ui.cy.ts # packages/driver/cypress/e2e/commands/sessions/sessions.cy.js # packages/driver/src/cy/commands/sessions/index.ts # packages/driver/src/cypress/command_queue.ts # packages/driver/src/cypress/state.ts
…ces with the line that failed.
# Conflicts: # packages/driver/cypress/e2e/commands/sessions/sessions.cy.js # packages/driver/src/cypress/error_utils.ts
…-in-test-errors # Conflicts: # packages/driver/cypress/e2e/commands/sessions/sessions.cy.js # packages/driver/src/cy/commands/sessions/index.ts # packages/driver/src/cypress/error_utils.ts # packages/driver/src/cypress/log.ts # packages/reporter/cypress/e2e/commands.cy.ts # packages/reporter/src/attempts/attempt-model.ts # packages/reporter/src/attempts/attempts.tsx # packages/reporter/src/commands/command-model.ts # packages/reporter/src/commands/command.tsx # packages/reporter/src/commands/commands.scss # packages/reporter/src/errors/err-model.ts # packages/reporter/src/errors/errors.scss # packages/reporter/src/errors/test-error.tsx # packages/reporter/src/lib/events.ts # packages/reporter/src/lib/variables.scss
…ress into reporter-error-ui
…-in-test-errors # Conflicts: # packages/reporter/src/commands/commands.scss # packages/reporter/src/errors/errors.scss
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.
gave the app and driver tests a run and things didn't look to hang and appeared correctly. Just a few questions/suggestions on my end
@@ -368,7 +368,7 @@ describe('src/cy/commands/assertions', () => { | |||
|
|||
cy.on('log:added', (attrs, log) => { | |||
if (log.get('name') === 'assert') { | |||
logs.push(log) | |||
logs?.push(log) |
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.
should we drop a comment there to explain this behavior incase someone runs into it again and thinks the optional chainer isn't necessary?
|
||
expect(this.logs[4].get('name')).to.eq('assert') | ||
expect(this.logs[4].get('state')).to.eq('failed') | ||
expect(this.logs[4].get('error').name).to.eq('AssertionError') | ||
expect(this.logs[4].get('error').name).to.eq('CypressError') | ||
expect(this.logs[4].get('error')).to.eq(err) |
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.
If the assertion fails, I would expect an AssertionError
to be thrown here and not a CypressError
. What was the rason that changed? Or is it that the argument into the assertion is bad?
actually have a few failures in the app tests that I scrolled past. Is that expected currently? |
never mind I clicked something out of the frame causing a UI issue 😬 |
# Conflicts: # tooling/v8-snapshot/cache/dev-darwin/snapshot-meta.cache.json
…io/cypress into sessions-in-test-errors
return false
from validate #24205There PR has a few set of changes going on:
cy.session()
error messaging for both created and restored/created with test coveragecy.session()
console props output to include sessionStorage details and add step information to help with debugginonQueueFailed
(previouslyonCommandFailed
) to ensure all failures can be collected on a 2nd session validation failure and/or when multiple session commands are used in a test.on:fail
handlers to make additional assertions visibleUser facing changelog
TO DO
Steps to test
It would be solid to pull this branch down and run various tests yourself to verify changes to logs and to ensure we don't hanging logs and that things appear to be correct.
How has the user experience changed?
Will comment screenshots here & throughout the code.
PR Tasks
cypress-documentation
? Update validation error scenarios cypress-documentation#4842type definitions
?