testcentricity_web 3.1.10 → 3.1.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 4b9a9ddffbe8fb506daa3b228151e8b73d79f880ed4f836d33570ce90a20b6b1
4
- data.tar.gz: 9ecaec237bb61bf11bc7b9a84ae34bfee3a3449c4452f058d7f3750ca48f5884
2
+ SHA1:
3
+ metadata.gz: d92158f9e2540012136111353ebaa64291ebf6d3
4
+ data.tar.gz: b43b59d310ce1127f1421253631accfd55a2678f
5
5
  SHA512:
6
- metadata.gz: 8623d9b8f498bd78ade6b4ccbf749a5f094643e120be9f34094d496dfca684d9a251446a3dcc3922e4bc924fa0c0c2ea8086e1196850c8543ba32f924f6f3358
7
- data.tar.gz: 84b61d66ec403bf9f7a41c66951824c976f845b990cf36495a219f338ba6ea28ebaf864a59fd69cfaf476338f72330f60eb4b5974143c5aa6fe740ae0dbc324e
6
+ metadata.gz: ff1a09865c32c5b55f660ed57b492239b2d991a72a81836eec44e0b26b6775eddb1b4b3a6ce9e52204f9277527f4466d73f193a51b2561c51f364c6f218ce938
7
+ data.tar.gz: 6765a097a243291ccd72011fb1e43bf87c4609047da521122cbb9c6cd7e9215bdf7ff161b3b84d2e7f21654e6656df1529bb7eaa6fd2ae64650edfe28be7f81a
@@ -2,6 +2,13 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [3.1.11] - 2019-01-20
6
+
7
+ ### Added
8
+ * Added `SelectList.get_group_count` and `SelectList.get_group_headings` methods.
9
+ * Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of `groupcount`
10
+ and `group_headings` properties of `SelectList` objects.
11
+
5
12
  ## [3.1.10] - 2019-05-21
6
13
 
7
14
  ### Fixed
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- testcentricity_web (3.1.10)
4
+ testcentricity_web (3.1.11)
5
5
  appium_lib
6
6
  browserstack-local
7
7
  capybara (>= 3.1, < 4)
@@ -25,7 +25,7 @@ GEM
25
25
  appium_lib_core (~> 3.1)
26
26
  nokogiri (~> 1.8, >= 1.8.1)
27
27
  tomlrb (~> 1.1)
28
- appium_lib_core (3.1.2)
28
+ appium_lib_core (3.1.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,13 +33,13 @@ 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.20.2)
36
+ capybara (3.24.0)
37
37
  addressable
38
38
  mini_mime (>= 0.1.3)
39
39
  nokogiri (~> 1.8)
40
40
  rack (>= 1.6.0)
41
41
  rack-test (>= 0.6.3)
42
- regexp_parser (~> 1.2)
42
+ regexp_parser (~> 1.5)
43
43
  xpath (~> 3.2)
44
44
  childprocess (0.9.0)
45
45
  ffi (~> 1.0, >= 1.0.11)
@@ -53,7 +53,7 @@ GEM
53
53
  eventmachine (1.2.7)
54
54
  faker (1.9.3)
55
55
  i18n (>= 0.7)
56
- faye-websocket (0.10.7)
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)
@@ -66,15 +66,15 @@ GEM
66
66
  mini_portile2 (~> 2.4.0)
67
67
  os (1.0.1)
68
68
  power_assert (1.1.4)
69
- public_suffix (3.0.3)
69
+ public_suffix (3.1.0)
70
70
  rack (2.0.7)
71
71
  rack-test (1.1.0)
72
72
  rack (>= 1.0, < 3)
73
73
  rake (12.3.2)
74
74
  redcarpet (3.4.0)
75
- regexp_parser (1.5.0)
75
+ regexp_parser (1.5.1)
76
76
  ruby-ole (1.2.12.2)
77
- rubyzip (1.2.2)
77
+ rubyzip (1.2.3)
78
78
  selenium-webdriver (3.142.3)
79
79
  childprocess (>= 0.5, < 2.0)
80
80
  rubyzip (~> 1.2, >= 1.2.2)
@@ -93,9 +93,9 @@ GEM
93
93
  nokogiri (~> 1.6)
94
94
  rubyzip (~> 1.0)
95
95
  selenium-webdriver (~> 3.0)
96
- websocket-driver (0.7.0)
96
+ websocket-driver (0.7.1)
97
97
  websocket-extensions (>= 0.1.0)
98
- websocket-extensions (0.1.3)
98
+ websocket-extensions (0.1.4)
99
99
  xpath (3.2.0)
100
100
  nokogiri (~> 1.8)
101
101
 
@@ -87,6 +87,10 @@ module TestCentricity
87
87
  when :translate_capitalize
88
88
  expected = I18n.t(value).capitalize
89
89
  enqueue_assert_equal(expected, actual, error_msg)
