-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Capybara.string treats newlines as meaningful #2402
Comments
This is because Capybara 3 changed the
|
Okay, we'll give that a try. We're not actually calling expect(rendered).to have_text("Thanks, Sonya Signer") I guess we'll have to figure out a monkey patch of some sort to handle it. |
You should be able to set |
@twalpole is there an alternative that is forward compatible with Capybara 4.x? Or do we just need to kill our view specs? |
@mockdeep Probably not -- but that probably means I need to fix what Capybara::Simple is doing. |
Well, being that we're the only people on earth affected by this, it may not end up being a problem. That being said, maybe you could somehow use the
|
Just want to mention that testing something like: <div>
<span>Hello</span>
<span>World</span>
</div> With: expect(page).to have_text("Hello World") Does not work unless |
Meta
Capybara Version: 3.0 - 3.33.0
Driver Information (and browser if relevant): Not relevant, using
Capybara.string
Expected Behavior
Capybara.string
should ignore newlines (\n
) in content. In Capybara 2.18 the following works:Actual Behavior
Capybara.string
treats newlines in HTML as meaningful content as of Capybara 3.0:The text was updated successfully, but these errors were encountered: