testcentricity_web 3.1.6 → 3.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +5 -5
- data/README.md +1 -0
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +19 -5
- data/lib/testcentricity_web/web_core/page_sections_helper.rb +2 -0
- data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +10 -0
- data/lib/testcentricity_web/web_elements/video.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d020866a145ba6ad53811773f2949f0caabd8eae
|
4
|
+
data.tar.gz: cb94a1765b8cda6b95f741b06ea365b9c9e0296b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25e5dac7edc1af4d721b6f60ac5d4da9622aa8c2c275f4840bb0bebf2686dd57ef50c04ce1d360da3e7eab33ac9547984b94b9d549f20a67a26dd72ee526c678
|
7
|
+
data.tar.gz: 17eedf849e3e0eff61d1d482bd84441b22e8ed4142a56838e1b6064007c7f5976e6244924e5bd9c69c488d3c26acb2aab3f648f43b0e2d0293af27435a342461
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
4
|
|
5
|
+
## [3.1.7] - 2019-02-01
|
6
|
+
|
7
|
+
### Added
|
8
|
+
* Added `UIElement.title` and `PageObject.title` methods.
|
9
|
+
* Added `Video.video_height`, and `Video.video_width` methods.
|
10
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of `title` property.
|
11
|
+
|
12
|
+
|
5
13
|
## [3.1.6] - 2019-01-20
|
6
14
|
|
7
15
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
testcentricity_web (3.1.
|
4
|
+
testcentricity_web (3.1.7)
|
5
5
|
appium_lib
|
6
6
|
browserstack-local
|
7
7
|
capybara (>= 3.1, < 4)
|
@@ -25,7 +25,7 @@ GEM
|
|
25
25
|
appium_lib_core (~> 2.3)
|
26
26
|
nokogiri (~> 1.8, >= 1.8.1)
|
27
27
|
tomlrb (~> 1.1)
|
28
|
-
appium_lib_core (2.3.
|
28
|
+
appium_lib_core (2.3.4)
|
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.13.2)
|
37
37
|
addressable
|
38
38
|
mini_mime (>= 0.1.3)
|
39
39
|
nokogiri (~> 1.8)
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
eventmachine (>= 0.12.0)
|
58
58
|
websocket-driver (>= 0.5.1)
|
59
59
|
ffi (1.10.0)
|
60
|
-
i18n (1.5.
|
60
|
+
i18n (1.5.3)
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
ice_nine (0.11.2)
|
63
63
|
mini_mime (1.0.1)
|
@@ -81,7 +81,7 @@ GEM
|
|
81
81
|
rubyzip (~> 1.2, >= 1.2.2)
|
82
82
|
spreadsheet (1.1.7)
|
83
83
|
ruby-ole (>= 1.0)
|
84
|
-
test-unit (3.
|
84
|
+
test-unit (3.3.0)
|
85
85
|
power_assert
|
86
86
|
thread_safe (0.3.6)
|
87
87
|
tomlrb (1.2.8)
|
data/README.md
CHANGED
@@ -399,9 +399,7 @@ module TestCentricity
|
|
399
399
|
|
400
400
|
def open_portal
|
401
401
|
environment = Environ.current
|
402
|
-
environment.hostname.blank? ?
|
403
|
-
url = "#{environment.base_url}#{environment.append}" :
|
404
|
-
url = "#{environment.hostname}/#{environment.base_url}#{environment.append}"
|
402
|
+
url = environment.hostname.blank? ? "#{environment.base_url}#{environment.append}" : "#{environment.hostname}/#{environment.base_url}#{environment.append}"
|
405
403
|
if environment.user_id.blank? || environment.password.blank?
|
406
404
|
visit "#{environment.protocol}://#{url}"
|
407
405
|
else
|
@@ -469,6 +467,16 @@ module TestCentricity
|
|
469
467
|
Capybara.default_max_wait_time = saved_wait_time
|
470
468
|
end
|
471
469
|
|
470
|
+
# Return page title
|
471
|
+
#
|
472
|
+
# @return [String]
|
473
|
+
# @example
|
474
|
+
# home_page.title
|
475
|
+
#
|
476
|
+
def title
|
477
|
+
page.driver.browser.title
|
478
|
+
end
|
479
|
+
|
472
480
|
# Wait until the page object exists, or until the specified wait time has expired. If the wait time is nil, then the wait
|
473
481
|
# time will be Capybara.default_max_wait_time.
|
474
482
|
#
|
@@ -519,7 +527,7 @@ module TestCentricity
|
|
519
527
|
Timeout.timeout(wait_time) do
|
520
528
|
loop do
|
521
529
|
active = page.evaluate_script('jQuery.active')
|
522
|
-
break if active
|
530
|
+
break if active.zero?
|
523
531
|
end
|
524
532
|
end
|
525
533
|
end
|
@@ -542,6 +550,8 @@ module TestCentricity
|
|
542
550
|
actual = ui_object.get_attribute(:class)
|
543
551
|
when :name
|
544
552
|
actual = ui_object.get_attribute(:name)
|
553
|
+
when :title
|
554
|
+
actual = ui_object.title
|
545
555
|
when :exists
|
546
556
|
actual = ui_object.exists?
|
547
557
|
when :enabled
|
@@ -696,7 +706,11 @@ module TestCentricity
|
|
696
706
|
end
|
697
707
|
end
|
698
708
|
end
|
699
|
-
error_msg =
|
709
|
+
error_msg = if ui_object.respond_to?(:get_name)
|
710
|
+
"Expected UI object '#{ui_object.get_name}' (#{ui_object.get_locator}) #{property} property to"
|
711
|
+
else
|
712
|
+
"Expected '#{page_name}' page object #{property} property to"
|
713
|
+
end
|
700
714
|
ExceptionQueue.enqueue_comparison(ui_object, state, actual, error_msg)
|
701
715
|
end
|
702
716
|
end
|
@@ -433,6 +433,16 @@ module TestCentricity
|
|
433
433
|
obj.get_y
|
434
434
|
end
|
435
435
|
|
436
|
+
# Return UI object's title property
|
437
|
+
#
|
438
|
+
# @return [String]
|
439
|
+
# @example
|
440
|
+
# buy_now_button.title
|
441
|
+
#
|
442
|
+
def title
|
443
|
+
get_attribute(:title)
|
444
|
+
end
|
445
|
+
|
436
446
|
# Is UI object displayed in browser window?
|
437
447
|
#
|
438
448
|
# @return [Boolean]
|
@@ -193,6 +193,30 @@ module TestCentricity
|
|
193
193
|
obj.native.attribute('volume')
|
194
194
|
end
|
195
195
|
|
196
|
+
# Return video Height property
|
197
|
+
#
|
198
|
+
# @return [Integer] video height
|
199
|
+
# @example
|
200
|
+
# height = video_player.video_height
|
201
|
+
#
|
202
|
+
def video_height
|
203
|
+
obj, = find_element
|
204
|
+
object_not_found_exception(obj, nil)
|
205
|
+
obj.native.attribute('videoHeight')
|
206
|
+
end
|
207
|
+
|
208
|
+
# Return video Width property
|
209
|
+
#
|
210
|
+
# @return [Integer] video width
|
211
|
+
# @example
|
212
|
+
# width = video_player.video_width
|
213
|
+
#
|
214
|
+
def video_width
|
215
|
+
obj, = find_element
|
216
|
+
object_not_found_exception(obj, nil)
|
217
|
+
obj.native.attribute('videoWidth')
|
218
|
+
end
|
219
|
+
|
196
220
|
# Set the video currentTime property
|
197
221
|
#
|
198
222
|
# @param value [Float] time in seconds
|
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.1.
|
4
|
+
version: 3.1.7
|
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-01
|
11
|
+
date: 2019-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|