From 80ed0d2cefa8c49ad2625f2dcf08d3184b3751ba Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Sat, 4 May 2013 14:12:00 +0200 Subject: [PATCH] fix failing scenario caused by different aasm semantics also switch to css selector to hopefully fix the failure on travis --- features/step_definitions/container_steps.rb | 4 ++-- features/step_definitions/todo_create_steps.rb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/features/step_definitions/container_steps.rb b/features/step_definitions/container_steps.rb index 14717e52..9c430cc4 100644 --- a/features/step_definitions/container_steps.rb +++ b/features/step_definitions/container_steps.rb @@ -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 ####### diff --git a/features/step_definitions/todo_create_steps.rb b/features/step_definitions/todo_create_steps.rb index ef4562dd..5b5f93c7 100644 --- a/features/step_definitions/todo_create_steps.rb +++ b/features/step_definitions/todo_create_steps.rb @@ -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