fix #1121 and add tests for this

This commit is contained in:
Reinier Balt 2011-03-10 16:50:19 +01:00
parent 3711acb6ab
commit b02bb3fdde
7 changed files with 70 additions and 13 deletions

View file

@ -37,8 +37,13 @@ module TracksStepHelper
end
def open_edit_form_for(todo)
# click edit
selenium.click("//div[@id='line_todo_#{todo.id}']//img[@id='edit_icon_todo_#{todo.id}']", :wait_for => :ajax, :javascript_framework => :jquery)
edit_button = "xpath=//div[@id='line_todo_#{todo.id}']//img[@id='edit_icon_todo_#{todo.id}']"
wait_for :timeout => 5 do
selenium.is_element_present(edit_button)
end
selenium.click(edit_button, :wait_for => :ajax, :javascript_framework => :jquery)
end
def wait_for_ajax