testcentricity_web 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +17 -17
- data/README.md +8 -2
- data/lib/devices/devices.yml +25 -1
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +2 -0
- data/lib/testcentricity_web/web_elements/checkbox.rb +31 -0
- data/lib/testcentricity_web/web_elements/list.rb +1 -1
- data/lib/testcentricity_web/web_elements/radio.rb +20 -0
- data/lib/testcentricity_web/web_elements/table.rb +42 -0
- data/testcentricity_web.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 703575dd4ce2e50ae4ebaa52df05d6964d31d4b5
|
4
|
+
data.tar.gz: cfce94a61c60cc201ccdbc87fc5d51a5cc360bd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3e0fc855409eeb0d753a951f454516a3e5ff052c1a153f910cb45ddfd7e30d71bd222171f065c99ba3a69f22378e93d191a9e029fefc6be7571eeeccca9e569
|
7
|
+
data.tar.gz: 988cb81887d817c0b9ab147648e5022541fc19f3310842c5f62b6974fc90bd6d8f1be43fc10cbf8b76a563b621fd54cd771568f8ff10a7919faaabca05da188f
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
4
|
|
5
|
+
## [3.2.2] - 2019-10-16
|
6
|
+
|
7
|
+
### Added
|
8
|
+
* Added device profiles for iPhone 11, 11 Pro, and 11 Pro Max (iOS 13.1) with Mobile Safari browser.
|
9
|
+
* Added `Table.wait_until_row_count_is` and `Table.wait_until_row_count_changes` methods.
|
10
|
+
* Added `CheckBox.indeterminate?` method.
|
11
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of `indeterminate` property.
|
12
|
+
* Updated device profiles for iPad Pro 12.9" 3rd Generation (iOS 13.1) with Mobile Safari browser.
|
13
|
+
|
5
14
|
## [3.2.1] - 2019-10-03
|
6
15
|
|
7
16
|
### Changed
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
testcentricity_web (3.2.
|
4
|
+
testcentricity_web (3.2.2)
|
5
5
|
appium_lib
|
6
6
|
browserstack-local
|
7
7
|
capybara (>= 3.1, < 4)
|
@@ -19,13 +19,13 @@ PATH
|
|
19
19
|
GEM
|
20
20
|
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
addressable (2.
|
23
|
-
public_suffix (>= 2.0.2, <
|
24
|
-
appium_lib (10.4.
|
22
|
+
addressable (2.7.0)
|
23
|
+
public_suffix (>= 2.0.2, < 5.0)
|
24
|
+
appium_lib (10.4.1)
|
25
25
|
appium_lib_core (~> 3.2)
|
26
26
|
nokogiri (~> 1.8, >= 1.8.1)
|
27
27
|
tomlrb (~> 1.1)
|
28
|
-
appium_lib_core (3.2.
|
28
|
+
appium_lib_core (3.2.3)
|
29
29
|
faye-websocket (~> 0.10.0)
|
30
30
|
selenium-webdriver (~> 3.14, >= 3.14.1)
|
31
31
|
axiom-types (0.1.1)
|
@@ -33,7 +33,7 @@ GEM
|
|
33
33
|
ice_nine (~> 0.11.0)
|
34
34
|
thread_safe (~> 0.3, >= 0.3.1)
|
35
35
|
browserstack-local (1.3.0)
|
36
|
-
capybara (3.
|
36
|
+
capybara (3.29.0)
|
37
37
|
addressable
|
38
38
|
mini_mime (>= 0.1.3)
|
39
39
|
nokogiri (~> 1.8)
|
@@ -51,22 +51,22 @@ GEM
|
|
51
51
|
thread_safe (~> 0.3, >= 0.3.1)
|
52
52
|
equalizer (0.0.11)
|
53
53
|
eventmachine (1.2.7)
|
54
|
-
faker (2.
|
55
|
-
i18n (>=
|
54
|
+
faker (2.6.0)
|
55
|
+
i18n (>= 1.6, < 1.8)
|
56
56
|
faye-websocket (0.10.9)
|
57
57
|
eventmachine (>= 0.12.0)
|
58
58
|
websocket-driver (>= 0.5.1)
|
59
59
|
ffi (1.11.1)
|
60
|
-
i18n (1.
|
60
|
+
i18n (1.7.0)
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
ice_nine (0.11.2)
|
63
63
|
mini_mime (1.0.2)
|
64
64
|
mini_portile2 (2.4.0)
|
65
|
-
nokogiri (1.10.
|
65
|
+
nokogiri (1.10.4)
|
66
66
|
mini_portile2 (~> 2.4.0)
|
67
67
|
os (1.0.1)
|
68
|
-
power_assert (1.1.
|
69
|
-
public_suffix (
|
68
|
+
power_assert (1.1.5)
|
69
|
+
public_suffix (4.0.1)
|
70
70
|
rack (2.0.7)
|
71
71
|
rack-test (1.1.0)
|
72
72
|
rack (>= 1.0, < 3)
|
@@ -74,13 +74,13 @@ GEM
|
|
74
74
|
redcarpet (3.4.0)
|
75
75
|
regexp_parser (1.6.0)
|
76
76
|
ruby-ole (1.2.12.2)
|
77
|
-
rubyzip (1.
|
78
|
-
selenium-webdriver (3.142.
|
79
|
-
childprocess (>= 0.5, <
|
80
|
-
rubyzip (
|
77
|
+
rubyzip (1.3.0)
|
78
|
+
selenium-webdriver (3.142.6)
|
79
|
+
childprocess (>= 0.5, < 4.0)
|
80
|
+
rubyzip (>= 1.2.2)
|
81
81
|
spreadsheet (1.1.7)
|
82
82
|
ruby-ole (>= 1.0)
|
83
|
-
test-unit (3.3.
|
83
|
+
test-unit (3.3.4)
|
84
84
|
power_assert
|
85
85
|
thread_safe (0.3.6)
|
86
86
|
tomlrb (1.2.8)
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/testcentricity_web.svg)](https://badge.fury.io/rb/testcentricity_web) [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause)
|
4
4
|
|
5
5
|
|
6
|
-
The TestCentricity™ Web core generic framework for desktop and mobile web browser-based
|
6
|
+
The TestCentricity™ Web core generic framework for desktop and mobile web browser-based app testing implements a Page Object and Data
|
7
7
|
Object Model DSL for use with Cucumber, Capybara (version 3.x), and Selenium-Webdriver (version 3.x).
|
8
8
|
|
9
9
|
**An example project that demonstrates the implementation of a page object model framework using Cucumber and TestCentricity™ can be found [here](https://github.com/TestCentricity/tc_web_sample).**
|
@@ -782,7 +782,7 @@ the `WEB_BROWSER` Environment Variable must be set to one of the values from the
|
|
782
782
|
`ipad_pro` |`chrome` |1366 x 1024 |landscape |iOS 12
|
783
783
|
`ipad_pro_10_5` |`chrome` |1112 x 834 |landscape |iOS 12.2
|
784
784
|
`ipad_pro_11` |`chrome` |1194 x 834 |landscape |iOS 12.2
|
785
|
-
`ipad_pro_12_9` |`chrome` |1366 x 1024 |landscape |iOS
|
785
|
+
`ipad_pro_12_9` |`chrome` |1366 x 1024 |landscape |iOS 13.1
|
786
786
|
`ipad_chrome` |`chrome` |1024 x 768 |landscape |iOS 12.2 - Mobile Chrome browser for iOS
|
787
787
|
`ipad_firefox` |`chrome` |1024 x 768 |landscape |iOS 12.2 - Mobile Firefox browser for iOS
|
788
788
|
`ipad_edge` |`chrome` |1024 x 768 |landscape |iOS 12.2 - Mobile Edge browser for iOS
|
@@ -810,6 +810,9 @@ the `WEB_BROWSER` Environment Variable must be set to one of the values from the
|
|
810
810
|
`iphone_xr` |`chrome` |414 x 896 |portrait |iOS 12.2
|
811
811
|
`iphone_xs` |`chrome` |375 x 812 |portrait |iOS 12.2
|
812
812
|
`iphone_xs_max` |`chrome` |414 x 896 |portrait |iOS 12.2
|
813
|
+
`iphone_11` |`chrome` |414 x 896 |portrait |iOS 13.1
|
814
|
+
`iphone_11_pro` |`chrome` |375 x 812 |portrait |iOS 13.1
|
815
|
+
`iphone_11_pro_max` |`chrome` |414 x 896 |portrait |iOS 13.1
|
813
816
|
`android_phone` |`chrome` |360 x 640 |portrait |Android 4.2.1
|
814
817
|
`nexus6` |`chrome` |411 x 731 |portrait |Android 6
|
815
818
|
`pixel` |`chrome` |411 x 731 |portrait |Android 8
|
@@ -1178,6 +1181,9 @@ placeholder text with the Subdomain specified on the Grid Configuration Paramete
|
|
1178
1181
|
iphone_xr_edge: WEB_BROWSER=iphone_xr_edge HOST_BROWSER=chrome <%= mobile %>
|
1179
1182
|
iphone_xs: WEB_BROWSER=iphone_xs HOST_BROWSER=chrome <%= mobile %>
|
1180
1183
|
iphone_xs_max: WEB_BROWSER=iphone_xs_max HOST_BROWSER=chrome <%= mobile %>
|
1184
|
+
iphone_11: WEB_BROWSER=iphone_11 HOST_BROWSER=chrome <%= mobile %>
|
1185
|
+
iphone_11_pro: WEB_BROWSER=iphone_11_pro HOST_BROWSER=chrome <%= mobile %>
|
1186
|
+
iphone_11_pro_max: WEB_BROWSER=iphone_11_pro_max HOST_BROWSER=chrome <%= mobile %>
|
1181
1187
|
android_phone: WEB_BROWSER=android_phone HOST_BROWSER=chrome <%= mobile %>
|
1182
1188
|
nexus6: WEB_BROWSER=nexus6 HOST_BROWSER=chrome <%= mobile %>
|
1183
1189
|
android_tablet: WEB_BROWSER=android_tablet HOST_BROWSER=chrome <%= tablet %>
|
data/lib/devices/devices.yml
CHANGED
@@ -110,6 +110,30 @@
|
|
110
110
|
:css_height: 869
|
111
111
|
:default_orientation: portrait
|
112
112
|
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1"
|
113
|
+
:iphone_11:
|
114
|
+
:name: "iPhone 11"
|
115
|
+
:os: ios
|
116
|
+
:type: phone
|
117
|
+
:css_width: 414
|
118
|
+
:css_height: 869
|
119
|
+
:default_orientation: portrait
|
120
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Mobile/15E148 Safari/604.1"
|
121
|
+
:iphone_11_pro:
|
122
|
+
:name: "iPhone 11 Pro"
|
123
|
+
:os: ios
|
124
|
+
:type: phone
|
125
|
+
:css_width: 375
|
126
|
+
:css_height: 812
|
127
|
+
:default_orientation: portrait
|
128
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Mobile/15E148 Safari/604.1"
|
129
|
+
:iphone_11_pro_max:
|
130
|
+
:name: "iPhone 11 Pro Max"
|
131
|
+
:os: ios
|
132
|
+
:type: phone
|
133
|
+
:css_width: 414
|
134
|
+
:css_height: 869
|
135
|
+
:default_orientation: portrait
|
136
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Mobile/15E148 Safari/604.1"
|
113
137
|
:android_phone:
|
114
138
|
:name: "Generic Android phone"
|
115
139
|
:os: android
|
@@ -253,7 +277,7 @@ nexus6:
|
|
253
277
|
:css_width: 1366
|
254
278
|
:css_height: 1024
|
255
279
|
:default_orientation: landscape
|
256
|
-
:user_agent: "Mozilla/5.0 (
|
280
|
+
:user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Safari/605.1.15"
|
257
281
|
:ipad_chrome:
|
258
282
|
:name: "iPad - Chrome"
|
259
283
|
:os: ios
|
@@ -36,6 +36,17 @@ module TestCentricity
|
|
36
36
|
obj.checked?
|
37
37
|
end
|
38
38
|
|
39
|
+
# Is checkbox state indeterminate?
|
40
|
+
#
|
41
|
+
# @return [Boolean]
|
42
|
+
# @example
|
43
|
+
# remember_me_checkbox.indeterminate?
|
44
|
+
#
|
45
|
+
def indeterminate?
|
46
|
+
state = get_attribute('indeterminate')
|
47
|
+
state.boolean? ? state : state == 'true'
|
48
|
+
end
|
49
|
+
|
39
50
|
# Is checkbox visible?
|
40
51
|
#
|
41
52
|
# @return [Boolean]
|
@@ -129,5 +140,25 @@ module TestCentricity
|
|
129
140
|
expected = state.to_bool
|
130
141
|
obj.click unless expected == obj.checked?
|
131
142
|
end
|
143
|
+
|
144
|
+
# Highlight a checkbox with a 3 pixel wide, red dashed border for the specified wait time.
|
145
|
+
# If wait time is zero, then the highlight will remain until the page is refreshed
|
146
|
+
#
|
147
|
+
# @param duration [Integer or Float] wait time in seconds
|
148
|
+
# @example
|
149
|
+
# remember_me_checkbox.highlight(3)
|
150
|
+
#
|
151
|
+
def highlight(duration = 1)
|
152
|
+
@proxy.nil? ? super : @proxy.highlight(duration)
|
153
|
+
end
|
154
|
+
|
155
|
+
# Restore a highlighted checkbox's original style
|
156
|
+
#
|
157
|
+
# @example
|
158
|
+
# remember_me_checkbox.unhighlight
|
159
|
+
#
|
160
|
+
def unhighlight
|
161
|
+
@proxy.nil? ? super : @proxy.unhighlight
|
162
|
+
end
|
132
163
|
end
|
133
164
|
end
|
@@ -151,7 +151,7 @@ module TestCentricity
|
|
151
151
|
end
|
152
152
|
end
|
153
153
|
|
154
|
-
# Wait until the list's
|
154
|
+
# Wait until the list's item count equals the specified value, or until the specified wait time has expired. If the wait
|
155
155
|
# time is nil, then the wait time will be Capybara.default_max_wait_time.
|
156
156
|
#
|
157
157
|
# @param value [Integer or Hash] value expected or comparison hash
|
@@ -103,5 +103,25 @@ module TestCentricity
|
|
103
103
|
def unselect
|
104
104
|
set_selected_state(false)
|
105
105
|
end
|
106
|
+
|
107
|
+
# Highlight a radio button with a 3 pixel wide, red dashed border for the specified wait time.
|
108
|
+
# If wait time is zero, then the highlight will remain until the page is refreshed
|
109
|
+
#
|
110
|
+
# @param duration [Integer or Float] wait time in seconds
|
111
|
+
# @example
|
112
|
+
# accept_terms_radio.highlight(3)
|
113
|
+
#
|
114
|
+
def highlight(duration = 1)
|
115
|
+
@proxy.nil? ? super : @proxy.highlight(duration)
|
116
|
+
end
|
117
|
+
|
118
|
+
# Restore a highlighted radio button's original style
|
119
|
+
#
|
120
|
+
# @example
|
121
|
+
# accept_terms_radio.unhighlight
|
122
|
+
#
|
123
|
+
def unhighlight
|
124
|
+
@proxy.nil? ? super : @proxy.unhighlight
|
125
|
+
end
|
106
126
|
end
|
107
127
|
end
|
@@ -86,6 +86,48 @@ module TestCentricity
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
# Wait until the table's row count equals the specified value, or until the specified wait time has expired. If the wait
|
90
|
+
# time is nil, then the wait time will be Capybara.default_max_wait_time.
|
91
|
+
#
|
92
|
+
# @param value [Integer or Hash] value expected or comparison hash
|
93
|
+
# @param seconds [Integer or Float] wait time in seconds
|
94
|
+
# @example
|
95
|
+
# list_table.wait_until_row_count_is(10, 15)
|
96
|
+
# or
|
97
|
+
# list_table.wait_until_row_count_is({ greater_than_or_equal: 1 }, 5)
|
98
|
+
#
|
99
|
+
def wait_until_row_count_is(value, seconds = nil, post_exception = true)
|
100
|
+
timeout = seconds.nil? ? Capybara.default_max_wait_time : seconds
|
101
|
+
wait = Selenium::WebDriver::Wait.new(timeout: timeout)
|
102
|
+
wait.until { compare(value, get_row_count) }
|
103
|
+
rescue
|
104
|
+
if post_exception
|
105
|
+
raise "Value of Table #{object_ref_message} failed to equal '#{value}' after #{timeout} seconds" unless get_row_count == value
|
106
|
+
else
|
107
|
+
get_row_count == value
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# Wait until the table's row count changes to a different value, or until the specified wait time has expired. If the
|
112
|
+
# wait time is nil, then the wait time will be Capybara.default_max_wait_time.
|
113
|
+
#
|
114
|
+
# @param seconds [Integer or Float] wait time in seconds
|
115
|
+
# @example
|
116
|
+
# list_table.wait_until_row_count_changes(5)
|
117
|
+
#
|
118
|
+
def wait_until_row_count_changes(seconds = nil, post_exception = true)
|
119
|
+
value = get_row_count
|
120
|
+
timeout = seconds.nil? ? Capybara.default_max_wait_time : seconds
|
121
|
+
wait = Selenium::WebDriver::Wait.new(timeout: timeout)
|
122
|
+
wait.until { get_row_count != value }
|
123
|
+
rescue
|
124
|
+
if post_exception
|
125
|
+
raise "Value of Table #{object_ref_message} failed to change from '#{value}' after #{timeout} seconds" if get_row_count == value
|
126
|
+
else
|
127
|
+
get_row_count == value
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
89
131
|
# Return number of columns in a table object.
|
90
132
|
#
|
91
133
|
# @return [Integer]
|
data/testcentricity_web.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.email = ['testcentricity@gmail.com']
|
13
13
|
spec.summary = 'A Page Object and Data Object Model Framework for desktop and mobile web testing'
|
14
14
|
spec.description = '
|
15
|
-
The TestCentricity™ Web core generic framework for desktop and mobile web browser-based
|
15
|
+
The TestCentricity™ Web core generic framework for desktop and mobile web browser-based app testing implements
|
16
16
|
a Page Object Model DSL for use with Cucumber, Capybara, and Selenium-Webdriver. The gem provides support for running
|
17
17
|
automated tests against locally hosted desktop browsers, locally hosted emulated mobile browsers (iOS, Android, Windows
|
18
18
|
Phone, Blackberry, Kindle Fire) running within a local instance of Chrome, mobile Safari browsers on iOS device simulators
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testcentricity_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.J. Mrozinski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -234,7 +234,7 @@ dependencies:
|
|
234
234
|
version: '0'
|
235
235
|
description: |2-
|
236
236
|
|
237
|
-
The TestCentricity™ Web core generic framework for desktop and mobile web browser-based
|
237
|
+
The TestCentricity™ Web core generic framework for desktop and mobile web browser-based app testing implements
|
238
238
|
a Page Object Model DSL for use with Cucumber, Capybara, and Selenium-Webdriver. The gem provides support for running
|
239
239
|
automated tests against locally hosted desktop browsers, locally hosted emulated mobile browsers (iOS, Android, Windows
|
240
240
|
Phone, Blackberry, Kindle Fire) running within a local instance of Chrome, mobile Safari browsers on iOS device simulators
|