Reduce spurious cucumber failures by turning off jquery effects with drag & drop, and increasing timeout when waiting for ajax callbacks to complete.
This commit is contained in:
parent
0c58d9814b
commit
9411ba31b0
2 changed files with 6 additions and 1 deletions
|
|
@ -41,5 +41,9 @@ When /^I wait for the request's profile page to load$/ do
|
|||
end
|
||||
|
||||
When /^I wait for the ajax to finish$/ do
|
||||
wait_until { evaluate_script("$.active") == 0 }
|
||||
wait_until(10) { evaluate_script("$.active") == 0 }
|
||||
end
|
||||
|
||||
When /^I have turned off jQuery effects$/ do
|
||||
evaluate_script("$.fx.off = true")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ Then /^I should see (\d+) contact(?:s)? in "([^"]*)"$/ do |contact_count, aspect
|
|||
end
|
||||
|
||||
When /^I drag the contact request to the "([^"]*)" aspect$/ do |aspect_name|
|
||||
Given "I have turned off jQuery effects"
|
||||
aspect = @me.reload.aspects.find_by_name(aspect_name)
|
||||
aspect_div = find("ul.dropzone[data-aspect_id='#{aspect.id}']")
|
||||
request_li = find(".person.request.ui-draggable")
|
||||
|
|
|
|||
Loading…
Reference in a new issue