mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
try fixing timing issue of tagging scenario
This commit is contained in:
parent
a987ff3727
commit
b57c63abdb
2 changed files with 4 additions and 7 deletions
|
|
@ -64,14 +64,14 @@ end
|
|||
####### Editing a todo using Edit Form #######
|
||||
|
||||
When /I change the (.*) field of "([^\"]*)" to "([^\"]*)"$/ do |field_name, todo_name, new_value|
|
||||
todo = @current_user.todos.where(:description => todo_name).first
|
||||
todo.should_not be_nil
|
||||
todo = find_todo(todo_name)
|
||||
|
||||
open_edit_form_for(todo)
|
||||
within "form.edit_todo_form" do
|
||||
fill_in "#{field_name}", :with => new_value
|
||||
# force blur event
|
||||
page.execute_script("$('form.edit_todo_form input.#{field_name}_todo_#{todo.id}').blur();")
|
||||
execute_javascript("$('form.edit_todo_form input.#{field_name}_todo_#{todo.id}').blur();")
|
||||
sleep 0.10
|
||||
end
|
||||
submit_edit_todo_form(todo)
|
||||
wait_for_ajax
|
||||
|
|
|
|||
|
|
@ -138,10 +138,7 @@ Then /^the tag field in the new todo form should be "([^"]*)"$/ do |tag_list|
|
|||
end
|
||||
|
||||
Then /^the tags of "([^"]*)" should be "([^"]*)"$/ do |todo_description, tag_list|
|
||||
todo = @current_user.todos.where(:description => todo_description).first
|
||||
todo.should_not be_nil
|
||||
|
||||
todo.tag_list.should == tag_list
|
||||
find_todo(todo_description).tag_list.should == tag_list
|
||||
end
|
||||
|
||||
Then /^I should see "([^"]*)" in the completed section of the mobile site$/ do |desc|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue