testcentricity_web 4.7.0 → 4.7.2

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: 6102470c95dae002d34823ce559513917b2d97a01758253e343e6b510335dd29
4
- data.tar.gz: 82c75b633a9fdc676081b08cb6dedf0cdafe8fc4a3e55760a5c9b077265a22b4
3
+ metadata.gz: 3103f915327a804e3c65fc944cd20cc319e6ff9ae8a512cb467a6a4467e4e389
4
+ data.tar.gz: 14c47d15e314bdf19d1151c526ef3f7a3b52ee29330613f3d51fd4a68aba8861
5
5
  SHA512:
6
- metadata.gz: 5299949e037fa7d870038e17a59d09a8df8b5280069c315ecd8c45935143aa21fd5ef809a62a3f252fe61c476d8eac5b5d7834c6deb6cb33bda402496e2407a7
7
- data.tar.gz: 186ba585ddef4bfac4a4e4226095f5bb8887cb1a05871d47a7a2f2e9921922b5cca5cfbba220c5d038f8394938854cece55c05ba5d93db25ca89af66266d7381
6
+ metadata.gz: '08ad1d7a1b710ed1aa03bdb9c8bda7fe13e6d01327ba637b27ba70d81c3f06c1a5643d9fdeaa269a998e14a494bab4e8649704f308c52af00c392aebc26a58b5'
7
+ data.tar.gz: 447537cae7f7d30208d7fb9da8538ce6073f5ae1e1aab8fcdec86a19c0a4d06ea5f437b0c5ffff5a89d528e07bac7e4945c38e3d6720ae5909a6a2d4247640a2
data/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.7.2] - 09-FEB-2026
6
+
7
+ ### Added
8
+ * Added `UIElement.hasHorizontalOverflow?` and `UIElement.hasVerticalOverflow?` methods.
9
+ * Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of the following
10
+ `UIElement` properties:
11
+ * `horizontal_overflow`
12
+ * `vertical_overflow`
13
+
14
+
15
+ ## [4.7.1] - 13-JAN-2026
16
+
17
+ ### Fixed
18
+ * Added `activesupport` gem as a runtime dependency to prevent test failures if gem is not already installed.
19
+
20
+
5
21
  ## [4.7.0] - 12-JAN-2026
6
22
 
7
23
  ### Added
data/README.md CHANGED
@@ -720,6 +720,11 @@ The `verify_ui_states` method supports the following property/state pairs:
720
720
  :secure Boolean
721
721
  :title String
722
722
 
723
+ **Buttons and Text Field Caption Overflow:**
724
+
725
+ :horizontal_overflow or :h_overflow Boolean
726
+ :vertical_overflow or :v_overflow Boolean
727
+
723
728
  **Text Fields:**
724
729
 
725
730
  :readonly Boolean
@@ -1065,6 +1070,43 @@ Baseline translation strings are stored in `.yml` files in the `config/locales/`
1065
1070
  ├── 📄 Gemfile
1066
1071
  └── 📄 README.md
1067
1072
 
1073
+ #### Testing for Text Overflow
1074
+
1075
+ The `verify_ui_states` method can be used to determine if text contained in fields or button captions is truncated due to
1076
+ text overflowing the horizontal or vertical bounds of the associated field or button. The problem of text overflow is especially
1077
+ concerning in web UIs that may be localized to support multiple languages and locales.
1078
+
1079
+ An example of horizontal text overflow in a field and vertical overflow in a button caption is depicted below.
1080
+
1081
+ ![Localized UI](https://raw.githubusercontent.com/TestCentricity/testcentricity_web/main/.github/images/Text_Overflow.png "Localized UI")
1082
+
1083
+ The example below depictsusing the `verify_ui_states` method to verify that text overflow is not occurring in the button
1084
+ captions for a localized popup Shopping Bag panel.
1085
+ ```ruby
1086
+ class BagViewPopup < TestCentricity::PageSection
1087
+ trait(:section_locator) { 'aside.ac-gn-bagview' }
1088
+ trait(:section_name) { 'Shopping Bag Popup' }
1089
+
1090
+ # Shopping Bag Popup UI elements
1091
+ label :bag_message, 'p[class*="ac-gn-bagview-message"]'
1092
+ lists bag_items_list: 'ul[class*="ac-gn-bagview-bag"]',
1093
+ bag_nav_list: 'ul.ac-gn-bagview-nav-list '
1094
+ button :checkout_button, 'a[class*="ac-gn-bagview-button-checkout"]'
1095
+
1096
+ def verify_checkout_ui
1097
+ ui = {
1098
+ checkout_button => {
1099
+ visible: true,
1100
+ enabled: true,
1101
+ caption: { translate: 'BagViewPopup.checkout' },
1102
+ h_overflow: false,
1103
+ v_overflow: false
1104
+ }
1105
+ }
1106
+ verify_ui_states(ui)
1107
+ end
1108
+ end
1109
+ ````
1068
1110
 
1069
1111
  ### Working With Custom UIElements
1070
1112
 
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '4.7.0'
2
+ VERSION = '4.7.2'
3
3
  end
@@ -99,6 +99,10 @@ module TestCentricity
99
99
  ui_object.get_column_count
100
100
  when :placeholder
101
101
  ui_object.get_placeholder
102
+ when :horizontal_overflow, :h_overflow
103
+ ui_object.hasHorizontalOverflow?
104
+ when :vertical_overflow, :v_overflow
105
+ ui_object.hasVerticalOverflow?
102
106
  when :min
103
107
  ui_object.get_min
104
108
  when :max
@@ -574,6 +574,30 @@ module TestCentricity
574
574
  end
575
575
  end
576
576
 
577
+ # Is UI object's text content truncated horizontally?
578
+ #
579
+ # @return [Boolean]
580
+ # @example
581
+ # help_message.hasHorizontalOverflow?
582
+ #
583
+ def hasHorizontalOverflow?
584
+ scroll_width = get_attribute(:scrollWidth)
585
+ client_width = get_attribute(:clientWidth)
586
+ scroll_width > client_width
587
+ end
588
+
589
+ # Is UI object's text content truncated vertically?
590
+ #
591
+ # @return [Boolean]
592
+ # @example
593
+ # help_message.hasVerticalOverflow?
594
+ #
595
+ def hasVerticalOverflow?
596
+ scroll_height = get_attribute(:scrollHeight)
597
+ client_height = get_attribute(:clientHeight)
598
+ scroll_height > client_height
599
+ end
600
+
577
601
  def get_value(visible = true)
578
602
  obj, type = find_element(visible)
579
603
  object_not_found_exception(obj, type)
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.0
4
+ version: 4.7.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: 2026-01-12 00:00:00.000000000 Z
11
+ date: 2026-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: activesupport
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '4.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '4.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: axe-core-cucumber
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +44,14 @@ dependencies:
58
44
  requirements:
59
45
  - - '='
60
46
  - !ruby/object:Gem::Version
61
- version: 10.2.0
47
+ version: 10.1.1
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - '='
67
53
  - !ruby/object:Gem::Version
68
- version: 10.2.0
54
+ version: 10.1.1
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: cuke_modeler
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -206,6 +192,20 @@ dependencies:
206
192
  - - ">="
207
193
  - !ruby/object:Gem::Version
208
194
  version: 0.9.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: activesupport
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '4.0'
202
+ type: :runtime
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '4.0'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: appium_lib
211
211
  requirement: !ruby/object:Gem::Requirement