upgrade last of the project functions

This commit is contained in:
Reinier Balt 2010-10-22 11:55:54 +02:00
parent 2c47b27a87
commit d7a780ef0c
8 changed files with 20 additions and 18 deletions

View file

@ -73,7 +73,10 @@ Then /^I should see ([0-9]+) todos$/ do |count|
end
When /I change the (.*) field of "([^\"]*)" to "([^\"]*)"$/ do |field, todo_name, new_value|
selenium.click("//span[@class=\"todo.descr\"][.=\"#{todo_name}\"]/../../a[@class=\"icon edit_item\"]", :wait_for => :ajax, :javascript_framework => :jquery)
todo = @current_user.todos.find_by_description(todo_name)
todo.should_not be_nil
selenium.click("//img[@id='edit_icon_todo_#{todo.id}']", :wait_for => :ajax, :javascript_framework => :jquery)
selenium.type("css=form.edit_todo_form input[name=#{field}]", new_value)
selenium.click("css=button.positive", :wait_for => :ajax, :javascript_framework => :jquery)
sleep(5)