testcentricity_web 3.2.22 → 3.2.23
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 +7 -0
- data/Gemfile.lock +1 -1
- data/lib/testcentricity_web/exception_queue_helper.rb +28 -5
- data/lib/testcentricity_web/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 201a3a1fe2a5b1283ab8a737e74926b33499996716889284fe01b529ae139ea5
|
4
|
+
data.tar.gz: d34074fd5d9a2f3c651a70dca4dd0698bf4213033df533804ec3d6cd3e834b54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 421f09ad690ae3edbab6ac272d80e6e9839d7cd2651323419dbc0b3226839a3b370fce2d5e1900ccf6fc8aac6c441e0b7f1167022f0b908effabaac6d3b94f48
|
7
|
+
data.tar.gz: d1c0c2cc3d8225515d9305be4a26ad13ccc6ef00bd05ac9d4328db9e5251e85d2a8872866d702e72b535b4da0978c83c05f3c86be24124adf8e718aa7dd4ca40
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
4
|
|
5
|
+
## [3.2.23] - 11-FEB-2021
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to allow `:translate_upcase`,
|
9
|
+
`:translate_downcase`, `:translate_capitalize`, and `:translate_titlecase` conversions to fall back to `:en` default
|
10
|
+
locale if translated strings are missing from the current locale specified in `I18n.locale`.
|
11
|
+
|
5
12
|
## [3.2.22] - 09-FEB-2021
|
6
13
|
|
7
14
|
### Fixed
|
data/Gemfile.lock
CHANGED
@@ -76,22 +76,22 @@ module TestCentricity
|
|
76
76
|
expected = expected.downcase
|
77
77
|
enqueue_exception("#{error_msg} be like '#{value}' but found '#{actual}'") unless actual_like.include?(expected)
|
78
78
|
when :translate
|
79
|
-
expected =
|
79
|
+
expected = translate(value)
|
80
80
|
enqueue_assert_equal(expected, actual, error_msg)
|
81
81
|
when :translate_upcase
|
82
|
-
expected =
|
82
|
+
expected = translate(value)
|
83
83
|
expected = expected.is_a?(Array) ? expected.map(&:upcase) : expected.upcase
|
84
84
|
enqueue_assert_equal(expected, actual, error_msg)
|
85
85
|
when :translate_downcase
|
86
|
-
expected =
|
86
|
+
expected = translate(value)
|
87
87
|
expected = expected.is_a?(Array) ? expected.map(&:downcase) : expected.downcase
|
88
88
|
enqueue_assert_equal(expected, actual, error_msg)
|
89
89
|
when :translate_capitalize
|
90
|
-
expected =
|
90
|
+
expected = translate(value)
|
91
91
|
expected = expected.is_a?(Array) ? expected.map(&:capitalize) : expected.capitalize
|
92
92
|
enqueue_assert_equal(expected, actual, error_msg)
|
93
93
|
when :translate_titlecase
|
94
|
-
expected =
|
94
|
+
expected = translate(value)
|
95
95
|
expected = if expected.is_a?(Array)
|
96
96
|
result = []
|
97
97
|
expected.each do |item|
|
@@ -137,6 +137,29 @@ module TestCentricity
|
|
137
137
|
screen_shot = {path: path, filename: filename}
|
138
138
|
Environ.save_screen_shot(screen_shot)
|
139
139
|
end
|
140
|
+
|
141
|
+
def self.translate(*args, **opts)
|
142
|
+
opts[:locale] ||= I18n.locale
|
143
|
+
opts[:raise] = true
|
144
|
+
I18n.translate(*args, **opts)
|
145
|
+
rescue I18n::MissingTranslationData => err
|
146
|
+
puts err
|
147
|
+
opts[:locale] = :en
|
148
|
+
|
149
|
+
# fallback to en if the translation is missing. If the translation isn't
|
150
|
+
# in en, then raise again.
|
151
|
+
disable_enforce_available_locales do
|
152
|
+
I18n.translate(*args, **opts)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
def self.disable_enforce_available_locales
|
157
|
+
saved_enforce_available_locales = I18n.enforce_available_locales
|
158
|
+
I18n.enforce_available_locales = false
|
159
|
+
yield
|
160
|
+
ensure
|
161
|
+
I18n.enforce_available_locales = saved_enforce_available_locales
|
162
|
+
end
|
140
163
|
end
|
141
164
|
|
142
165
|
|
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.2.
|
4
|
+
version: 3.2.23
|
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: 2021-02-
|
11
|
+
date: 2021-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|