2010-11-26 10:44:08 +01:00
|
|
|
Given /this is a pending scenario/ do
|
|
|
|
|
pending
|
|
|
|
|
end
|
|
|
|
|
|
2011-06-26 23:05:33 +02:00
|
|
|
Given /^I set the locale to "([^"]*)"$/ do |locale|
|
|
|
|
|
@locale = locale
|
|
|
|
|
end
|
|
|
|
|
|
2011-03-08 23:28:48 +01:00
|
|
|
Given /^I am working on the mobile interface$/ do
|
|
|
|
|
@mobile_interface = true
|
|
|
|
|
end
|
|
|
|
|
|
2010-01-13 21:52:04 +01:00
|
|
|
Then /the badge should show (.*)/ do |number|
|
2012-01-30 03:42:47 +01:00
|
|
|
badge = find("span#badge_count").text.to_i
|
2009-08-05 16:28:06 +02:00
|
|
|
badge.should == number.to_i
|
|
|
|
|
end
|
2011-02-26 11:38:39 +01:00
|
|
|
|
2011-03-11 21:01:24 +01:00
|
|
|
Then /^I should see an error flash message saying "([^"]*)"$/ do |message|
|
|
|
|
|
xpath = "//div[@id='message_holder']/h4[@id='flash']"
|
2012-03-21 19:33:06 +01:00
|
|
|
page.should have_xpath(xpath, :visible => true)
|
|
|
|
|
|
2012-02-03 15:57:23 +01:00
|
|
|
text = page.find(:xpath, xpath).text
|
2011-03-11 21:01:24 +01:00
|
|
|
text.should == message
|
|
|
|
|
end
|
2011-07-09 14:53:37 +02:00
|
|
|
|
|
|
|
|
Then /^I should see "([^"]*)" $/ do |text|
|
2012-03-12 22:52:45 +01:00
|
|
|
step "I should see \"#{text}\""
|
2011-07-09 14:53:37 +02:00
|
|
|
end
|
|
|
|
|
|
2012-03-01 20:31:16 +01:00
|
|
|
Then /^I should save and open the page$/ do
|
|
|
|
|
save_and_open_page
|
|
|
|
|
end
|