Skip to content

Commit

Permalink
In tests, activate menus by JS instead of click
Browse files Browse the repository at this point in the history
  • Loading branch information
dnrce committed Sep 10, 2014
1 parent 1f95d72 commit ddc7cb8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions features/support/world.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,11 @@ def edit_project_settings(project)
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)
Expand Down Expand Up @@ -170,4 +169,4 @@ def get_confirm_text

end

World(TracksStepHelper)
World(TracksStepHelper)

0 comments on commit ddc7cb8

Please sign in to comment.