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

Assertion diff is not shown when an assertion fails and is retried #6722

Closed
chrisbreiding opened this issue Mar 13, 2020 · 3 comments · Fixed by #6724
Closed

Assertion diff is not shown when an assertion fails and is retried #6722

chrisbreiding opened this issue Mar 13, 2020 · 3 comments · Fixed by #6724
Assignees

Comments

@chrisbreiding
Copy link
Contributor

Current behavior:

When an assertion is retried (using cy.should()) and fails, it does not show a diff in the stdout. If the same assertion is not retried, it will show the diff.

Desired behavior:

Failing assertions should show diffs in the stdout regardless of whether they are retried or not.

Test code to reproduce

This works properly and shows what the diff should look like.

it('non-dom - fails without retry', () => {
  expect([]).to.eql([1, 2, 3])
})

Screen Shot 2020-03-13 at 3 07 18 PM

This demonstrates the issue.

it('non-dom - fails with retry', () => {
  cy.wrap([]).should('eql', [1, 2, 3])
})

Screen Shot 2020-03-13 at 3 17 17 PM

Versions

Cypress 4.1.0

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 13, 2020

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

@chrisbreiding chrisbreiding mentioned this issue Mar 13, 2020
3 tasks
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: pending release labels Mar 13, 2020
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Mar 17, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 17, 2020

The code for this is done in cypress-io/cypress#6724, 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 Mar 30, 2020

Released in 4.3.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 30, 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