Sha256: 9790ebbd3ca6dd9bbda5ad0fa9fcc91b24fe780ba62d66e9777f23629009653d

Contents?: true

Size: 218 Bytes

Versions: 57

Compression:

Stored size: 218 Bytes

Contents

module WaitForAjax
  def wait_for_ajax
    Timeout.timeout(20) do
      loop until finished_all_ajax_requests?
    end
  end

  def finished_all_ajax_requests?
    page.evaluate_script('jQuery.active').zero?
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
wordjelly-auth-1.6.0 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.9 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.8 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.7 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.6 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.5 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.4 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.3 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.2 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.1 spec/support/wait_for_ajax.rb
wordjelly-auth-1.5.0 spec/support/wait_for_ajax.rb
wordjelly-auth-1.4.9 spec/support/wait_for_ajax.rb
wordjelly-auth-1.4.8 spec/support/wait_for_ajax.rb
wordjelly-auth-1.4.7 spec/support/wait_for_ajax.rb
wordjelly-auth-1.4.6 spec/support/wait_for_ajax.rb
wordjelly-auth-1.4.5 spec/support/wait_for_ajax.rb
wordjelly-auth-1.4.4 spec/support/wait_for_ajax.rb
wordjelly-auth-1.4.3 spec/support/wait_for_ajax.rb
wordjelly-auth-1.4.2 spec/support/wait_for_ajax.rb
wordjelly-auth-1.4.0 spec/support/wait_for_ajax.rb