testcentricity_web 4.7.1 → 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 +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +42 -0
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +4 -0
- data/lib/testcentricity_web/web_elements/ui_element.rb +24 -0
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3103f915327a804e3c65fc944cd20cc319e6ff9ae8a512cb467a6a4467e4e389
|
|
4
|
+
data.tar.gz: 14c47d15e314bdf19d1151c526ef3f7a3b52ee29330613f3d51fd4a68aba8861
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '08ad1d7a1b710ed1aa03bdb9c8bda7fe13e6d01327ba637b27ba70d81c3f06c1a5643d9fdeaa269a998e14a494bab4e8649704f308c52af00c392aebc26a58b5'
|
|
7
|
+
data.tar.gz: 447537cae7f7d30208d7fb9da8538ce6073f5ae1e1aab8fcdec86a19c0a4d06ea5f437b0c5ffff5a89d528e07bac7e4945c38e3d6720ae5909a6a2d4247640a2
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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
|
+
|
|
5
15
|
## [4.7.1] - 13-JAN-2026
|
|
6
16
|
|
|
7
17
|
### Fixed
|
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
|
+

|
|
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
|
|
|
@@ -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,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: testcentricity_web
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.7.
|
|
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-
|
|
11
|
+
date: 2026-02-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: axe-core-cucumber
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - '='
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 10.
|
|
47
|
+
version: 10.1.1
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - '='
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 10.
|
|
54
|
+
version: 10.1.1
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: cuke_modeler
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -434,7 +434,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
434
434
|
version: '0'
|
|
435
435
|
requirements:
|
|
436
436
|
- Capybara, Selenium-WebDriver
|
|
437
|
-
rubygems_version: 3.4.
|
|
437
|
+
rubygems_version: 3.4.19
|
|
438
438
|
signing_key:
|
|
439
439
|
specification_version: 4
|
|
440
440
|
summary: A Page Object Model Framework for desktop and mobile web testing
|