Change the method have_css for find

The old method have_css didn't wait, apparently,
the Capybara's max_wait_time.
It has been changed in favor of find,
one that waits the stablished time for
an element to appear in the screen.
This commit is contained in:
iagirre
2018-03-19 10:41:13 +01:00
parent bc03aee84d
commit 7e90021cdf

View File

@@ -25,7 +25,7 @@ feature 'Moderate debates' do
click_link 'Hide' click_link 'Hide'
end end
expect(page).to have_css("#debate_#{debate.id}.faded") expect(find("div#debate_#{debate.id}.faded")).to have_text debate.title
login_as(citizen) login_as(citizen)
visit debates_path visit debates_path