fix failing scenario caused by different aasm semantics

also switch to css selector to hopefully fix the failure on travis
This commit is contained in:
Reinier Balt 2013-05-04 14:12:00 +02:00
parent 89cdfbc606
commit 80ed0d2cef
2 changed files with 3 additions and 2 deletions

View file

@ -90,8 +90,8 @@ Then(/^I should (not see|see) "([^"]*)" in the (completed|done today|done this w
id = 'completed_rest_of_week_container' if container == 'done this week'
id = 'completed_rest_of_month_container' if container == 'done this month'
xpath = "//div[@id='#{id}']//div[@id='line_todo_#{find_todo(todo_description).id}']"
check_xpath_visibility(visible, xpath)
css = "div##{id} div#line_todo_#{find_todo(todo_description).id}"
check_css_visibility(visible, css)
end
####### Hidden #######

View file

@ -200,6 +200,7 @@ Given /^I have a project "([^"]*)" that has the following (todos|deferred todos)
new_todo.show_from = Time.zone.now+1.week if kind_of_todo=="deferred todos"
new_todo.tag_with(todo[:tags]) unless todo[:tags].nil?
new_todo.complete! if !todo[:completed].nil? && todo[:completed] == 'yes'
new_todo.save!
end
end