From 92bb54bbf572983aef2a57272fba688fbcc5542c Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Sun, 9 May 2010 18:59:02 -0400 Subject: [PATCH] Revert "fix cucumber story for drag and drop for dependencies. Was broken since last change of drop target to a hidden img that appears when dragging starts" This reverts commit 8dbf790810e8f2b91e6f20d3897d9f32fb801ef7. Conflicts: app/helpers/todos_helper.rb features/step_definitions/todo_steps.rb --- features/step_definitions/todo_steps.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/features/step_definitions/todo_steps.rb b/features/step_definitions/todo_steps.rb index b2bd9d24..54fec93c 100644 --- a/features/step_definitions/todo_steps.rb +++ b/features/step_definitions/todo_steps.rb @@ -37,15 +37,8 @@ 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']" - # 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" - - # HACK: the target img is hidden until drag starts. We need to show the img or the - # xpath will not find it - js="$('div#line_todo_#{drop_id} img.successor_target').show();" - selenium.get_eval "(function() {with(this) {#{js}}}).call(selenium.browserbot.getCurrentWindow());" - + drop_name = "xpath=//div[@id='line_todo_#{drop_id}']//div[@class='description']" + selenium.drag_and_drop_to_object(drag_name, drop_name) arrow = "xpath=//div[@id='line_todo_#{drop_id}']/div/a[@class='show_successors']/img"