If there are multiple spaces in error log, assert text log shows incorrect one, AssertionError correct one #29749
Labels
pkg/reporter
This is due to an issue in the packages/reporter directory
stale
no activity on this issue for a long period
type: bug
Current behavior
Noticed that
should('include.text', myText)
andshould('contain.text', myText)
fails with this in log sidebar:assert expected '<div>' to contain text 'AAA, BBB', but the text was 'AAA, BBB some more text'
AssertionError
Timed out retrying after 10000ms: expected <div> to contain text 'AAA, BBB', but the text was 'AAA, BBB some more text'
and find out that first line is missing two spaces, while AssertionError line shows correctly two spaces within:
The first line is wrong and misleading. I lost 20mins to find out why it fails.
Desired behavior
The first line message, the one starting with "assert", should be fixed to show correct text; with two spaces in this case.
Test code to reproduce
Cypress Version
13.6.6
Node version
20.11.0
Operating System
Win 10
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: