testcentricity_web 3.1.4 → 3.1.5
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 +13 -0
- data/Gemfile.lock +6 -4
- data/LICENSE.md +1 -1
- data/README.md +7 -2
- data/lib/testcentricity_web/data_objects/data_objects_helper.rb +10 -9
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +10 -17
- data/lib/testcentricity_web/web_core/page_sections_helper.rb +10 -17
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +0 -1
- data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +52 -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: 5ef2ff69fd950def36daea8ec4c74e2a4c37a72f
|
4
|
+
data.tar.gz: 29f3e011376881b6938c72fbb6dddf1a4d32d21d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baa7f038adbf64aff640adb34d4fa2837eeae258915a54a52608424ae3685b33eb3695b5b8c69b2113ef53c381647787f0534a762a30bba8ddbb1857fd72bc4a
|
7
|
+
data.tar.gz: 61ca7e651344b2f0df730002a6522c5df035f8514a18dc5174f96663b0a5a79a4e3cd7f873662abbea29e3e6a9156741f87a03a1d383acf25f0676b05ad03409
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,19 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
4
|
|
5
|
+
## [3.1.5] - 2019-01-06
|
6
|
+
|
7
|
+
### Added
|
8
|
+
* Additional methods to support WCAG 2.x accessibility testing and verification:
|
9
|
+
* `UIElement.aria_rowcount` method.
|
10
|
+
* `UIElement.aria_colcount` method.
|
11
|
+
* `UIElement.aria_sort` method.
|
12
|
+
* `UIElement.aria_haspopup?` method.
|
13
|
+
* `UIElement.aria_pressed?` method.
|
14
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of `aria_rowcount`, `aria_colcount`,
|
15
|
+
`aria_sort`, `aria_pressed`, and `aria_haspopup` properties.
|
16
|
+
|
17
|
+
|
5
18
|
## [3.1.4] - 2018-12-12
|
6
19
|
|
7
20
|
### Fixed
|
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.4.2)
|
5
5
|
appium_lib
|
6
6
|
browserstack-local
|
7
7
|
capybara (>= 3.1, < 4)
|
@@ -46,7 +46,7 @@ GEM
|
|
46
46
|
chronic (0.10.2)
|
47
47
|
coercible (1.0.0)
|
48
48
|
descendants_tracker (~> 0.0.1)
|
49
|
-
concurrent-ruby (1.1.
|
49
|
+
concurrent-ruby (1.1.4)
|
50
50
|
descendants_tracker (0.0.4)
|
51
51
|
thread_safe (~> 0.3, >= 0.3.1)
|
52
52
|
equalizer (0.0.11)
|
@@ -57,11 +57,12 @@ GEM
|
|
57
57
|
eventmachine (>= 0.12.0)
|
58
58
|
websocket-driver (>= 0.5.1)
|
59
59
|
ffi (1.9.25)
|
60
|
-
i18n (1.
|
60
|
+
i18n (1.3.0)
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
ice_nine (0.11.2)
|
63
63
|
mini_mime (1.0.1)
|
64
64
|
mini_portile2 (2.3.0)
|
65
|
+
net_http_ssl_fix (0.0.10)
|
65
66
|
nokogiri (1.8.5)
|
66
67
|
mini_portile2 (~> 2.3.0)
|
67
68
|
os (1.0.0)
|
@@ -89,7 +90,8 @@ GEM
|
|
89
90
|
coercible (~> 1.0)
|
90
91
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
91
92
|
equalizer (~> 0.0, >= 0.0.9)
|
92
|
-
webdrivers (3.
|
93
|
+
webdrivers (3.5.2)
|
94
|
+
net_http_ssl_fix
|
93
95
|
nokogiri (~> 1.6)
|
94
96
|
rubyzip (~> 1.0)
|
95
97
|
selenium-webdriver (~> 3.0)
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -495,7 +495,7 @@ With TestCentricity, all UI elements are based on the **UIElement** class, and i
|
|
495
495
|
element.get_attribute(attrib)
|
496
496
|
element.get_native_attribute(attrib)
|
497
497
|
|
498
|
-
**Object Accessibility methods:**
|
498
|
+
**Object Accessibility (A11y) methods:**
|
499
499
|
|
500
500
|
element.role
|
501
501
|
element.tabindex
|
@@ -506,11 +506,16 @@ With TestCentricity, all UI elements are based on the **UIElement** class, and i
|
|
506
506
|
element.aria_invalid?
|
507
507
|
element.aria_checked?
|
508
508
|
element.aria_readonly?
|
509
|
+
element.aria_haspopup?
|
509
510
|
element.aria_selected?
|
511
|
+
element.aria_pressed?
|
510
512
|
element.aria_label
|
511
513
|
element.aria_labelledby
|
512
514
|
element.aria_describedby
|
513
515
|
element.aria_live
|
516
|
+
element.aria_sort
|
517
|
+
element.aria_rowcount
|
518
|
+
element.aria_colcount
|
514
519
|
|
515
520
|
**Waiting methods:**
|
516
521
|
|
@@ -1554,7 +1559,7 @@ landscape orientation running on the BrowserStack service:
|
|
1554
1559
|
|
1555
1560
|
## Copyright and License
|
1556
1561
|
|
1557
|
-
TestCentricity™ Framework is Copyright (c) 2014-
|
1562
|
+
TestCentricity™ Framework is Copyright (c) 2014-2019, Tony Mrozinski.
|
1558
1563
|
All rights reserved.
|
1559
1564
|
|
1560
1565
|
Redistribution and use in source and binary forms, with or without
|
@@ -46,30 +46,31 @@ module TestCentricity
|
|
46
46
|
@current = current
|
47
47
|
end
|
48
48
|
|
49
|
-
def to_hash(node_name)
|
49
|
+
def to_hash(node_name = nil)
|
50
50
|
data = {}
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
if node_name.nil?
|
52
|
+
data = { class: self.class.name, attributes: self.attributes }
|
53
|
+
else
|
54
|
+
data[node_name] = { class: self.class.name, attributes: self.attributes }
|
55
|
+
end
|
55
56
|
data
|
56
57
|
end
|
57
58
|
|
58
|
-
def to_yaml(node_name)
|
59
|
+
def to_yaml(node_name = nil)
|
59
60
|
data = to_hash(node_name)
|
60
61
|
data.to_yaml
|
61
62
|
end
|
62
63
|
|
63
|
-
def write_yaml_data(file_name, mode, node_name)
|
64
|
+
def write_yaml_data(file_name, mode, node_name = nil)
|
64
65
|
File.open(file_name, mode) { |file| file.write(to_yaml(node_name)) }
|
65
66
|
end
|
66
67
|
|
67
|
-
def to_json(node_name)
|
68
|
+
def to_json(node_name = nil)
|
68
69
|
data = to_hash(node_name)
|
69
70
|
data.to_json
|
70
71
|
end
|
71
72
|
|
72
|
-
def write_json_data(file_name, mode, node_name)
|
73
|
+
def write_json_data(file_name, mode, node_name = nil)
|
73
74
|
File.open(file_name, mode) { |file| file.write(to_json(node_name)) }
|
74
75
|
end
|
75
76
|
end
|
@@ -692,6 +692,16 @@ module TestCentricity
|
|
692
692
|
actual = ui_object.aria_checked?
|
693
693
|
when :aria_readonly
|
694
694
|
actual = ui_object.aria_readonly?
|
695
|
+
when :aria_pressed
|
696
|
+
actual = ui_object.aria_pressed?
|
697
|
+
when :aria_haspopup
|
698
|
+
actual = ui_object.aria_haspopup?
|
699
|
+
when :aria_sort
|
700
|
+
actual = ui_object.aria_sort
|
701
|
+
when :aria_rowcount
|
702
|
+
actual = ui_object.aria_rowcount
|
703
|
+
when :aria_colcount
|
704
|
+
actual = ui_object.aria_colcount
|
695
705
|
else
|
696
706
|
if property.is_a?(Hash)
|
697
707
|
property.each do |key, value|
|
@@ -710,23 +720,6 @@ module TestCentricity
|
|
710
720
|
actual = ui_object.get_native_attribute(value)
|
711
721
|
end
|
712
722
|
end
|
713
|
-
else
|
714
|
-
props = property.to_s.split('_')
|
715
|
-
case props[0].to_sym
|
716
|
-
when :cell
|
717
|
-
cell = property.to_s.delete('cell_')
|
718
|
-
cell = cell.split('_')
|
719
|
-
actual = ui_object.get_table_cell(cell[0].to_i, cell[1].to_i)
|
720
|
-
when :row
|
721
|
-
row = property.to_s.delete('row_')
|
722
|
-
actual = ui_object.get_table_row(row.to_i)
|
723
|
-
when :column
|
724
|
-
column = property.to_s.delete('column_')
|
725
|
-
actual = ui_object.get_table_column(column.to_i)
|
726
|
-
when :item
|
727
|
-
item = property.to_s.delete('item_')
|
728
|
-
actual = ui_object.get_list_item(item.to_i)
|
729
|
-
end
|
730
723
|
end
|
731
724
|
end
|
732
725
|
error_msg = "Expected UI object '#{ui_object.get_name}' (#{ui_object.get_locator}) #{property} property to"
|
@@ -892,6 +892,16 @@ module TestCentricity
|
|
892
892
|
actual = ui_object.aria_checked?
|
893
893
|
when :aria_readonly
|
894
894
|
actual = ui_object.aria_readonly?
|
895
|
+
when :aria_pressed
|
896
|
+
actual = ui_object.aria_pressed?
|
897
|
+
when :aria_haspopup
|
898
|
+
actual = ui_object.aria_haspopup?
|
899
|
+
when :aria_sort
|
900
|
+
actual = ui_object.aria_sort
|
901
|
+
when :aria_rowcount
|
902
|
+
actual = ui_object.aria_rowcount
|
903
|
+
when :aria_colcount
|
904
|
+
actual = ui_object.aria_colcount
|
895
905
|
else
|
896
906
|
if property.is_a?(Hash)
|
897
907
|
property.each do |key, value|
|
@@ -910,23 +920,6 @@ module TestCentricity
|
|
910
920
|
actual = ui_object.get_native_attribute(value)
|
911
921
|
end
|
912
922
|
end
|
913
|
-
else
|
914
|
-
props = property.to_s.split('_')
|
915
|
-
case props[0].to_sym
|
916
|
-
when :cell
|
917
|
-
cell = property.to_s.delete('cell_')
|
918
|
-
cell = cell.split('_')
|
919
|
-
actual = ui_object.get_table_cell(cell[0].to_i, cell[1].to_i)
|
920
|
-
when :row
|
921
|
-
row = property.to_s.delete('row_')
|
922
|
-
actual = ui_object.get_table_row(row.to_i)
|
923
|
-
when :column
|
924
|
-
column = property.to_s.delete('column_')
|
925
|
-
actual = ui_object.get_table_column(column.to_i)
|
926
|
-
when :item
|
927
|
-
item = property.to_s.delete('item_')
|
928
|
-
actual = ui_object.get_list_item(item.to_i)
|
929
|
-
end
|
930
923
|
end
|
931
924
|
end
|
932
925
|
error_msg = "Expected UI object '#{ui_object.get_name}' (#{ui_object.get_locator}) #{property} property to"
|
@@ -626,6 +626,36 @@ module TestCentricity
|
|
626
626
|
get_attribute('aria-live')
|
627
627
|
end
|
628
628
|
|
629
|
+
# Return state of UI object's aria-sort property
|
630
|
+
#
|
631
|
+
# @return [String]
|
632
|
+
# @example
|
633
|
+
# name_column.aria_sort
|
634
|
+
#
|
635
|
+
def aria_sort
|
636
|
+
get_attribute('aria-sort')
|
637
|
+
end
|
638
|
+
|
639
|
+
# Return state of UI object's aria-rowcount property
|
640
|
+
#
|
641
|
+
# @return [Integer]
|
642
|
+
# @example
|
643
|
+
# user_grid.aria_rowcount
|
644
|
+
#
|
645
|
+
def aria_rowcount
|
646
|
+
get_attribute('aria-rowcount')
|
647
|
+
end
|
648
|
+
|
649
|
+
# Return state of UI object's aria-colcount property
|
650
|
+
#
|
651
|
+
# @return [Integer]
|
652
|
+
# @example
|
653
|
+
# user_grid.aria_colcount
|
654
|
+
#
|
655
|
+
def aria_colcount
|
656
|
+
get_attribute('aria-colcount')
|
657
|
+
end
|
658
|
+
|
629
659
|
# Return state of UI object's aria-disabled property
|
630
660
|
#
|
631
661
|
# @return [Boolean]
|
@@ -703,6 +733,28 @@ module TestCentricity
|
|
703
733
|
state.boolean? ? state : state == 'true'
|
704
734
|
end
|
705
735
|
|
736
|
+
# Return state of UI object's aria-haspopup property
|
737
|
+
#
|
738
|
+
# @return [Boolean]
|
739
|
+
# @example
|
740
|
+
# user_avatar.aria_haspopup?
|
741
|
+
#
|
742
|
+
def aria_haspopup?
|
743
|
+
state = get_attribute('aria-haspopup')
|
744
|
+
state.boolean? ? state : state == 'true'
|
745
|
+
end
|
746
|
+
|
747
|
+
# Return state of UI object's aria-pressed property
|
748
|
+
#
|
749
|
+
# @return [Boolean]
|
750
|
+
# @example
|
751
|
+
# option1_button.aria_pressed?
|
752
|
+
#
|
753
|
+
def aria_pressed?
|
754
|
+
state = get_attribute('aria-pressed')
|
755
|
+
state.boolean? ? state : state == 'true'
|
756
|
+
end
|
757
|
+
|
706
758
|
# Return state of UI object's aria-readonly property
|
707
759
|
#
|
708
760
|
# @return [Boolean]
|
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.5
|
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:
|
11
|
+
date: 2019-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|