testcentricity_web 0.6.9 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 03703d2b0ac30d1ce1ee17b03a87aaba02182010
4
- data.tar.gz: 378535ae31a639179f88579bcd3ac9b369bed9dd
3
+ metadata.gz: f7669934f638a1ce75ba13d43ef7a17da1883b9a
4
+ data.tar.gz: 7ca1f4430577adc7b41688a1952b1b47db932bde
5
5
  SHA512:
6
- metadata.gz: 843eebcf476273c0b468f19423d80b23c53e34bcd96ffe068993a734c80d641475fc9cbe0258616b82d51c8dbfff452c52d778c9a9e79e127cb00f52e4097d10
7
- data.tar.gz: 45a2d098a68bdd8fe403f2089ddf2541cefe8000f98a20f41dd155c66f99dddb3d5a58fce1129a1c6abaf023d3774496dac98668e21310a46d04b839720c3d89
6
+ metadata.gz: 8913a47dc24856fd37decd2ff2bbd5087f2d98971dc317512ca1d98c3b1a18719a8626c751501819c03795c5440146e4ea5e4a876e0c0990b5341877e4ee13e4
7
+ data.tar.gz: 6dbafac51fca7ddf1692df685df156bf715c8f77e4083a13f64d2e0457870285aec97c6f7369340bc11d2e963dfb65d73bc48411fb4983146df37f4f4de2509e
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # TestCentricityWeb
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/testcentricity_web.svg)](https://badge.fury.io/rb/testcentricity_web) [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](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
- data_file = get_environment_data_file
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 ||= 4
337
- attributes = [:text, :name, :id, :css, :xpath]
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 ||= 4
292
- attributes = [:text, :name, :id, :css, :xpath]
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
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '0.6.9'
2
+ VERSION = '0.7.0'
3
3
  end
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.6.9
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-05 00:00:00.000000000 Z
11
+ date: 2016-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler