mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Add missing text for whitespace in has_text?, closes #824
This commit is contained in:
parent
76b8823340
commit
ba0f3d9534
1 changed files with 5 additions and 0 deletions
|
@ -32,6 +32,11 @@ Capybara::SpecHelper.spec '#has_text?' do
|
|||
@session.should have_text('text with whitespace')
|
||||
end
|
||||
|
||||
it "should ignore whitespace and newlines in the search string" do
|
||||
@session.visit('/with_html')
|
||||
@session.should have_text("text with \n\n whitespace")
|
||||
end
|
||||
|
||||
it "should be false if the given text is not on the page" do
|
||||
@session.visit('/with_html')
|
||||
@session.should_not have_text('xxxxyzzz')
|
||||
|
|
Loading…
Add table
Reference in a new issue