From 30c578f93a2ae2dd83677c8cce7b57777b4345cd Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Thu, 11 Aug 2011 10:13:53 +0200 Subject: [PATCH] fix failing selenium scenarios because of starring changes --- features/step_definitions/recurring_todo_steps.rb | 2 +- features/step_definitions/todo_steps.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/features/step_definitions/recurring_todo_steps.rb b/features/step_definitions/recurring_todo_steps.rb index 6b556677..48a0a864 100644 --- a/features/step_definitions/recurring_todo_steps.rb +++ b/features/step_definitions/recurring_todo_steps.rb @@ -93,7 +93,7 @@ end Then /^the pattern "([^\"]*)" should be starred$/ do |pattern_name| pattern = @current_user.recurring_todos.find_by_description(pattern_name) pattern.should_not be_nil - xpath = "//div[@id='recurring_todo_#{pattern.id}']//img[@class='starred_todo']" + xpath = "//div[@id='recurring_todo_#{pattern.id}']//img[@class='todo_star starred']" response.should have_xpath(xpath) end diff --git a/features/step_definitions/todo_steps.rb b/features/step_definitions/todo_steps.rb index f77d41c8..d91f9eb1 100644 --- a/features/step_definitions/todo_steps.rb +++ b/features/step_definitions/todo_steps.rb @@ -180,8 +180,8 @@ When /^I star the action "([^"]*)"$/ do |action_description| todo = @current_user.todos.find_by_description(action_description) todo.should_not be_nil - xpath_unstarred = "//div[@id='line_todo_#{todo.id}']//img[@class='unstarred_todo']" - xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='starred_todo']" + xpath_unstarred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star']" + xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star starred']" selenium.is_element_present(xpath_unstarred).should be_true @@ -197,8 +197,8 @@ When /^I unstar the action "([^"]*)"$/ do |action_description| todo = @current_user.todos.find_by_description(action_description) todo.should_not be_nil - xpath_unstarred = "//div[@id='line_todo_#{todo.id}']//img[@class='unstarred_todo']" - xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='starred_todo']" + xpath_unstarred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star']" + xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star starred']" selenium.is_element_present(xpath_starred).should be_true @@ -215,7 +215,7 @@ Then /^I should see a starred "([^"]*)"$/ do |action_description| todo = @current_user.todos.find_by_description(action_description) todo.should_not be_nil - xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='starred_todo']" + xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star starred']" selenium.is_element_present(xpath_starred).should be_true end @@ -224,7 +224,7 @@ Then /^I should see an unstarred "([^"]*)"$/ do |action_description| todo = @current_user.todos.find_by_description(action_description) todo.should_not be_nil - xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='unstarred_todo']" + xpath_starred = "//div[@id='line_todo_#{todo.id}']//img[@class='todo_star']" wait_for :timeout => 5 do selenium.is_element_present(xpath_starred)