-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
Capybara 3 has changed the page.has_text? method that is used e.g. by the I should (not) see … steps to respect white space, including \n. This breaks tests that rely on the previous behavior, which normalized all white space like Rails' squish.
Fortunately, the has_text? method takes options and passes them to assert_text. This method takes a :normalize_ws option that restores the previous behavior if set to true:
An update for the I should see … steps could look like this:
patiently do
expect(page).to have_text(text, normalize_ws: true)
end
Metadata
Metadata
Assignees
Labels
No labels