itms_automation 2.7.5 → 2.8.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
  SHA256:
3
- metadata.gz: 9b64bf92d7eea643ea0cfa8fce4ffa9fcbec40c94c410f55304d6478d3a5c217
4
- data.tar.gz: 366081969d763d1d5035febd1edc5543f43398d7bb8d27fb72eb35eff2c6df64
3
+ metadata.gz: f44e1a4bb96efce9f851bf4bcbd11108db3856595d32e940699edf95e1ebcbd3
4
+ data.tar.gz: 165b6b503836b9e6ea7acf5e700f18486ff7cdf9e1471c565db7f957a636f1fc
5
5
  SHA512:
6
- metadata.gz: fb24cfbbeeaf755cbfff7ae58fc31ac4cac98c7d004063499726aa32a087feff4e2e3287e211bcac139c5f4fb429bd66324ab5a5233e5507e3e1ad4c54c4bc48
7
- data.tar.gz: 48cf28006a35fe632d99831677b178ed0cd926d1247fd2ff6ca24c4ca28989e9a14ec60d51f59b366515691620be383f954fe2997c47e18a43f3b12cad0c95ee
6
+ metadata.gz: 2b7f0dab42347fd05cb773266ebee0feacd9ebf69adb206a920881ed300068edc64e292f5bd6f0ceca1e4629da311b4ddfda0b425320099dce045346d6d1eb05
7
+ data.tar.gz: 0abefb32cae0d52a79d34d75cf69202fd9ed9937cd0e25b46f1edc6b397a574603a7d2aed0fc7a9aa685c64e4d848f4595e0e3421e9adc523c4d30bc32d2bdcb
@@ -105,12 +105,14 @@ end
105
105
  def assert(var_name, value)
106
106
  if (value == "true" || value == "false")
107
107
  _value = value
108
- else elseif (value == '0' || !!number_or_nil(value)) {
108
+ else elseif (value == '0' || !!number_or_nil(value))
109
109
  _value = value
110
110
  end
111
- result = _value
112
- ? expect($vars[var_name]).to eq(_value)
113
- : expect($vars[var_name]).to eq(value)
111
+ result = if _value
112
+ expect($vars[var_name]).to eq(_value)
113
+ else
114
+ expect($vars[var_name]).to eq(value)
115
+ end
114
116
  end
115
117
 
116
118
  # Method to verify title
@@ -197,12 +199,14 @@ end
197
199
  def verify(var_name, value)
198
200
  if (value == "true" || value == "false")
199
201
  _value = value
200
- else elseif (value == '0' || !!number_or_nil(value)) {
202
+ else elseif (value == '0' || !!number_or_nil(value))
201
203
  _value = value
202
204
  end
203
- result = _value
204
- ? expect($vars[var_name]).to eq(_value)
205
- : expect($vars[var_name]).to eq(value)
205
+ result = if _value
206
+ expect($vars[var_name]).to eq(_value)
207
+ else
208
+ expect($vars[var_name]).to eq(value)
209
+ end
206
210
  end
207
211
 
208
212
  # Method to find difference between images
@@ -1,13 +1,13 @@
1
1
  require_relative 'required_files'
2
2
 
3
3
  def if(condition_script)
4
- return $driver.execute_script(condition_script)
4
+ $driver.execute_script(condition_script)
5
5
  end
6
6
 
7
7
  def else_if(condition_script)
8
- return $driver.execute_script(condition_script)
8
+ $driver.execute_script(condition_script)
9
9
  end
10
10
 
11
11
  def while(condition_script)
12
- return $driver.execute_script(condition_script)
12
+ $driver.execute_script(condition_script)
13
13
  end
@@ -76,17 +76,17 @@ def edit_content(element, text)
76
76
  $driver.execute_script("if (arguments[0].contentEditable === 'true') {arguments[0].innerText = '#{text}'}", found_element)
77
77
  end
78
78
 
79
- def add_selection(label)
79
+ def add_selection(element, label)
80
80
  found_element = find_object(element)
81
81
  found_element.find_element(:xpath, "//option[. = '#{label}']").click
82
82
  end
83
83
 
84
- def remove_selection
84
+ def remove_selection(element, label)
85
85
  found_element = find_object(element)
86
86
  found_element.find_element(:xpath, "//option[. = '#{label}']").click
87
87
  end
88
88
 
89
- def select
89
+ def select(element)
90
90
  found_element = find_object(element)
91
91
  found_element.find_element(:xpath, "//option[. = '#{label}']").click
92
92
  end
@@ -1,6 +1,4 @@
1
- require 'net/https'
2
1
  require_relative 'required_files'
3
- require 'rspec'
4
2
 
5
3
  def store(var_name, value)
6
4
  $vars[var_name] = value
@@ -1,5 +1,5 @@
1
1
  module ITMS
2
2
  module Automation
3
- VERSION = '2.7.5'
3
+ VERSION = '2.8.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itms_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.5
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - INFOdation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-12 00:00:00.000000000 Z
11
+ date: 2021-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber