testcentricity_web 0.6.9 → 0.7.0
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/README.md +3 -0
- data/lib/testcentricity_web/data_objects_helper.rb +2 -6
- data/lib/testcentricity_web/page_objects_helper.rb +4 -0
- data/lib/testcentricity_web/page_sections_helper.rb +8 -3
- data/lib/testcentricity_web/ui_elements_helper.rb +4 -3
- data/lib/testcentricity_web/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7669934f638a1ce75ba13d43ef7a17da1883b9a
|
4
|
+
data.tar.gz: 7ca1f4430577adc7b41688a1952b1b47db932bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8913a47dc24856fd37decd2ff2bbd5087f2d98971dc317512ca1d98c3b1a18719a8626c751501819c03795c5440146e4ea5e4a876e0c0990b5341877e4ee13e4
|
7
|
+
data.tar.gz: 6dbafac51fca7ddf1692df685df156bf715c8f77e4083a13f64d2e0457870285aec97c6f7369340bc11d2e963dfb65d73bc48411fb4983146df37f4f4de2509e
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# TestCentricityWeb
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/testcentricity_web) [](http://opensource.org/licenses/BSD-3-Clause)
|
4
|
+
|
5
|
+
|
3
6
|
The TestCentricity™ core generic framework for desktop and mobile web site testing implements a Page Object and Data Object Model DSL for
|
4
7
|
use with Cucumber, Capybara, and Selenium-Webdriver.
|
5
8
|
|
@@ -26,13 +26,9 @@ module TestCentricity
|
|
26
26
|
class DataSource
|
27
27
|
attr_accessor :current
|
28
28
|
|
29
|
-
def get_environment_data_file
|
30
|
-
environment = ENV['TEST_ENVIRONMENT']
|
31
|
-
"#{XL_PRIMARY_DATA_PATH}#{environment}_data.xls"
|
32
|
-
end
|
33
|
-
|
34
29
|
def pick_excel_data_source(sheet, row_name)
|
35
|
-
|
30
|
+
environment = ENV['TEST_ENVIRONMENT']
|
31
|
+
data_file = "#{XL_PRIMARY_DATA_PATH}#{environment}_data.xls"
|
36
32
|
data_file = XL_PRIMARY_DATA_FILE unless ExcelData.rowspec_exists?(data_file, sheet, row_name)
|
37
33
|
data_file
|
38
34
|
end
|
@@ -250,6 +250,8 @@ module TestCentricity
|
|
250
250
|
actual = ui_object.read_only?
|
251
251
|
when :checked
|
252
252
|
actual = ui_object.checked?
|
253
|
+
when :selected
|
254
|
+
actual = ui_object.selected?
|
253
255
|
when :value
|
254
256
|
actual = ui_object.get_value
|
255
257
|
when :maxlength
|
@@ -302,6 +304,8 @@ module TestCentricity
|
|
302
304
|
(data_field.get_siebel_object_type == 'JComboBox') ?
|
303
305
|
data_field.set("#{data_param}\t") :
|
304
306
|
data_field.choose_option(data_param)
|
307
|
+
when :radio
|
308
|
+
data_field.set_selected_state(data_param.to_bool)
|
305
309
|
when :textfield
|
306
310
|
data_field.set("#{data_param}\t")
|
307
311
|
end
|
@@ -170,7 +170,7 @@ module TestCentricity
|
|
170
170
|
|
171
171
|
def get_locator
|
172
172
|
(@locator.empty? && defined?(section_locator)) ? locator = section_locator : locator = @locator
|
173
|
-
(@context == :section && !@parent.nil? && !@parent.get_locator.nil?) ? "#{@parent.get_locator}#{locator}" : locator
|
173
|
+
(@context == :section && !@parent.nil? && !@parent.get_locator.nil?) ? "#{@parent.get_locator} #{locator}" : locator
|
174
174
|
end
|
175
175
|
|
176
176
|
def set_parent(parent)
|
@@ -266,6 +266,8 @@ module TestCentricity
|
|
266
266
|
actual = ui_object.read_only?
|
267
267
|
when :checked
|
268
268
|
actual = ui_object.checked?
|
269
|
+
when :selected
|
270
|
+
actual = ui_object.selected?
|
269
271
|
when :value
|
270
272
|
actual = ui_object.get_value
|
271
273
|
when :maxlength
|
@@ -319,6 +321,8 @@ module TestCentricity
|
|
319
321
|
(data_field.get_siebel_object_type == 'JComboBox') ?
|
320
322
|
data_field.set("#{data_param}\t") :
|
321
323
|
data_field.choose_option(data_param)
|
324
|
+
when :radio
|
325
|
+
data_field.set_selected_state(data_param.to_bool)
|
322
326
|
when :textfield
|
323
327
|
data_field.set("#{data_param}\t")
|
324
328
|
end
|
@@ -333,9 +337,10 @@ module TestCentricity
|
|
333
337
|
locator = get_locator
|
334
338
|
saved_wait_time = Capybara.default_max_wait_time
|
335
339
|
Capybara.default_max_wait_time = 0.1
|
336
|
-
tries ||=
|
337
|
-
attributes = [:
|
340
|
+
tries ||= 2
|
341
|
+
attributes = [:id, :xpath, :css]
|
338
342
|
type = attributes[tries]
|
343
|
+
locator = locator.gsub(" //", "//") if type == :xpath
|
339
344
|
obj = page.find(type, locator)
|
340
345
|
[obj, type]
|
341
346
|
rescue
|
@@ -285,12 +285,13 @@ module TestCentricity
|
|
285
285
|
|
286
286
|
def find_element
|
287
287
|
@alt_locator.nil? ? locator = @locator : locator = @alt_locator
|
288
|
-
locator = "#{@parent.get_locator}#{locator}" if @context == :section && !@parent.get_locator.nil?
|
288
|
+
locator = "#{@parent.get_locator} #{locator}" if @context == :section && !@parent.get_locator.nil?
|
289
289
|
saved_wait_time = Capybara.default_max_wait_time
|
290
290
|
Capybara.default_max_wait_time = 0.01
|
291
|
-
tries ||=
|
292
|
-
attributes = [:
|
291
|
+
tries ||= 2
|
292
|
+
attributes = [:id, :xpath, :css]
|
293
293
|
type = attributes[tries]
|
294
|
+
locator = locator.gsub(" //", "//") if type == :xpath
|
294
295
|
obj = page.find(type, locator)
|
295
296
|
[obj, type]
|
296
297
|
rescue
|
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: 0.
|
4
|
+
version: 0.7.0
|
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: 2016-04-
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|