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: format special characters correctly #22537

Merged
merged 14 commits into from
Jul 14, 2022

Conversation

gitstart
Copy link
Contributor

@gitstart gitstart commented Jun 27, 2022

User facing changelog

Bugfixes:

  • Updated the reporter to correctly render special characters. Previously special characters would be automatically formatted with markdown.

Additional details

A number of users reported having faced this issue and that they needed a fix for it. Please refer to #5679 and #7419 for more context.

Only assertions using to.match() and to.equal() with special characters are affected by this change, the rest of the assertions and content in the reporter will stay largely unaffected.

This change checks for all messages containing to match() or to equal() and then converts the message to markdown as before but this time it does not convert the assertion. It then wraps the assertion in <strong>${assertion}</strong> to make it appear bold.

Steps to test

How has the user experience changed?

Before After
Screenshot 2022-05-28 at 04 22 57 Screenshot 2022-05-28 at 04 29 27

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?

@gitstart gitstart requested a review from a team as a code owner June 27, 2022 17:49
@gitstart gitstart requested review from AtofStryker and removed request for a team June 27, 2022 17:49
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 27, 2022

Thanks for taking the time to open a PR!

@gitstart
Copy link
Contributor Author

@rachelruderman I believe this should work

@mjhenkes mjhenkes requested review from tbiethman and removed request for AtofStryker June 27, 2022 21:30
@cypress
Copy link

cypress bot commented Jun 27, 2022



Test summary

37721 0 456 0Flakiness 12


Run details

Project cypress
Status Passed
Commit 81e2d5a
Started Jul 14, 2022 2:33 PM
Ended Jul 14, 2022 3:02 PM
Duration 28:45 💡
OS Linux Debian - 10.11
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

actions/click.cy.js Flakiness
1 ... > scroll-behavior > can scroll to and click elements in html with scroll-behavior: smooth
2 ... > scroll-behavior > can scroll to and click elements in html with scroll-behavior: smooth
navigation.cy.js Flakiness
1 src/cy/commands/navigation > #visit > window immediately resolves and doesn't reload when visiting the same URL with hashes
xhr.cy.js Flakiness
1 ... > logs request + response headers
2 ... > logs Method, Status, URL, and XHR
This comment includes only the first 5 flaky tests. See all 12 flaky tests in the Cypress Dashboard.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@tbiethman
Copy link
Contributor

@gitstart gitstart requested a review from a team as a code owner July 6, 2022 13:20
@gitstart
Copy link
Contributor Author

gitstart commented Jul 8, 2022

Hey @tbiethman @rachelruderman I'm sorry, I fell sick, been in the hospital for a number of days. I've fixed this. There was an extra space.

@lmiller1990 lmiller1990 removed the request for review from a team July 11, 2022 03:23
Copy link
Contributor

@rachelruderman rachelruderman left a comment

Choose a reason for hiding this comment

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

@gitstart glad you're out of the hospital and feeling better! Thank you for your contribution 🌟

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 19, 2022

Released in 10.3.1.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 19, 2022
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.

Special characters wrongly displayed in runner UI assertions, formatted as markdown
5 participants