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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db1d397fb998ff6d6fce4f99c5c23903023dd1f6
4
- data.tar.gz: 8adbae2a2d9c88068b591e901e46568a872fbfa0
3
+ metadata.gz: ecd6bbce068b3386caeb99e57ce81897cc4e27f2
4
+ data.tar.gz: 3a1b79f9613d77a54ac07b21fa0ed564d29b9b20
5
5
  SHA512:
6
- metadata.gz: 7dce44727da3a23632fc2d796a8aca93cb560ef9d6cceff31b7b22b14bb919644d09add3d41f61c0d904605c9c26fa7d773bd213f0a9b5489946ebcd302bb14a
7
- data.tar.gz: 80be52c061e4fb9e3c23e03e0b681ae65d262569ca76a19d60bab6e2e70c5f2359ad20c86ff7cbff46a7b347681cdb1459272ef87ac6870469ccb5fdc4968c07
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
- Capybara.current_session.visit(full_path)
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
@@ -1,3 +1,3 @@
1
1
  module AePageObjects
2
- VERSION = '4.0.1'.freeze
2
+ VERSION = '4.1.0.pre1'.freeze
3
3
  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.1
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-07 00:00:00.000000000 Z
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: '0'
80
+ version: 1.3.1
81
81
  requirements: []
82
82
  rubyforge_project:
83
83
  rubygems_version: 2.5.2