spreewald 1.2.12 → 1.2.13
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be55354f05cdab6f79c35d3168a71a85e23a3cd0
|
4
|
+
data.tar.gz: 608bf81f6b1e19e960f0b8cab16b9bb6c35d779b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22e1905d359a5b1b86d892e032c39bf2814fd52fb98e00df5a11658106d3df6480e103556d92fe7f03deb839dd3ba6a050ea87cee7a28483604adc574461b0e4
|
7
|
+
data.tar.gz: 585a0bd2e1c25af6609e360f0e16c2d499a39631d029a1341e8f450cdb70aa671eff2b11c90769a00b5b80491b2b44791726af52140bd8313963f6dbb89d290c
|
@@ -16,11 +16,29 @@ module ToleranceForSeleniumSyncIssues
|
|
16
16
|
Selenium::WebDriver::Error::JavascriptError
|
17
17
|
]
|
18
18
|
|
19
|
+
class CapybaraWrapper
|
20
|
+
def self.default_max_wait_time
|
21
|
+
if Capybara.respond_to?(:default_max_wait_time)
|
22
|
+
Capybara.default_max_wait_time
|
23
|
+
else
|
24
|
+
Capybara.default_wait_time
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.default_max_wait_time=(value)
|
29
|
+
if Capybara.respond_to?(:default_max_wait_time=)
|
30
|
+
Capybara.default_max_wait_time = value
|
31
|
+
else
|
32
|
+
Capybara.default_wait_time = value
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
19
37
|
# This is similiar but not entirely the same as Capybara::Node::Base#wait_until or Capybara::Session#wait_until
|
20
|
-
def patiently(seconds=
|
21
|
-
old_wait_time =
|
38
|
+
def patiently(seconds = CapybaraWrapper.default_max_wait_time, &block)
|
39
|
+
old_wait_time = CapybaraWrapper.default_max_wait_time
|
22
40
|
# dont make nested wait_untils use up all the alloted time
|
23
|
-
|
41
|
+
CapybaraWrapper.default_max_wait_time = 0 # for we are a jealous gem
|
24
42
|
if page.driver.wait?
|
25
43
|
start_time = Time.now
|
26
44
|
begin
|
@@ -36,7 +54,7 @@ module ToleranceForSeleniumSyncIssues
|
|
36
54
|
block.call
|
37
55
|
end
|
38
56
|
ensure
|
39
|
-
|
57
|
+
CapybaraWrapper.default_max_wait_time = old_wait_time
|
40
58
|
end
|
41
59
|
end
|
42
60
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreewald
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-rails
|