ae_page_objects 4.0.1 → 4.1.0.pre1
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/document.rb +19 -1
- data/lib/ae_page_objects/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecd6bbce068b3386caeb99e57ce81897cc4e27f2
|
4
|
+
data.tar.gz: 3a1b79f9613d77a54ac07b21fa0ed564d29b9b20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7879a5acb6e944f3187232aebe1d6d351cb6b1ac24d70731979ebc699b5d3be7a73e31454595f14df69d3d28866be873a181b28fe5be0891b27a66c1eb803a99
|
7
|
+
data.tar.gz: 8d66e7e832f1af7184023096451a96e24903fcfafacf670d4df4d0c4bc717cf2d915056cda5913d36df3a15ce8af3ad9750eb86a6224981e3e041a7f68383857
|
@@ -32,7 +32,25 @@ module AePageObjects
|
|
32
32
|
full_path = router.generate_path(path, *args)
|
33
33
|
raise PathNotResolvable, "#{self.name} not visitable via #{paths.first}(#{args.inspect})" unless full_path
|
34
34
|
|
35
|
-
|
35
|
+
load_retries = 0
|
36
|
+
begin
|
37
|
+
Capybara.current_session.visit(full_path)
|
38
|
+
rescue Net::ReadTimeout
|
39
|
+
# A Net::ReadTimeout can occur when the current session was already in the progress of loading
|
40
|
+
# a page. This is fairly common and happens in situations like below:
|
41
|
+
# 1. the test performs an action that causes the page to reload
|
42
|
+
# 2. an assertion is made on the new page
|
43
|
+
# 3. the test then loads a different page
|
44
|
+
# Its possible for the assertion in #2 above to happen before the page is fully loaded, in which
|
45
|
+
# case the page load in #3 can fail with Net::ReadTimeout.
|
46
|
+
# In this situation the easiest thing to do is to retry
|
47
|
+
if load_retries < 3
|
48
|
+
load_retries += 1
|
49
|
+
retry
|
50
|
+
else
|
51
|
+
raise
|
52
|
+
end
|
53
|
+
end
|
36
54
|
|
37
55
|
new
|
38
56
|
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.0.
|
4
|
+
version: 4.1.0.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AppFolio Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -75,9 +75,9 @@ 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
|
rubyforge_project:
|
83
83
|
rubygems_version: 2.5.2
|