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

fix: Fix issue with display of assertions when using custom messages #29243

Merged
merged 10 commits into from Apr 10, 2024

Conversation

tiago80673
Copy link
Contributor

Additional details

The display for assertion messages with a custom message was broken.
The regex pattern was made only for messages starting exactly with expected but they can start with a <custom message>:

Steps to test

Add to a test file:
expect(2).to.be.at.least(0, "Custom message")

How has the user experience changed?

Before:
image
After:
image

PR Tasks

@CLAassistant
Copy link

CLAassistant commented Apr 1, 2024

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link
Collaborator

@jennifer-shehane jennifer-shehane requested review from chrisbreiding and jennifer-shehane and removed request for chrisbreiding April 2, 2024 20:58
@tiago80673 tiago80673 removed their assignment Apr 5, 2024
@mschile mschile requested a review from AtofStryker April 9, 2024 15:19
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Tested locally on a failure also. Thanks for the contribution!
Screenshot 2024-04-10 at 10 28 51 AM

@jennifer-shehane jennifer-shehane merged commit 1fa3e7f into cypress-io:develop Apr 10, 2024
67 checks passed
@AlexGuironnetRTE
Copy link
Contributor

@tiago80673 Thanks a lot for fixing this!

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 11, 2024

Released in 13.7.3.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom assertion messages create confusing output in Cypress open
6 participants