mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-10 03:08:50 +01:00
get all selenium features to run and fix the badge update for notes
This commit is contained in:
parent
c9566047fc
commit
e1c693dfdc
4 changed files with 21 additions and 71 deletions
|
|
@ -1,8 +1,16 @@
|
|||
Then /the badge should show (.*)/ do |number|
|
||||
# puts response.body.inspect
|
||||
badge = -1
|
||||
response.should have_xpath("//span[@id='badge_count']") do |node|
|
||||
badge = node.first.content.to_i
|
||||
xpath= "//span[@id='badge_count']"
|
||||
|
||||
if Rails.env == '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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue