mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +01:00
15 lines
376 B
Ruby
15 lines
376 B
Ruby
Then /the badge should show (.*)/ do |number|
|
|
badge = -1
|
|
xpath= "//span[@id='badge_count']"
|
|
|
|
if response.respond_to? :selenium
|
|
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
|
|
end
|
|
|
|
badge.should == number.to_i
|
|
end
|