ae_page_objects 4.1.0.pre1 → 4.3.1.tim2
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 58d8bc18133617527821d0a7c7be47c0528978567b66277aa9a1ff0b0cbdcaa8
|
4
|
+
data.tar.gz: 0a622745a70d3a4d9de923ee27295377096203a170bddcf8517acaee028ba19f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a512bbe4c7fa4bfb6d4073d6fce4a0f40103d1825a6d6a54139e32c0717d2708dfe255ae0124a6cf98869490d74d5eef3fd009bb425234c62a7e29200672f7b
|
7
|
+
data.tar.gz: db42b665475663853467ca009fdac381918bc569fa029aded63237ffbd21eccbf681c0e305399787e648d1b4bc5c1847a2c7f66d6c58da15a2f3bdd29b620529
|
@@ -16,31 +16,21 @@ module AePageObjects
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def visible?(options = {})
|
19
|
-
|
20
|
-
|
21
|
-
rescue ElementNotVisible
|
22
|
-
false
|
19
|
+
reload_element
|
20
|
+
@loaded_element&.visible?
|
23
21
|
end
|
24
22
|
|
25
23
|
def hidden?(options = {})
|
26
|
-
|
27
|
-
true
|
28
|
-
rescue ElementNotHidden
|
29
|
-
false
|
24
|
+
!visible?
|
30
25
|
end
|
31
26
|
|
32
27
|
def present?(options = {})
|
33
|
-
|
34
|
-
|
35
|
-
rescue ElementNotPresent
|
36
|
-
false
|
28
|
+
reload_element
|
29
|
+
!@loaded_element.nil?
|
37
30
|
end
|
38
31
|
|
39
32
|
def absent?(options = {})
|
40
|
-
|
41
|
-
true
|
42
|
-
rescue ElementNotAbsent
|
43
|
-
false
|
33
|
+
!present?
|
44
34
|
end
|
45
35
|
|
46
36
|
def presence
|
@@ -41,7 +41,19 @@ module AePageObjects
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def size
|
44
|
-
|
44
|
+
#
|
45
|
+
# In some cases when #size is called while the DOM is updating, Capybara
|
46
|
+
# will catch (and swallow) underlying exceptions such as
|
47
|
+
# `Selenium::WebDriver::Error::StaleElementReferenceError`.
|
48
|
+
# When this happens it will wait up to the max wait time, which can cause
|
49
|
+
# issues for `AePageObjects.wait_until` blocks.
|
50
|
+
#
|
51
|
+
# To prevent this issue the #all and #size calls are made with the Capybara
|
52
|
+
# wait time set to 0.
|
53
|
+
#
|
54
|
+
Capybara.using_wait_time(0) do
|
55
|
+
node.all(:xpath, item_xpath, options).size
|
56
|
+
end
|
45
57
|
end
|
46
58
|
|
47
59
|
def last
|
@@ -133,12 +133,12 @@ module AePageObjects
|
|
133
133
|
private
|
134
134
|
|
135
135
|
def recognizer
|
136
|
-
@recognizer ||= case ::Rails.
|
137
|
-
when
|
136
|
+
@recognizer ||= case ::Rails.gem_version
|
137
|
+
when Gem::Requirement.new('>= 3.0', '< 3.2')
|
138
138
|
Recognizer::Rails3.new
|
139
|
-
when
|
139
|
+
when Gem::Requirement.new('~> 3.2')
|
140
140
|
Recognizer::Rails32.new
|
141
|
-
when
|
141
|
+
when Gem::Requirement.new('>= 4.0', '< 7.0')
|
142
142
|
Recognizer::Rails4Plus.new
|
143
143
|
else
|
144
144
|
warn "[WARNING]: AePageObjects is not tested against Rails #{::Rails.version} and may behave in an undefined manner."
|
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.1.
|
4
|
+
version: 4.3.1.tim2
|
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:
|
11
|
+
date: 2021-03-18 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
|
@@ -79,9 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: 1.3.1
|
81
81
|
requirements: []
|
82
|
-
|
83
|
-
|
84
|
-
signing_key:
|
82
|
+
rubygems_version: 3.1.4
|
83
|
+
signing_key:
|
85
84
|
specification_version: 4
|
86
85
|
summary: Capybara Page Objects pattern
|
87
86
|
test_files: []
|