Sha256: 7baf98d19476d59c4c5bbda1adb2a23deca40a51505992c58e872ce26eaa8b3f

Contents?: true

Size: 323 Bytes

Versions: 39

Compression:

Stored size: 323 Bytes

Contents

module WaitForAjax
  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?
    page.evaluate_script('jQuery.active').zero?
  end
end

RSpec.configure do |config|
  config.include WaitForAjax, type: :feature
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
symphonia-3.3.2 spec/support/wait_for_ajax.rb
symphonia-3.3.0 spec/support/wait_for_ajax.rb
symphonia-3.2.4 spec/support/wait_for_ajax.rb
symphonia-3.2.3 spec/support/wait_for_ajax.rb
symphonia-3.2.2 spec/support/wait_for_ajax.rb
symphonia-3.2.1 spec/support/wait_for_ajax.rb
symphonia-3.1.5 spec/support/wait_for_ajax.rb
symphonia-3.1.4 spec/support/wait_for_ajax.rb
symphonia-3.1.3 spec/support/wait_for_ajax.rb
symphonia-3.1.2 spec/support/wait_for_ajax.rb
symphonia-3.1.1 spec/support/wait_for_ajax.rb
symphonia-3.1.0 spec/support/wait_for_ajax.rb
symphonia-3.0.3 spec/support/wait_for_ajax.rb
symphonia-3.0.2 spec/support/wait_for_ajax.rb
symphonia-2.2.1 spec/support/wait_for_ajax.rb
symphonia-3.0.1 spec/support/wait_for_ajax.rb
symphonia-3.0.0 spec/support/wait_for_ajax.rb
symphonia-2.1.8 spec/support/wait_for_ajax.rb
symphonia-2.1.7 spec/support/wait_for_ajax.rb