ae_page_objects 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ae_page_objects/util/waiter.rb +14 -6
- data/lib/ae_page_objects/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a18e3851747da830279cb221c6e8396be49bd7f
|
4
|
+
data.tar.gz: d928b79a0cf1c1803fe6fe5dfaa11bdf09be89da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3c1e84440a35294ddb0b75e980c604e76f79bfdc79161cbd37808afa0c59e35ba43d6024c2babe4e4cd5f24584787c2d610d1225ede69dc1ff567f95f28d0bb
|
7
|
+
data.tar.gz: de8501df5e1f010dc72ef281fbc5038fca1cf683b8ba61c3c62b84585537afbe8811ac2cfdf8e4a6d0147d91a6a068b2e8deaeb589568a03e1609bebc1905588
|
@@ -1,12 +1,20 @@
|
|
1
1
|
module AePageObjects
|
2
2
|
module Waiter
|
3
3
|
def self.wait_for(&block)
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
seconds_to_wait = Capybara.default_wait_time
|
5
|
+
start_time = Time.now
|
6
|
+
|
7
|
+
until result = Capybara.using_wait_time(0, &block)
|
8
|
+
delay = seconds_to_wait - (Time.now - start_time)
|
9
|
+
|
10
|
+
if delay <= 0
|
11
|
+
return false
|
12
|
+
end
|
13
|
+
|
14
|
+
sleep(0.05)
|
7
15
|
end
|
8
|
-
|
9
|
-
|
16
|
+
|
17
|
+
result
|
10
18
|
end
|
11
19
|
end
|
12
|
-
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ae_page_objects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donnie Tognazzini
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|