itms_automation 2.7.6 → 2.8.1

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: 1d59d0694d3201fa93f0ea8fdbd787400d6f79753fb9759e3c54772d641ae7fd
4
- data.tar.gz: 8eb5466b6ae94727f5142fb678a8e1a7c545e4c448006669d3e08ace9fcb6338
3
+ metadata.gz: 3b7af90bc163f78304a796422a6256320e586e7e673afdbea7b527e32fa39d20
4
+ data.tar.gz: e014da4ceeeb5c4f8d7e3aadd7312590d20febb3829c89985c01ec2e7c21c167
5
5
  SHA512:
6
- metadata.gz: 9ace8095d996cafd7ecc92fa453263c0bc3c98f07af485c7bc743a65f57d1ad2139951a25af9a1eb004e266d1f37ba118daf747d7a710b945369b6bfeb36172d
7
- data.tar.gz: 7a95c3ce305418b022778fd1c003c2dc5d6d0f42294bfd6351c96cbc20b67298015e4f1cf505d0a9196b56fa2232aac02e2a0e757a24988ac747591ad1762b7d
6
+ metadata.gz: 1278e427219bdd846531aa56510e115fa1039bd5116cd18624bf46bc19b4db4bf71af7af19d27e555f6cba482f1df628bb0fafa516a3dfe33e6b6b4ad38c4811
7
+ data.tar.gz: 7a63731b6465ec76fe2f5f2e446336351b3460120fc4f058953f64094278a3aab6df41ceef69e10b87113662f4df7327f6828ca34aaa27fbcdc9a3223d6c84df
@@ -10,5 +10,5 @@
10
10
 
11
11
  # Then('the message {string} should be displayed') do |string|
12
12
  # message = $driver.find_element(:css, '#flash').text.delete("\n")
13
- # expect(message).to eql(string)
14
- # end
13
+ # # expect(message).to eql(string)
14
+ # end
@@ -7,7 +7,7 @@ require 'rspec'
7
7
  # Method to verify title
8
8
  # param 1: String : expected title
9
9
  def assert_title(title)
10
- expect($driver.title).to eq(title)
10
+ # expect($driver.title).to eq(title)
11
11
  end
12
12
 
13
13
  # Method to check element text
@@ -16,90 +16,90 @@ end
16
16
  def assert_text(element, expected_value)
17
17
  found_element = find_object(element)
18
18
  element_text = found_element.text
19
- expect(element_text).to eq(expected_value)
19
+ # expect(element_text).to eq(expected_value)
20
20
  end
21
21
 
22
22
  # method to check element presence
23
23
  # param 1: String: Element
24
24
  def assert_element_present(element)
25
25
  found_element = find_object(element)
26
- expect(found_element.length).to be > 0
26
+ # expect(found_element.length).to be > 0
27
27
  end
28
28
 
29
29
  # method to check element not presence
30
30
  # param 1: String: Element
31
31
  def assert_element_not_present(element)
32
32
  found_element = find_object(element)
33
- expect(found_element.length).to eq(0)
33
+ # expect(found_element.length).to eq(0)
34
34
  end
35
35
 
36
36
  # method to assert checkbox check
37
37
  # param 1 : String : Element
38
38
  def assert_checked(element)
39
39
  checkbox = find_object(element)
40
- expect(checkbox.selected?).to be_truthy
40
+ # expect(checkbox.selected?).to be_truthy
41
41
  end
42
42
 
43
43
  def assert_not_checked(element)
44
44
  checkbox = find_object(element)
45
- expect(checkbox.selected?).to be_falsey
45
+ # expect(checkbox.selected?).to be_falsey
46
46
  end
47
47
 
48
48
  # method to check javascript pop-up alert text
49
49
  def assert_alert(text)
50
50
  alert_text = $driver.switch_to.alert.text
51
- expect(alert_text).to eq(text)
51
+ # expect(alert_text).to eq(text)
52
52
  end
53
53
 
54
54
  # method to check javascript pop-up alert text
55
55
  def assert_confirmation(text)
56
56
  alert_text = $driver.switch_to.alert.text
57
- expect(alert_text).to eq(text)
57
+ # expect(alert_text).to eq(text)
58
58
  end
59
59
 
60
60
  def assert_editable(element)
61
61
  found_element = find_object(element)
62
- expect(found_element.enabled?).to be_truthy
62
+ # expect(found_element.enabled?).to be_truthy
63
63
  end
64
64
 
65
65
  def assert_not_editable
66
66
  found_element = find_object(element)
67
- expect(found_element.enabled?).to be_falsey
67
+ # expect(found_element.enabled?).to be_falsey
68
68
  end
69
69
 
70
70
  def assert_not_selected_value(element, text)
71
71
  found_element = find_object(element)
72
72
  value = found_element.attribute("value")
73
- expect(value).not_to eq(text)
73
+ # expect(value).not_to eq(text)
74
74
  end
75
75
 
76
76
  def assert_not_text(element, text)
77
77
  found_element = find_object(element)
78
- expect(found_element.text).not_to eq(text)
78
+ # expect(found_element.text).not_to eq(text)
79
79
  end
80
80
 
81
81
  def assert_prompt(text)
82
82
  alert_text = $driver.switch_to.alert.text
83
- expect(alert_text).to eq(text)
83
+ # expect(alert_text).to eq(text)
84
84
  end
85
85
 
86
86
  def assert_selected_label(element, text)
87
87
  found_element = find_object(element)
88
88
  locator = "option[@value='#{found_element.attribute('value')}']"
89
89
  selected_text = found_element.find_element(:xpath, locator).text
90
- expect(selected_text).to eq(text)
90
+ # expect(selected_text).to eq(text)
91
91
  end
92
92
 
93
93
  def assert_value(element, text)
94
94
  found_element = find_object(element)
95
95
  value = found_element.attribute("value")
96
- expect(value).to eq(text)
96
+ # expect(value).to eq(text)
97
97
  end
98
98
 
99
99
  def assert_selected_value
100
100
  found_element = find_object(element)
101
101
  value = found_element.attribute("value")
102
- expect(value).to eq(text)
102
+ # expect(value).to eq(text)
103
103
  end
104
104
 
105
105
  def assert(var_name, value)
@@ -108,15 +108,17 @@ def assert(var_name, value)
108
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
117
119
  # param 1: String : expected title
118
120
  def verify_title(title)
119
- expect($driver.title).to eq(title)
121
+ # expect($driver.title).to eq(title)
120
122
  end
121
123
 
122
124
  # Method to check element text
@@ -125,73 +127,73 @@ end
125
127
  def verify_text(element, expected_value)
126
128
  found_element = find_object(element)
127
129
  element_text = found_element.text
128
- expect(element_text).to eq(expected_value)
130
+ # expect(element_text).to eq(expected_value)
129
131
  end
130
132
 
131
133
  # method to check element presence
132
134
  # param 1: String: Element
133
135
  def verify_element_present(element)
134
136
  found_element = find_object(element)
135
- expect(found_element.length).to be > 0
137
+ # expect(found_element.length).to be > 0
136
138
  end
137
139
 
138
140
  # method to check element not presence
139
141
  # param 1: String: Element
140
142
  def verify_element_not_present(element)
141
143
  found_element = find_object(element)
142
- expect(found_element.length).to eq(0)
144
+ # expect(found_element.length).to eq(0)
143
145
  end
144
146
 
145
147
  # method to assert checkbox check
146
148
  # param 1 : String : Element
147
149
  def verify_checked(element)
148
150
  checkbox = find_object(element)
149
- expect(checkbox.selected?).to be_truthy
151
+ # expect(checkbox.selected?).to be_truthy
150
152
  end
151
153
 
152
154
  def verify_not_checked(element)
153
155
  checkbox = find_object(element)
154
- expect(checkbox.selected?).to be_falsey
156
+ # expect(checkbox.selected?).to be_falsey
155
157
  end
156
158
 
157
159
  def verify_editable(element)
158
160
  found_element = find_object(element)
159
- expect(found_element.enabled?).to be_truthy
161
+ # expect(found_element.enabled?).to be_truthy
160
162
  end
161
163
 
162
164
  def verify_not_editable
163
165
  found_element = find_object(element)
164
- expect(found_element.enabled?).to be_falsey
166
+ # expect(found_element.enabled?).to be_falsey
165
167
  end
166
168
 
167
169
  def verify_not_selected_value(element, text)
168
170
  found_element = find_object(element)
169
171
  value = found_element.attribute("value")
170
- expect(value).not_to eq(text)
172
+ # expect(value).not_to eq(text)
171
173
  end
172
174
 
173
175
  def verify_not_text(element, text)
174
176
  found_element = find_object(element)
175
- expect(found_element.text).not_to eq(text)
177
+ # expect(found_element.text).not_to eq(text)
176
178
  end
177
179
 
178
180
  def verify_selected_label(element, text)
179
181
  found_element = find_object(element)
180
182
  locator = "option[@value='#{found_element.attribute('value')}']"
181
183
  selected_text = found_element.find_element(:xpath, locator).text
182
- expect(selected_text).to eq(text)
184
+ # expect(selected_text).to eq(text)
183
185
  end
184
186
 
185
187
  def verify_value(element, text)
186
188
  found_element = find_object(element)
187
189
  value = found_element.attribute("value")
188
- expect(value).to eq(text)
190
+ # expect(value).to eq(text)
189
191
  end
190
192
 
191
193
  def verify_selected_value
192
194
  found_element = find_object(element)
193
195
  value = found_element.attribute("value")
194
- expect(value).to eq(text)
196
+ # expect(value).to eq(text)
195
197
  end
196
198
 
197
199
  def verify(var_name, value)
@@ -200,9 +202,11 @@ def verify(var_name, value)
200
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.6'
3
+ VERSION = '2.8.1'
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.6
4
+ version: 2.8.1
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-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.2
19
+ version: 5.3.0
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: 3.1.2
22
+ version: 5.3.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 3.1.2
29
+ version: 5.3.0
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: 3.1.2
32
+ version: 5.3.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: webdrivers
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -110,26 +110,6 @@ dependencies:
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
112
  version: '1.8'
113
- - !ruby/object:Gem::Dependency
114
- name: rspec
115
- requirement: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- version: '3.5'
120
- - - "~>"
121
- - !ruby/object:Gem::Version
122
- version: '3.5'
123
- type: :runtime
124
- prerelease: false
125
- version_requirements: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - ">="
128
- - !ruby/object:Gem::Version
129
- version: '3.5'
130
- - - "~>"
131
- - !ruby/object:Gem::Version
132
- version: '3.5'
133
113
  description: Behavior driven development (BDD) approach to write automation test script
134
114
  to test Web and Android applications.
135
115
  email: anh.pham@infodation.vn