2010-11-26 10:44:08 +01:00
|
|
|
Given /this is a pending scenario/ do
|
|
|
|
|
pending
|
|
|
|
|
end
|
|
|
|
|
|
2010-01-13 21:52:04 +01:00
|
|
|
Then /the badge should show (.*)/ do |number|
|
2009-08-05 16:28:06 +02:00
|
|
|
badge = -1
|
2010-02-06 22:36:13 +01:00
|
|
|
xpath= "//span[@id='badge_count']"
|
|
|
|
|
|
2010-04-10 15:31:28 -04:00
|
|
|
if response.respond_to? :selenium
|
2010-02-06 22:36:13 +01:00
|
|
|
response.should have_xpath(xpath)
|
|
|
|
|
badge = response.selenium.get_text("xpath=#{xpath}").to_i
|
|
|
|
|
else
|
|
|
|
|
response.should have_xpath(xpath) do |node|
|
|
|
|
|
badge = node.first.content.to_i
|
|
|
|
|
end
|
2009-08-05 16:28:06 +02:00
|
|
|
end
|
2010-02-06 22:36:13 +01:00
|
|
|
|
2009-08-05 16:28:06 +02:00
|
|
|
badge.should == number.to_i
|
|
|
|
|
end
|
2011-02-26 11:38:39 +01:00
|
|
|
|
|
|
|
|
Given /^I am working on the mobile interface$/ do
|
|
|
|
|
@mobile_interface = true
|
|
|
|
|
end
|