spreewald 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -497,3 +497,10 @@ deprecation notice. Decide for yourself whether you want to use them:
497
497
 
498
498
  Tests that a field with the given label is visible.
499
499
 
500
+
501
+ * **When I wait for the page to load**
502
+
503
+ Waits for the page to finish loading and AJAX requests to finish.
504
+
505
+ More details [here](https://makandracards.com/makandra/12139-waiting-for-page-loads-and-ajax-requests-to-finish-with-capybara).
506
+
@@ -559,3 +559,12 @@ Then /^the "([^\"]*)" field should( not)? be visible$/ do |label, negate|
559
559
  end
560
560
  end
561
561
 
562
+ # Waits for the page to finish loading and AJAX requests to finish.
563
+ #
564
+ # More details [here](https://makandracards.com/makandra/12139-waiting-for-page-loads-and-ajax-requests-to-finish-with-capybara).
565
+ When /^I wait for the page to load$/ do
566
+ if [:selenium, :webkit, :poltergeist].include?(Capybara.current_driver)
567
+ wait_until { page.evaluate_script('$.active') == 0 }
568
+ end
569
+ page.has_content? ''
570
+ end
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module Spreewald
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreewald
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tobias Kraze