diff --git a/test/selenium/dependencies/assign_dependency.rsel b/test/selenium/dependencies/assign_dependency.rsel new file mode 100644 index 00000000..4310b4b4 --- /dev/null +++ b/test/selenium/dependencies/assign_dependency.rsel @@ -0,0 +1,8 @@ +setup :fixtures => :all +login :as => 'admin' +open "/" +drag_todo_to 18, 9 +wait_for_visible 'css=#todo_9 a.show_successors img' +click 'css=#todo_9 a.show_successors img' +assert_visible 'successors_todo_9' +assert_visible 'css=#successors_todo_9 #successor_todo_18' diff --git a/test/selenium_helper.rb b/test/selenium_helper.rb index a224ec57..340af422 100644 --- a/test/selenium_helper.rb +++ b/test/selenium_helper.rb @@ -44,6 +44,13 @@ module SeleniumOnRails::TestBuilderAccessors command command_name, expected_count end end + + def drag_todo_to(id1, id2) + mouse_down_at "css=#line_todo_#{id1} img.grip", "4,4" + mouse_move_at "line_todo_#{id2}", '20,3' + mouse_over "line_todo_#{id2}" + mouse_up_at "line_todo_#{id2}", '20,3' + end def assert_context_count_incremented(&block) store_context_count 'initial_context_count'