In tests, activate menus by JS instead of click

This commit is contained in:
Dan Rice 2014-09-10 11:16:22 -04:00
parent 1f95d7277a
commit ddc7cb8e3c

View file

@ -103,12 +103,11 @@ module TracksStepHelper
end end
def open_submenu_for(todo) def open_submenu_for(todo)
submenu_arrow = "div#line_todo_#{todo.id} img.todo-submenu" submenu_css = "div#line_todo_#{todo.id} ul#ultodo_#{todo.id}"
page.should have_css(submenu_arrow, :visible=>true)
execute_javascript "$('#{submenu_css}').parent().showSuperfishUl()"
page.find(submenu_arrow).click
page.should have_css(submenu_css, :visible => true)
page.should have_css("div#line_todo_#{todo.id} ul#ultodo_#{todo.id}", :visible => true)
end end
def context_list_find_index(context_name) def context_list_find_index(context_name)
@ -170,4 +169,4 @@ module TracksStepHelper
end end
World(TracksStepHelper) World(TracksStepHelper)