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

when text contains whitespace, incorrect/confusing error message in web console #2003

Closed
alexch opened this issue Jun 21, 2018 · 1 comment
Closed
Labels
type: duplicate This issue or pull request already exists

Comments

@alexch
Copy link

alexch commented Jun 21, 2018

Current behavior:

image

When the actual text contains trailing whitepace, instead of displaying the actual text in boldface, it displays double asterisks around the text, unbolded, with no clear indication that the distinction between actual and expected is a single space character.

When the expected text does not contain trailing whitespace, it displays a space between the final character and the comma.

Underneath the log message is an error box that does include trailing whitespace in the actual string, but that message is harder to read and contradicts its neighbor.

Desired behavior:

Whitespace in strings should be clearly indicated -- especially since whitespace mismatch is a very common source of test failures.

My advice is to ditch the faux-markdown double-star bold trick, and instead output correct HTML, including a "no-wrap" style so relevant space characters do not turn into misleading newlines, and including correct string-escaped versions of tab, newline, etc.

Steps to reproduce:

See https://github.com/BurlingtonCodeAcademy/markdown_preview (branch solution). Inside the top H1 put a trailing space:

<h1>Markdown Preview </h1>

then run the specs with cypress open.

Versions

Cypress 3.0.1

@chrisbreiding
Copy link
Contributor

Duplicate of #1360

@chrisbreiding chrisbreiding marked this as a duplicate of #1360 Jun 21, 2018
@chrisbreiding chrisbreiding added the type: duplicate This issue or pull request already exists label Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants