Clean up manual timeouts in feature tests

This commit is contained in:
Dan Rice 2014-09-09 22:52:45 -04:00
parent ab7081482e
commit 4830cc028a
5 changed files with 16 additions and 44 deletions

View file

@ -138,9 +138,7 @@ When /^I clear the due date of "([^"]*)"$/ do |action_description|
# de same todo more than once
within all("div#edit_todo_#{todo.id}")[0] do
find("a#due_x_todo_#{todo.id}").click
wait_until do
find("input#due_todo_#{todo.id}").value == ""
end
expect(page).to have_field("due_todo_#{todo.id}", with: "")
end
submit_edit_todo_form(todo)
end
@ -208,4 +206,4 @@ end
Then /^I should see an error message$/ do
error_block = "//form/div[@id='edit_error_status']"
expect(page).to have_xpath(error_block)
end
end