Updating cucumber features

This commit is contained in:
khall 2014-08-25 15:26:03 -07:00
parent c27b38d69a
commit de3e0bd91a
5 changed files with 11 additions and 11 deletions

View file

@ -150,12 +150,12 @@ end
Then /^(?:|I )should not see a "([^\"]*)"(?: within "([^\"]*)")?$/ do |selector, scope_selector|
with_scope(scope_selector) do
current_scope.has_css?(selector, :visible => true).should be_false
current_scope.has_css?(selector, :visible => true).should be false
end
end
Then /^page should (not )?have "([^\"]*)"$/ do |negate, selector|
page.has_css?(selector).should ( negate ? be_false : be_true )
page.has_css?(selector).should ( negate ? (be false) : (be true) )
end
When /^I have turned off jQuery effects$/ do
@ -178,7 +178,7 @@ Then /^the "([^"]*)" field(?: within "([^"]*)")? should be filled with "([^"]*)"
end
Then /^I should see (\d+) contacts$/ do |n_posts|
has_css?("#people_stream .stream_element", :count => n_posts.to_i).should be_true
has_css?("#people_stream .stream_element", :count => n_posts.to_i).should be true
end
And /^I scroll down$/ do
@ -217,15 +217,15 @@ And /^I click close on all the popovers$/ do
end
Then /^I should see a flash message indicating success$/ do
flash_message_success?.should be_true
flash_message_success?.should be true
end
Then /^I should see a flash message indicating failure$/ do
flash_message_failure?.should be_true
flash_message_failure?.should be true
end
Then /^I should see a flash message with a warning$/ do
flash_message_alert?.should be_true
flash_message_alert?.should be true
end
Then /^I should see a flash message containing "(.+)"$/ do |text|

View file

@ -19,7 +19,7 @@ Then /^I should not see any posts in my stream$/ do
end
Then /^I should not be able to submit the publisher$/ do
expect(publisher_submittable?).to be_false
expect(publisher_submittable?).to be false
end
Given /^"([^"]*)" has a public post with text "([^"]*)"$/ do |email, text|

View file

@ -157,14 +157,14 @@ end
Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should be checked$/ do |label, selector|
with_scope(selector) do
field_checked = find_field(label)['checked']
field_checked.should be_true
field_checked.should eq('true')
end
end
Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |label, selector|
with_scope(selector) do
field_checked = find_field(label)['checked']
field_checked.should be_false
field_checked.should be false
end
end

View file

@ -23,7 +23,7 @@ module ApplicationCukeHelpers
def confirm_form_validation_error(element)
is_invalid = page.evaluate_script("$('#{element}').is(':invalid')")
is_invalid.should be_true
is_invalid.should be true
end
def check_fields_validation_error(field_list)

View file

@ -42,7 +42,7 @@ module PublishingCukeHelpers
def expand_first_post
within(".stream_element", match: :first) do
find(".expander").click
has_css?(".expander").should be_false
has_css?(".expander").should be false
end
end