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-08 23:28:48 +01:00
|
|
|
Then /^I should see the empty message in the deferred container$/ do
|
|
|
|
|
wait_for :timeout => 5 do
|
|
|
|
|
selenium.is_visible("xpath=//div[@id='tickler']//div[@id='tickler-empty-nd']")
|
|
|
|
|
end
|
2011-02-26 11:38:39 +01:00
|
|
|
end
|
2011-03-09 10:53:54 +01:00
|
|
|
|
2011-05-08 22:09:27 +02:00
|
|
|
Then /^I should see the empty tickler message$/ do
|
|
|
|
|
wait_for :timeout => 5 do
|
|
|
|
|
selenium.is_visible("xpath=//div[@id='tickler-empty-nd']")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Then /^I should not see the empty tickler message$/ do
|
|
|
|
|
wait_for :timeout => 5 do
|
|
|
|
|
!selenium.is_visible("xpath=//div[@id='tickler-empty-nd']")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
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']"
|
|
|
|
|
text = response.selenium.get_text("xpath=#{xpath}")
|
|
|
|
|
text.should == message
|
|
|
|
|
end
|
2011-07-09 14:53:37 +02:00
|
|
|
|
|
|
|
|
Then /^I should see "([^"]*)" $/ do |text|
|
|
|
|
|
Then "I should see \"#{text}\""
|
|
|
|
|
end
|
|
|
|
|
|