diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 494608b5..8eafc567 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -122,7 +122,7 @@ module TodosHelper :title => 'Drag onto another action to make it depend on that action', :class => 'grip') + image_tag('blank.png', :width => 16, :height => 16, :border => 0, - :id => "successor_target_#{@todo.id}", :title => "Drop an action to make it depend on this action", :class => 'successor_target') + :title => "Drop an action to make it depend on this action", :class => 'successor_target') end end diff --git a/features/step_definitions/todo_steps.rb b/features/step_definitions/todo_steps.rb index 82d73cdd..b2bd9d24 100644 --- a/features/step_definitions/todo_steps.rb +++ b/features/step_definitions/todo_steps.rb @@ -37,11 +37,13 @@ When /^I drag "(.*)" to "(.*)"$/ do |dragged, target| drag_id = Todo.find_by_description(dragged).id drop_id = Todo.find_by_description(target).id drag_name = "xpath=//div[@id='line_todo_#{drag_id}']//img[@class='grip']" - drop_name = "xpath=//div[@id='line_todo_#{drop_id}']//img[@id='successor_target_#{drop_id}']" + # xpath does not seem to work here... reverting to css + # xpath=//div[@id='line_todo_#{drop_id}']//img[@class='successor_target'] + drop_name = "css=div#line_todo_#{drop_id} img.successor_target" - # the target img is hidden until drag starts. We need to show the img or the + # HACK: the target img is hidden until drag starts. We need to show the img or the # xpath will not find it - js="$('img#successor_target_#{drop_id}').show();" + js="$('div#line_todo_#{drop_id} img.successor_target').show();" selenium.get_eval "(function() {with(this) {#{js}}}).call(selenium.browserbot.getCurrentWindow());" selenium.drag_and_drop_to_object(drag_name, drop_name)