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

Test Reporter - NightwatchAssertError's Escape Code Removing Error Message #3972

Closed
qa-danny opened this issue Dec 6, 2023 · 2 comments · Fixed by nightwatchjs/html-reporter#37
Assignees
Labels

Comments

@qa-danny
Copy link
Contributor

qa-danny commented Dec 6, 2023

Description of the bug/issue

When I receive a Nightwatch Assertion Error due to an expect statement against an element, the error message abruptly ends if the element's css selector contains multiple hyphens:

Test Runner Error Message CLI Output On Failure

Steps to reproduce

  1. Locate element with a css selector that contains multiple hyphens, such as [data-test-name="item"]
  2. Force an expect statement to fail, such as browser.expect.elements('@testItem').count.to.equal(10); (instead of 1)
  3. Open Test Runner to view failure message, NightwatchAssertError is cut off at Expected elements <[data test

Sample test

No response

Command to run

No response

Verbose Output

No response

Nightwatch Configuration

No response

Nightwatch.js Version

3.3.0

Node Version

20.4.0

Browser

Chrome 119

Operating System

MacOS Ventura 13.6

Additional Information

No response

@qa-danny
Copy link
Contributor Author

Another example of this issue happening is with URL's with multiple hyphens. Running a known failing expect or assertion statement will not display the whole URL:

image

@garg3133
Copy link
Member

garg3133 commented Jan 24, 2024

A fix for this will be available in the next release of Nightwatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants