tracks/features/step_definitions/generic_steps.rb

31 lines
688 B
Ruby
Raw Normal View History

Given /this is a pending scenario/ do
pending
end
Given /^I set the locale to "([^"]*)"$/ do |locale|
@locale = locale
end
Given /^I am working on the mobile interface$/ do
@mobile_interface = true
end
Then /the badge should show (.*)/ do |number|
2012-01-30 03:42:47 +01:00
badge = find("span#badge_count").text.to_i
badge.should == number.to_i
end
Then /^I should see an error flash message saying "([^"]*)"$/ do |message|
xpath = "//div[@id='message_holder']/h4[@id='flash']"
2012-02-03 15:57:23 +01:00
text = page.find(:xpath, xpath).text
text.should == message
end
Then /^I should see "([^"]*)" $/ do |text|
Then "I should see \"#{text}\""
end
Then /^I should save and open the page$/ do
save_and_open_page
end