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: Remove erroneous <br> tags from error messages #28496

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Dec 11, 2023

Additional details

There was a regression introduced in 12.4.0 with this PR, where all of our error messages were formatting to include <br> tags when there was a new line in the error message.

The original PR did not run Percy checks since it was an outside contributor, so this visual change went unnoticed.

This adds an exception to the formatting logic when the message is of type: error in order to maintain the functionality of the originally intended PR to have line breaks in Cypress.log messages.

Steps to test

A test was added to cover this in the test_errors.cy.ts, we should also see Percy snapshots update.

How has the user experience changed?

Before

image (4)
image (5)

After

Screen Shot 2023-12-11 at 11 22 18 AM

Screen Shot 2023-12-11 at 12 12 39 PM

PR Tasks

@jennifer-shehane jennifer-shehane changed the title Remove erroneous <br> tags from error messages fix: Remove erroneous <br> tags from error messages Dec 11, 2023
@brian-mann
Copy link
Member

Can you add a test for the affirmative case where it does keep <br /> for Cypress.log(...) ? If they already exist, then just point that out.

@jennifer-shehane
Copy link
Member Author

Copy link

cypress bot commented Dec 11, 2023

4 flaky tests on run #52749 ↗︎

0 554 6 0 Flakiness 4

Details:

Merge branch 'develop' into fix-brs-in-error-messages
Project: cypress Commit: 6bee50fe8f
Status: Passed Duration: 12:57 💡
Started: Dec 12, 2023 6:39 PM Ended: Dec 12, 2023 6:51 PM
Flakiness  runs.cy.ts • 2 flaky tests • app-e2e

View Output

Test Artifacts
App: Runs > Runs - Create Project > when a project is created, injects new projectId into the config file, and sends expected UTM params Test Replay Screenshots
... > displays a list of recorded runs if a run has been recorded Test Replay Screenshots
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Test Replay Screenshots
Flakiness  debug.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
App - Debug Page > shows running and updating build Test Replay Screenshots

Review all test suite changes for PR #28496 ↗︎

@jennifer-shehane jennifer-shehane merged commit c061fd8 into develop Dec 12, 2023
81 of 83 checks passed
@jennifer-shehane jennifer-shehane deleted the fix-brs-in-error-messages branch December 12, 2023 19:46
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 26, 2023

Released in 13.6.2.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Dec 26, 2023
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.

Spacing of error message is too long with <br>
4 participants