Sha256: a9391259e41590607b187e861ef6696f22215c01e2c6b183a115e88cbc3c69ab

Contents?: true

Size: 328 Bytes

Versions: 19

Compression:

Stored size: 328 Bytes

Contents

module AjaxHelpers
  def wait_for_ajax
    Timeout.timeout(Capybara.default_max_wait_time) do
      loop until finished_all_ajax_requests?
    end
  end

  def finished_all_ajax_requests?
    if page.driver.is_a? Capybara::RackTest::Driver
      true
    else
      page.evaluate_script("jQuery.active").zero?
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc11 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.rc10 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.rc9 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.rc8 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.rc7 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.rc6 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.rc5 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.rc4 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.rc3 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.rc1 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.beta12 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.beta11 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.beta10 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.beta9 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.beta8 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.beta7 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.beta6 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.beta5 lib/test_support/ajax_helpers.rb
renalware-core-2.0.0.pre.beta4 lib/test_support/ajax_helpers.rb