ae_page_objects 4.3.0 → 4.4.0.pre.rc.1
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.rb +5 -4
- data/lib/ae_page_objects/util/wait_time_manager.rb +2 -2
- data/lib/ae_page_objects/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a81fd3e14e49322c4e0ca92ce91305800f7edde065a25f78776cadbeb1192de9
|
4
|
+
data.tar.gz: 3bacbc5553b90bc2e43ffec38a2d2f4de72544f0ec0c3932df0f0901852877e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b01d530f561624b31f84d6cd50c79380c553e08df964c34cd2316ee2923b913853f3eb69f5dfbb446ef77ab81f6b515b31739dab4615fd452b60d0e735fe939
|
7
|
+
data.tar.gz: c6495b4e601622233ce5f9bed97612fb51cd37a0db4d9c577637c3babad5caec4418a5ab1d26f8b75c3061200d1d5a51fd181af99f66c43534d4267ec87dd488
|
data/lib/ae_page_objects.rb
CHANGED
@@ -16,7 +16,7 @@ module AePageObjects
|
|
16
16
|
autoload :Checkbox, 'ae_page_objects/elements/checkbox'
|
17
17
|
|
18
18
|
class << self
|
19
|
-
attr_accessor :default_router
|
19
|
+
attr_accessor :default_router, :time_keeper
|
20
20
|
|
21
21
|
def browser
|
22
22
|
@browser ||= begin
|
@@ -45,7 +45,7 @@ module AePageObjects
|
|
45
45
|
result = call_wait_until_block(error_message, &block)
|
46
46
|
else
|
47
47
|
seconds_to_wait ||= default_max_wait_time
|
48
|
-
start_time =
|
48
|
+
start_time = AePageObjects.time_keeper.now
|
49
49
|
|
50
50
|
# In an effort to avoid flakiness, Capybara waits, rescues errors, reloads nodes, and
|
51
51
|
# retries.
|
@@ -71,7 +71,7 @@ module AePageObjects
|
|
71
71
|
errors += [WaitTimeoutError]
|
72
72
|
raise e unless errors.include?(e.class)
|
73
73
|
|
74
|
-
delay = seconds_to_wait - (
|
74
|
+
delay = seconds_to_wait - (AePageObjects.time_keeper.now - start_time)
|
75
75
|
|
76
76
|
if delay <= 0
|
77
77
|
# Raising the WaitTimeoutError in the rescue block ensures that Ruby attaches
|
@@ -80,7 +80,7 @@ module AePageObjects
|
|
80
80
|
end
|
81
81
|
|
82
82
|
sleep(0.05)
|
83
|
-
raise FrozenInTime, "Time appears to be frozen" if
|
83
|
+
raise FrozenInTime, "Time appears to be frozen" if AePageObjects.time_keeper.now == start_time
|
84
84
|
|
85
85
|
retry
|
86
86
|
end
|
@@ -106,3 +106,4 @@ end
|
|
106
106
|
|
107
107
|
require 'ae_page_objects/core/basic_router'
|
108
108
|
AePageObjects.default_router = AePageObjects::BasicRouter.new
|
109
|
+
AePageObjects.time_keeper = Time
|
@@ -6,13 +6,13 @@ module AePageObjects
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def using_wait_time
|
9
|
-
start_time =
|
9
|
+
start_time = AePageObjects.time_keeper.now
|
10
10
|
@wait_time = [@wait_time, @max_time].min
|
11
11
|
Capybara.using_wait_time(@wait_time) do
|
12
12
|
yield
|
13
13
|
end
|
14
14
|
ensure
|
15
|
-
if
|
15
|
+
if AePageObjects.time_keeper.now - start_time > @wait_time
|
16
16
|
@wait_time *= 2
|
17
17
|
end
|
18
18
|
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: 4.
|
4
|
+
version: 4.4.0.pre.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AppFolio Engineering
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -64,7 +64,7 @@ homepage: http://github.com/appfolio/ae_page_objects
|
|
64
64
|
licenses:
|
65
65
|
- MIT
|
66
66
|
metadata: {}
|
67
|
-
post_install_message:
|
67
|
+
post_install_message:
|
68
68
|
rdoc_options: []
|
69
69
|
require_paths:
|
70
70
|
- lib
|
@@ -75,12 +75,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
75
|
version: 2.2.5
|
76
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- - "
|
78
|
+
- - ">"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
80
|
+
version: 1.3.1
|
81
81
|
requirements: []
|
82
82
|
rubygems_version: 3.1.2
|
83
|
-
signing_key:
|
83
|
+
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Capybara Page Objects pattern
|
86
86
|
test_files: []
|