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