90
+ when :translate_titlecase
91
+ expected = I18n.t(value)
92
+ expected = "#{expected.split.each{ |expected| expected.capitalize! }.join(' ')}"
93
+ enqueue_assert_equal(expected, actual, error_msg)
90
94
  end
91
95
  end
92
96
  else
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '3.1.10'
2
+ VERSION = '3.1.11'
3
3
  end
@@ -634,6 +634,10 @@ module TestCentricity
634
634
  actual = ui_object.get_list_items
635
635
  when :optioncount, :itemcount
636
636
  actual = ui_object.get_item_count
637
+ when :groupcount
638
+ actual = ui_object.get_group_count
639
+ when :group_headings
640
+ actual = ui_object.get_group_headings
637
641
  when :all_items, :all_list_items
638
642
  actual = ui_object.get_all_list_items
639
643
  when :all_items_count
@@ -826,6 +826,10 @@ module TestCentricity
826
826
  actual = ui_object.get_list_items
827
827
  when :optioncount, :itemcount
828
828
  actual = ui_object.get_item_count
829
+ when :groupcount
830
+ actual = ui_object.get_group_count
831
+ when :group_headings
832
+ actual = ui_object.get_group_headings
829
833
  when :all_items, :all_list_items
830
834
  actual = ui_object.get_all_list_items
831
835
  when :all_items_count
@@ -5,6 +5,8 @@ module TestCentricity
5
5
  attr_accessor :list_trigger
6
6
  attr_accessor :text_field
7
7
  attr_accessor :options_list
8
+ attr_accessor :group_item
9
+ attr_accessor :group_heading
8
10
  attr_accessor :base_object
9
11
 
10
12
  def initialize(name, parent, locator, context)
@@ -15,7 +17,9 @@ module TestCentricity
15
17
  list_item: "li[class*='active-result']",
16
18
  list_trigger: nil,
17
19
  text_field: nil,
18
- options_list: nil
20
+ options_list: nil,
21
+ group_item: 'li.group-result',
22
+ group_heading: 'li.group-result'
19
23
  }
20
24
  define_list_elements(list_spec)
21
25
  end
@@ -33,6 +37,10 @@ module TestCentricity
33
37
  @text_field = value
34
38
  when :options_list
35
39
  @options_list = value
40
+ when :group_item
41
+ @group_item = value
42
+ when :group_heading
43
+ @group_heading = value
36
44
  else
37
45
  raise "#{element} is not a recognized selectlist element"
38
46
  end
@@ -170,6 +178,56 @@ module TestCentricity
170
178
 
171
179
  alias get_item_count get_option_count
172
180
 
181
+ # Return array of strings of all group headings in a select box object.
182
+ # Supports React and Chosen select objects.
183
+ #
184
+ # @return [Array]
185
+ # @example
186
+ # regions = team_select.get_group_headings
187
+ #
188
+ def get_group_headings
189
+ @base_object, = find_element
190
+ object_not_found_exception(@base_object, nil)
191
+ if @options_list.nil?
192
+ if @base_object.first(:css, @group_heading, minimum: 0, wait: 2)
193
+ @base_object.all(@group_heading).collect(&:text)
194
+ else
195
+ nil
196
+ end
197
+ else
198
+ trigger_list
199
+ menu = find_component(@options_list, 'drop menu')
200
+ groups = menu.all(@group_heading, visible: true, minimum: 0, wait: 2).collect(&:text)
201
+ trigger_list
202
+ groups
203
+ end
204
+ end
205
+
206
+ # Return the number of groups in a select box object.
207
+ # Supports React and Chosen select objects.
208
+ #
209
+ # @return [Integer]
210
+ # @example
211
+ # num_regions = team_select.get_group_count
212
+ #
213
+ def get_group_count
214
+ @base_object, = find_element
215
+ object_not_found_exception(@base_object, nil)
216
+ if @options_list.nil?
217
+ if @base_object.first(:css, @group_item, minimum: 0, wait: 2)
218
+ @base_object.all(@group_item).count
219
+ else
220
+ 0
221
+ end
222
+ else
223
+ trigger_list
224
+ menu = find_component(@options_list, 'drop menu')
225
+ num_items = menu.all(@group_item, visible: true, minimum: 0, wait: 2).count
226
+ trigger_list
227
+ num_items
228
+ end
229
+ end
230
+
173
231
  def verify_options(expected, enqueue = false)
174
232
  actual = get_options
175
233
  if enqueue
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.10
4
+ version: 3.1.11
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-05-21 00:00:00.000000000 Z
11
+ date: 2019-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -325,7 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
325
  requirements:
326
326
  - Capybara, Selenium-WebDriver
327
327
  rubyforge_project:
328
- rubygems_version: 2.7.9
328
+ rubygems_version: 2.6.14
329
329
  signing_key:
330
330
  specification_version: 4
331
331
  summary: A Page Object and Data Object Model Framework for desktop and mobile web