mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-25 16:44:09 +01:00
upgrade last of the project functions
This commit is contained in:
parent
2c47b27a87
commit
d7a780ef0c
8 changed files with 20 additions and 18 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue