testcentricity_web 4.6.6 → 4.6.8

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
2
  SHA256:
3
- metadata.gz: 4702f20ce00f184ba31a0192f402a91ab0342f63cb0acc49580a37cf2316ab1e
4
- data.tar.gz: 6ab02587dc727f7ac11a1bf641d85938d798817f5d90c6403dee750b64a5b898
3
+ metadata.gz: 0bd441ac4c410c391d2f47f947930172f688ca34f46da359424326d0e8c61f93
4
+ data.tar.gz: 91f94ef91ba8cda3556c95997942e6af2c944435db0773a8628fc203a96ad6cc
5
5
  SHA512:
6
- metadata.gz: 2f2fb438f4384f0f916e30028d28b81f6ab1a4faa256b144a674fd008910ea8cf1ae278898ce93541939af1c5cc5897886ac889873cef85811479cc49dd4880a
7
- data.tar.gz: 2601a6804e9e095e397d6fa99be0122c7cd5b1d3f11f54ac2e8a26b7d574a926db3dd622083a518c81b27df6ae86a6e0335d82758d410d32551c8f6db8292c33
6
+ metadata.gz: 58069c08c76b9a85ed210e065e33e1eb247e1eaf5f38b7668ae651af5d5e80b41f7f0225536d80af82677472af2f0893bdd908be205f31da4544416b1c7ef2a6
7
+ data.tar.gz: cb214a4773d6e611114502f6290ef7312fc8204474103b4454903b7a3ddb771fd8e512b9f2c731b6be33c5e3165432d6f80f94977476ef5642f66e9c2d309a0c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.6.8] - 27-OCT-2025
6
+
7
+ ### Changed
8
+
9
+ * `UIElement.aria_valuemax`, `UIElement.aria_valuemin`, and `UIElement.aria_valuenow` now return `Integer` or `Float`
10
+ instead of `String` result.
11
+ * `UIElement.aria_rowcount` and `UIElement.aria_colcount` now return `Integer` instead of `String` result.
12
+
13
+ ### Added
14
+ * Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of the following
15
+ `Table` properties:
16
+ * `:cell_attribute`
17
+ * `:row_attribute`
18
+ * `:aria_rowindex`
19
+
20
+ ### Fixed
21
+ * `Table.get_row_data` and `Table.get_row_attribute` methods now return data for row 1 instead of `nil`.
22
+
23
+
24
+ ## [4.6.7] - 21-OCT-2025
25
+
26
+ ### Added
27
+
28
+ * Added `UIElement.draggable?` method.
29
+ * Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of the
30
+ `draggable` property.
31
+
32
+
5
33
  ## [4.6.6] - 10-OCT-2025
6
34
 
7
35
  ### Changed
data/README.md CHANGED
@@ -570,6 +570,7 @@ With TestCentricity, all UI elements are based on the `UIElement` class, and inh
570
570
  element.displayed?
571
571
  element.obscured?
572
572
  element.focused?
573
+ element.draggable?
573
574
  element.required?
574
575
  element.content_editable?
575
576
  element.crossorigin
@@ -701,6 +702,7 @@ The `verify_ui_states` method supports the following property/state pairs:
701
702
  :hidden Boolean
702
703
  :displayed Boolean
703
704
  :obscured Boolean
705
+ :draggable Boolean
704
706
  :width Integer
705
707
  :height Integer
706
708
  :x Integer
@@ -779,12 +781,15 @@ The `verify_ui_states` method supports the following property/state pairs:
779
781
 
780
782
  **Tables**
781
783
 
782
- :rowcount Integer
783
- :columncount Integer
784
- :columnheaders Array of String
785
- :cell Hash
786
- :row Hash
787
- :column Hash
784
+ :rowcount Integer
785
+ :columncount Integer
786
+ :columnheaders Array of String
787
+ :cell Hash
788
+ :row Hash
789
+ :column Hash
790
+ :cell_attribute Integer, Float, or String
791
+ :row_attribute Integer, Float, or String
792
+ :aria_rowindex Integer
788
793
 
789
794
  **Audio/Video Media Objects**
790
795
 
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '4.6.6'
2
+ VERSION = '4.6.8'
3
3
  end
@@ -69,6 +69,8 @@ module TestCentricity
69
69
  ui_object.obscured?
70
70
  when :focused
71
71
  ui_object.focused?
72
+ when :draggable
73
+ ui_object.draggable?
72
74
  when :width
73
75
  ui_object.width
74
76
  when :height
@@ -149,8 +151,6 @@ module TestCentricity
149
151
  ui_object.active_track_source
150
152
  when :all_tracks_data
151
153
  ui_object.all_tracks_data
152
- when :crossorigin
153
- ui_object.crossorigin
154
154
  when :preload
155
155
  ui_object.preload
156
156
  when :poster
@@ -175,19 +175,43 @@ module TestCentricity
175
175
  ui_object.style
176
176
  when :href
177
177
  ui_object.href
178
+ when :content_editable
179
+ ui_object.content_editable?
178
180
  when :role
179
181
  ui_object.role
180
182
  when :aria_disabled
181
183
  ui_object.aria_disabled?
182
- # :nocov:
183
- when :count_all
184
- ui_object.count(visible = :all)
185
184
  when :aria_label
186
185
  ui_object.aria_label
187
- when :tabindex
188
- ui_object.tabindex
189
186
  when :aria_labelledby
190
187
  ui_object.aria_labelledby
188
+ when :aria_required
189
+ ui_object.aria_required?
190
+ when :aria_checked
191
+ ui_object.aria_checked?
192
+ when :aria_readonly
193
+ ui_object.aria_readonly?
194
+ when :aria_rowcount
195
+ ui_object.aria_rowcount
196
+ when :aria_colcount
197
+ ui_object.aria_colcount
198
+ when :aria_valuemax
199
+ ui_object.aria_valuemax
200
+ when :aria_valuemin
201
+ ui_object.aria_valuemin
202
+ when :aria_valuenow
203
+ ui_object.aria_valuenow
204
+ when :aria_orientation
205
+ ui_object.aria_orientation
206
+ when :aria_multiline
207
+ ui_object.aria_multiline?
208
+ when :aria_multiselectable
209
+ ui_object.aria_multiselectable?
210
+ # :nocov:
211
+ when :count_all
212
+ ui_object.count(visible = :all)
213
+ when :tabindex
214
+ ui_object.tabindex
191
215
  when :aria_describedby
192
216
  ui_object.aria_describedby
193
217
  when :aria_live
@@ -200,34 +224,16 @@ module TestCentricity
200
224
  ui_object.aria_hidden?
201
225
  when :aria_expanded
202
226
  ui_object.aria_expanded?
203
- when :aria_required
204
- ui_object.aria_required?
205
- when :aria_invalid
227
+ when :aria_invalid
206
228
  ui_object.aria_invalid?
207
- when :aria_checked
208
- ui_object.aria_checked?
209
- when :aria_readonly
210
- ui_object.aria_readonly?
211
229
  when :aria_pressed
212
230
  ui_object.aria_pressed?
213
231
  when :aria_haspopup
214
232
  ui_object.aria_haspopup?
215
233
  when :aria_sort
216
234
  ui_object.aria_sort
217
- when :aria_rowcount
218
- ui_object.aria_rowcount
219
- when :aria_colcount
220
- ui_object.aria_colcount
221
- when :aria_valuemax
222
- ui_object.aria_valuemax
223
- when :aria_valuemin
224
- ui_object.aria_valuemin
225
- when :aria_valuenow
226
- ui_object.aria_valuenow
227
235
  when :aria_valuetext
228
236
  ui_object.aria_valuetext
229
- when :aria_orientation
230
- ui_object.aria_orientation
231
237
  when :aria_keyshortcuts
232
238
  ui_object.aria_keyshortcuts
233
239
  when :aria_roledescription
@@ -238,12 +244,8 @@ module TestCentricity
238
244
  ui_object.aria_controls
239
245
  when :aria_modal
240
246
  ui_object.aria_modal?
241
- when :aria_multiline
242
- ui_object.aria_multiline?
243
- when :aria_multiselectable
244
- ui_object.aria_multiselectable?
245
- when :content_editable
246
- ui_object.content_editable?
247
+ when :crossorigin
248
+ ui_object.crossorigin
247
249
  # :nocov:
248
250
  when :validation_message
249
251
  ui_object.validation_message
@@ -285,6 +287,12 @@ module TestCentricity
285
287
  ui_object.get_attribute(value)
286
288
  when :native_attribute
287
289
  ui_object.get_native_attribute(value)
290
+ when :cell_attribute
291
+ ui_object.get_cell_attribute(value[0].to_i, value[1].to_i, value[2])
292
+ when :row_attribute
293
+ ui_object.get_row_attribute(value[0].to_i, value[1])
294
+ when :aria_rowindex
295
+ ui_object.get_row_attribute(value.to_i, 'aria-rowindex')
288
296
  else
289
297
  raise "#{key} is not a valid property key"
290
298
  end
@@ -317,13 +317,9 @@ module TestCentricity
317
317
  raise "Row #{row} exceeds number of rows (#{row_count}) in table #{object_ref_message}" if row > row_count
318
318
  case @locator_type
319
319
  when :xpath
320
- row > 1 ?
321
- set_alt_locator("#{@locator}/#{@table_body}/#{@table_row}[#{row}]") :
322
- set_alt_locator("#{@locator}/#{@table_body}/#{@table_row}")
320
+ set_alt_locator("#{@locator}/#{@table_body}/#{@table_row}[#{row}]")
323
321
  when :css
324
- row > 1 ?
325
- set_alt_locator("#{@locator} > #{@table_body} > #{@table_row}:nth-of-type(#{row})") :
326
- set_alt_locator("#{@locator} > #{@table_body} > #{@table_row}")
322
+ set_alt_locator("#{@locator} > #{@table_body} > #{@table_row}:nth-of-type(#{row})")
327
323
  end
328
324
  value = get_value if exists?
329
325
  clear_alt_locator
@@ -431,7 +427,15 @@ module TestCentricity
431
427
  set_table_cell_locator(row, column)
432
428
  result = get_native_attribute(attrib)
433
429
  clear_alt_locator
434
- result
430
+ unless result.blank?
431
+ if result.is_int?
432
+ result.to_i
433
+ elsif result.is_float?
434
+ result.to_f
435
+ else
436
+ result
437
+ end
438
+ end
435
439
  end
436
440
 
437
441
  def get_row_attribute(row, attrib)
@@ -439,17 +443,21 @@ module TestCentricity
439
443
  raise "Row #{row} exceeds number of rows (#{row_count}) in table #{object_ref_message}" if row > row_count
440
444
  case @locator_type
441
445
  when :xpath
442
- row > 1 ?
443
- set_alt_locator("#{@locator}/#{@table_body}/#{@table_row}[#{row}]") :
444
- set_alt_locator("#{@locator}/#{@table_body}/#{@table_row}")
446
+ set_alt_locator("#{@locator}/#{@table_body}/#{@table_row}[#{row}]")
445
447
  when :css
446
- row > 1 ?
447
- set_alt_locator("#{@locator} > #{@table_body} > #{@table_row}:nth-of-type(#{row})") :
448
- set_alt_locator("#{@locator} > #{@table_body} > #{@table_row}")
448
+ set_alt_locator("#{@locator} > #{@table_body} > #{@table_row}:nth-of-type(#{row})")
449
449
  end
450
450
  result = get_native_attribute(attrib)
451
451
  clear_alt_locator
452
- result
452
+ unless result.blank?
453
+ if result.is_int?
454
+ result.to_i
455
+ elsif result.is_float?
456
+ result.to_f
457
+ else
458
+ result
459
+ end
460
+ end
453
461
  end
454
462
 
455
463
  def find_row_attribute(attrib, search_value)
@@ -559,6 +559,21 @@ module TestCentricity
559
559
  obj.displayed?
560
560
  end
561
561
 
562
+ # Return state of UI object's draggable property
563
+ #
564
+ # @return [Boolean]
565
+ # @example
566
+ # puzzle_piece_21.draggable?
567
+ #
568
+ def draggable?
569
+ state = get_attribute(:draggable)
570
+ if state.is_a?(String)
571
+ state.to_bool
572
+ elsif state.boolean?
573
+ state
574
+ end
575
+ end
576
+
562
577
  def get_value(visible = true)
563
578
  obj, type = find_element(visible)
564
579
  object_not_found_exception(obj, type)
@@ -772,7 +787,14 @@ module TestCentricity
772
787
  # user_grid.aria_rowcount
773
788
  #
774
789
  def aria_rowcount
775
- get_attribute('aria-rowcount')
790
+ rows = get_attribute('aria-rowcount')
791
+ unless rows.blank?
792
+ if rows.is_int?
793
+ rows.to_i
794
+ else
795
+ rows
796
+ end
797
+ end
776
798
  end
777
799
 
778
800
  # Return state of UI object's aria-colcount property
@@ -782,7 +804,14 @@ module TestCentricity
782
804
  # user_grid.aria_colcount
783
805
  #
784
806
  def aria_colcount
785
- get_attribute('aria-colcount')
807
+ cols = get_attribute('aria-colcount')
808
+ unless cols.blank?
809
+ if cols.is_int?
810
+ cols.to_i
811
+ else
812
+ cols
813
+ end
814
+ end
786
815
  end
787
816
 
788
817
  # Return state of UI object's aria-valuemax property
@@ -792,7 +821,16 @@ module TestCentricity
792
821
  # volume_slider.aria_valuemax
793
822
  #
794
823
  def aria_valuemax
795
- get_attribute('aria-valuemax')
824
+ max = get_attribute('aria-valuemax')
825
+ unless max.blank?
826
+ if max.is_int?
827
+ max.to_i
828
+ elsif max.is_float?
829
+ max.to_f
830
+ else
831
+ max
832
+ end
833
+ end
796
834
  end
797
835
 
798
836
  # Return state of UI object's aria-valuemin property
@@ -802,7 +840,16 @@ module TestCentricity
802
840
  # volume_slider.aria_valuemin
803
841
  #
804
842
  def aria_valuemin
805
- get_attribute('aria-valuemin')
843
+ min = get_attribute('aria-valuemin')
844
+ unless min.blank?
845
+ if min.is_int?
846
+ min.to_i
847
+ elsif min.is_float?
848
+ min.to_f
849
+ else
850
+ min
851
+ end
852
+ end
806
853
  end
807
854
 
808
855
  # Return state of UI object's aria-valuenow property
@@ -812,12 +859,21 @@ module TestCentricity
812
859
  # volume_slider.aria_valuenow
813
860
  #
814
861
  def aria_valuenow
815
- get_attribute('aria-valuenow')
862
+ result = get_attribute('aria-valuenow')
863
+ unless result.blank?
864
+ if result.is_int?
865
+ result.to_i
866
+ elsif result.is_float?
867
+ result.to_f
868
+ else
869
+ result
870
+ end
871
+ end
816
872
  end
817
873
 
818
874
  # Return state of UI object's aria-valuetext property
819
875
  #
820
- # @return [Integer]
876
+ # @return [String]
821
877
  # @example
822
878
  # volume_slider.aria_valuetext
823
879
  #
@@ -827,7 +883,7 @@ module TestCentricity
827
883
 
828
884
  # Return state of UI object's aria-orientation property
829
885
  #
830
- # @return [Integer]
886
+ # @return [String]
831
887
  # @example
832
888
  # volume_slider.aria_orientation
833
889
  #
@@ -837,7 +893,7 @@ module TestCentricity
837
893
 
838
894
  # Return state of UI object's aria-keyshortcuts property
839
895
  #
840
- # @return [Integer]
896
+ # @return [String]
841
897
  # @example
842
898
  # play_button.aria_keyshortcuts
843
899
  #
@@ -847,7 +903,7 @@ module TestCentricity
847
903
 
848
904
  # Return state of UI object's aria-roledescription property
849
905
  #
850
- # @return [Integer]
906
+ # @return [String]
851
907
  # @example
852
908
  # editor_button.aria_roledescription
853
909
  #
@@ -857,7 +913,7 @@ module TestCentricity
857
913
 
858
914
  # Return state of UI object's aria-autocomplete property
859
915
  #
860
- # @return [Integer]
916
+ # @return [Boolean]
861
917
  # @example
862
918
  # email_field.aria_autocomplete
863
919
  #
@@ -867,7 +923,7 @@ module TestCentricity
867
923
 
868
924
  # Return state of UI object's aria-controls property
869
925
  #
870
- # @return [Integer]
926
+ # @return [String]
871
927
  # @example
872
928
  # video_menu.aria_controls
873
929
  #
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: 4.6.6
4
+ version: 4.6.8
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: 2025-10-10 00:00:00.000000000 Z
11
+ date: 2025-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 10.1.0
33
+ version: 10.1.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 10.1.0
40
+ version: 10.1.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cuke_modeler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 4.36.0
145
+ version: 4.37.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 4.36.0
152
+ version: 4.37.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: simplecov
155
155
  requirement: !ruby/object:Gem::Requirement