You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! We just use the underlying textContent property on the element, so we don't have any real control over what is returned - this is the default behavior in a browser. For this reason we won't be making any changes to this API.
I have also encountered this before, I think I used a regexp. Hopefully that helps!
@lmiller1990 In the course of looking for this, I found argos-ci/jest-puppeteer#51; they initially said the same but ended up 'fixing' it and adding a separate regex-over-raw API. Would that be something you're open to?
This is a frequent frustration for me, often it's a seemingly innocuous change (even one performed by eslint), and then the tests fail because the line count/breaks in the source code are slightly different, despite it still rendering the same.
e.g. from:
You should really click <b-link
propa
propb
>here</b-link> now!
to:
You should really click
<b-link
propa
propb
>
here
</b-link>
now!
and the text content changes from You should really click here now! to
Subject of the issue
.text return extra whitespace
Steps to reproduce
2.Run a test with the following
Expected behaviour
The test shall passes.
Actual behaviour
The test failed with
Possible Solution
What are the alternative solutions? Please describe what else you have considered?
The text was updated successfully, but these errors were encountered: