diff options
author | Gonzalo Rodriguez <gonzalo@wyeworks.com> | 2011-12-04 05:05:48 +0400 |
---|---|---|
committer | Gonzalo Rodriguez <gonzalo@wyeworks.com> | 2011-12-04 05:09:51 +0400 |
commit | 77d30949a07c22c5c06618b596a91ac13d5dca8f (patch) | |
tree | 28af7db8079df53d6d360952214400e87b604dc3 /features | |
parent | 3b6c6c564f61b6bf9f490628818c6439a8128d5f (diff) |
Refactor some cucumber steps
Diffstat (limited to 'features')
-rw-r--r-- | features/step_definitions/custom_web_steps.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 77e5f7e23..2a09586c4 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -115,11 +115,7 @@ end Then /^(?:|I )should not see a "([^\"]*)"(?: within "([^\"]*)")?$/ do |selector, scope_selector| with_scope(scope_selector) do - if page.has_css?(selector) - find(:css, selector).visible?.should be_false - else - page.has_css?(selector).should be_false - end + page.has_css?(selector, :visible => true).should be_false end end @@ -174,11 +170,11 @@ Then /^the "([^"]*)" field(?: within "([^"]*)")? should be filled with "([^"]*)" end Then /^I should see (\d+) posts$/ do |n_posts| - wait_until(30) { all("#main_stream .stream_element").length == n_posts.to_i } + has_css?("#main_stream .stream_element", :count => n_posts.to_i).should be_true end Then /^I should see (\d+) contacts$/ do |n_posts| - wait_until(30) { all("#people_stream .stream_element").length == n_posts.to_i } + has_css?("#people_stream .stream_element", :count => n_posts.to_i).should be_true end And /^I scroll down$/ do |