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

Cypress.log to display line break #24964

Closed
nilgaar opened this issue Dec 5, 2022 · 3 comments · Fixed by #25467
Closed

Cypress.log to display line break #24964

nilgaar opened this issue Dec 5, 2022 · 3 comments · Fixed by #25467
Labels
E2E Issue related to end-to-end testing type: enhancement Requested enhancement of existing feature

Comments

@nilgaar
Copy link
Contributor

nilgaar commented Dec 5, 2022

Current behavior

When logging some text with Cypress.log, the "\n" does not break line for message (nor for displayName), just leaves a space.

Cypress.log({
              name: "",
              displayName: "",
              message: "I'm the first line!" + "\n" + "I'm the second line",

output
<span class="command-message-text">I'm the first line! I'm the second line</span>

image

Desired behavior

Would be nice that the log view can display the break lines correctly when a string contains "\n"

Test code to reproduce

Cypress.log({
              name: "",
              displayName: "",
              message: "I'm the first line!" + "\n" + "I'm the second line",
            });

Cypress Version

11.2.0

Node version

16.17.0

Operating System

13.0.1

Debug Logs

No response

Other

No response

@nagash77 nagash77 added type: feature New feature that does not currently exist E2E Issue related to end-to-end testing labels Dec 5, 2022
@emilyrohrbough
Copy link
Member

@nilgaar This seems like a reasonable request. This likely isn't something we will be able to prioritize anytime soon. Are you interested in contributing this change?

@emilyrohrbough emilyrohrbough added help wanted type: enhancement Requested enhancement of existing feature and removed type: feature New feature that does not currently exist labels Jan 4, 2023
@nilgaar
Copy link
Contributor Author

nilgaar commented Jan 11, 2023

absolutely @emilyrohrbough, I can work in a PR for this

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 24, 2023

Released in 12.4.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
E2E Issue related to end-to-end testing type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants