testcentricity_web 2.1.6 → 2.1.7

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: 31f6ff7d7a70b6f4c67829d076811ed86841ed2c
4
- data.tar.gz: ba9809e602056012eb85a452cff74783a7b605f5
3
+ metadata.gz: e5f8235d007aebe3eebc32d47e11fee9c48a8f6f
4
+ data.tar.gz: d2c0cbec80747aa8e3acdb711e986b7a079f3cca
5
5
  SHA512:
6
- metadata.gz: ecffd485e7ad4606728f03466420bbba8e967ca8daeede18102a6eb389609da0d9dbe5ca899125da0b0281e398d528dc462fa008ee0f45d1f39a975bfa12bb4d
7
- data.tar.gz: fca97334d54d6f096da86ae492a0e83776f79fb84d9ea485f53c7ffa966f8ca08446faa8c93b9dab2c3a397e38482b83f32840ead3b2619473579caca163cf9a
6
+ metadata.gz: 0491b6b3300c0ed2330b09631c68eac18d239c2721f4ce8769443b8007d7fceda99a691c322e272f44365bd5f499827272124486a36a05b9629c48aa5a5783b6
7
+ data.tar.gz: 94c34fffcf56b0426b8ed35b27de3c58fba272fbbcf53904d4b746d2ea8bacb8e529ea908488509a5839e1a643d0c8fe091b8cc4937372d4fe270357ec202127
data/README.md CHANGED
@@ -23,6 +23,11 @@ feature incomplete and potentially unstable. More information can be found [here
23
23
 
24
24
 
25
25
  ## What's New
26
+ ###Version 2.1.7
27
+
28
+ * Updated `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods to use backspace characters to delete contents of a textfield
29
+ instead of using `clear`, which was preventing `onchange` JavaScript events from being triggered in some browsers.
30
+
26
31
  ###Version 2.1.5
27
32
 
28
33
  * Added `get_min`, `get_max`, and `get_step` methods to `TextField` class.
@@ -605,19 +605,21 @@ module TestCentricity
605
605
 
606
606
  # Populate the specified UI elements on this page with the associated data from a Hash passed as an argument. Data
607
607
  # values must be in the form of a String for textfield and select list controls. For checkbox and radio buttons,
608
- # data must either be a Boolean or a String that evaluates to a Boolean value (Yes, No, 1, 0, true, false)
608
+ # data must either be a Boolean or a String that evaluates to a Boolean value (Yes, No, 1, 0, true, false).
609
+ #
610
+ # To delete all text content in a text field, pass !DELETE as the data to be entered.
609
611
  #
610
612
  # @param data [Hash] UI element(s) and associated data to be entered
611
613
  # @example
612
- # data = { prefix_select => 'Ms',
613
- # first_name_field => 'Priscilla',
614
- # last_name_field => 'Pumperknickle',
615
- # gender_select => 'Female',
616
- # dob_field => '11/18/1976',
617
- # email_field => 'p.pumperknickle4876@gmail.com',
618
- # mailing_list_check => 'Yes'
614
+ # field_data = { prefix_select => 'Ms',
615
+ # first_name_field => 'Priscilla',
616
+ # last_name_field => 'Pumperknickle',
617
+ # gender_select => 'Female',
618
+ # dob_field => '11/18/1976',
619
+ # email_field => 'p.pumperknickle4876@gmail.com',
620
+ # mailing_list_check => 'Yes'
619
621
  # }
620
- # populate_data_fields(data)
622
+ # populate_data_fields(field_data)
621
623
  #
622
624
  def populate_data_fields(data)
623
625
  data.each do |data_field, data_param|
@@ -625,7 +627,12 @@ module TestCentricity
625
627
  # make sure the intended UI target element exists before trying to set its value
626
628
  data_field.wait_until_exists(2)
627
629
  if data_param == '!DELETE'
628
- data_field.set('')
630
+ length = data_field.get_value.length
631
+ length.times do
632
+ data_field.send_keys(:backspace)
633
+ end
634
+ sleep(0.5)
635
+ data_field.send_keys(:tab)
629
636
  else
630
637
  case data_field.get_object_type
631
638
  when :checkbox
@@ -722,7 +722,9 @@ module TestCentricity
722
722
  # Populate the specified UI elements in this Section object with the associated data from a Hash passed as an
723
723
  # argument. Data values must be in the form of a String for textfield and select list controls. For checkbox
724
724
  # and radio buttons, data must either be a Boolean or a String that evaluates to a Boolean value (Yes, No, 1,
725
- # 0, true, false)
725
+ # 0, true, false).
726
+ #
727
+ # To delete all text content in a text field, pass !DELETE as the data to be entered.
726
728
  #
727
729
  # @param data [Hash] UI element(s) and associated data to be entered
728
730
  # @example
@@ -742,7 +744,12 @@ module TestCentricity
742
744
  # make sure the intended UI target element exists before trying to set its value
743
745
  data_field.wait_until_exists(2)
744
746
  if data_param == '!DELETE'
745
- data_field.set('')
747
+ length = data_field.get_value.length
748
+ length.times do
749
+ data_field.send_keys(:backspace)
750
+ end
751
+ sleep(0.5)
752
+ data_field.send_keys(:tab)
746
753
  else
747
754
  case data_field.get_object_type
748
755
  when :checkbox
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '2.1.6'
2
+ VERSION = '2.1.7'
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: 2.1.6
4
+ version: 2.1.7
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: 2017-10-31 00:00:00.000000000 Z
11
+ date: 2017-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler