diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 9bdd48459..63c0e9b34 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -160,7 +160,7 @@ Then /^the "([^"]*)" field(?: within "([^"]*)")? should be filled with "([^"]*)" end Then /^I should see (\d+) posts$/ do |n_posts| - all("#main_stream .stream_element").length.should == n_posts.to_i + wait_until(10) { all("#main_stream .stream_element").length == n_posts.to_i } end And /^I scroll down$/ do