itms_automation 2.8.1 → 2.8.2

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: 3b7af90bc163f78304a796422a6256320e586e7e673afdbea7b527e32fa39d20
4
- data.tar.gz: e014da4ceeeb5c4f8d7e3aadd7312590d20febb3829c89985c01ec2e7c21c167
3
+ metadata.gz: 754a945d71cd78a122aed2fb3ca6d57ed3a0e96f2d2f2692d44f152ff0cd7e65
4
+ data.tar.gz: f4dc719c62d3ad21996faa51abdd363779ea401ef89b3e1162891ec32c756751
5
5
  SHA512:
6
- metadata.gz: 1278e427219bdd846531aa56510e115fa1039bd5116cd18624bf46bc19b4db4bf71af7af19d27e555f6cba482f1df628bb0fafa516a3dfe33e6b6b4ad38c4811
7
- data.tar.gz: 7a63731b6465ec76fe2f5f2e446336351b3460120fc4f058953f64094278a3aab6df41ceef69e10b87113662f4df7327f6828ca34aaa27fbcdc9a3223d6c84df
6
+ metadata.gz: 57e68ba280c3517a4b12cfaf6e01022ac3384176d1b390e5ea42639e0bc7243de013ec94f59e907fbf7346bf2449c7d75fa6366adcaaeb79afb73995ed0faed1
7
+ data.tar.gz: d9c95871eb0d5ab8b045b8b3101e935ed280f5327543a276db64da664ac5490c21b54ef980b565f3e8a77fde1e31ba9b74dc73bbdf9a0ff0075629485a21b65b
@@ -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)
13
+ # expect(message).to eql(string)
14
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)
@@ -109,16 +109,16 @@ def assert(var_name, value)
109
109
  _value = value
110
110
  end
111
111
  result = if _value
112
- # expect($vars[var_name]).to eq(_value)
112
+ expect($vars[var_name]).to eq(_value)
113
113
  else
114
- # expect($vars[var_name]).to eq(value)
114
+ expect($vars[var_name]).to eq(value)
115
115
  end
116
116
  end
117
117
 
118
118
  # Method to verify title
119
119
  # param 1: String : expected title
120
120
  def verify_title(title)
121
- # expect($driver.title).to eq(title)
121
+ expect($driver.title).to eq(title)
122
122
  end
123
123
 
124
124
  # Method to check element text
@@ -127,73 +127,73 @@ end
127
127
  def verify_text(element, expected_value)
128
128
  found_element = find_object(element)
129
129
  element_text = found_element.text
130
- # expect(element_text).to eq(expected_value)
130
+ expect(element_text).to eq(expected_value)
131
131
  end
132
132
 
133
133
  # method to check element presence
134
134
  # param 1: String: Element
135
135
  def verify_element_present(element)
136
136
  found_element = find_object(element)
137
- # expect(found_element.length).to be > 0
137
+ expect(found_element.length).to be > 0
138
138
  end
139
139
 
140
140
  # method to check element not presence
141
141
  # param 1: String: Element
142
142
  def verify_element_not_present(element)
143
143
  found_element = find_object(element)
144
- # expect(found_element.length).to eq(0)
144
+ expect(found_element.length).to eq(0)
145
145
  end
146
146
 
147
147
  # method to assert checkbox check
148
148
  # param 1 : String : Element
149
149
  def verify_checked(element)
150
150
  checkbox = find_object(element)
151
- # expect(checkbox.selected?).to be_truthy
151
+ expect(checkbox.selected?).to be_truthy
152
152
  end
153
153
 
154
154
  def verify_not_checked(element)
155
155
  checkbox = find_object(element)
156
- # expect(checkbox.selected?).to be_falsey
156
+ expect(checkbox.selected?).to be_falsey
157
157
  end
158
158
 
159
159
  def verify_editable(element)
160
160
  found_element = find_object(element)
161
- # expect(found_element.enabled?).to be_truthy
161
+ expect(found_element.enabled?).to be_truthy
162
162
  end
163
163
 
164
164
  def verify_not_editable
165
165
  found_element = find_object(element)
166
- # expect(found_element.enabled?).to be_falsey
166
+ expect(found_element.enabled?).to be_falsey
167
167
  end
168
168
 
169
169
  def verify_not_selected_value(element, text)
170
170
  found_element = find_object(element)
171
171
  value = found_element.attribute("value")
172
- # expect(value).not_to eq(text)
172
+ expect(value).not_to eq(text)
173
173
  end
174
174
 
175
175
  def verify_not_text(element, text)
176
176
  found_element = find_object(element)
177
- # expect(found_element.text).not_to eq(text)
177
+ expect(found_element.text).not_to eq(text)
178
178
  end
179
179
 
180
180
  def verify_selected_label(element, text)
181
181
  found_element = find_object(element)
182
182
  locator = "option[@value='#{found_element.attribute('value')}']"
183
183
  selected_text = found_element.find_element(:xpath, locator).text
184
- # expect(selected_text).to eq(text)
184
+ expect(selected_text).to eq(text)
185
185
  end
186
186
 
187
187
  def verify_value(element, text)
188
188
  found_element = find_object(element)
189
189
  value = found_element.attribute("value")
190
- # expect(value).to eq(text)
190
+ expect(value).to eq(text)
191
191
  end
192
192
 
193
193
  def verify_selected_value
194
194
  found_element = find_object(element)
195
195
  value = found_element.attribute("value")
196
- # expect(value).to eq(text)
196
+ expect(value).to eq(text)
197
197
  end
198
198
 
199
199
  def verify(var_name, value)
@@ -203,9 +203,9 @@ def verify(var_name, value)
203
203
  _value = value
204
204
  end
205
205
  result = if _value
206
- # expect($vars[var_name]).to eq(_value)
206
+ expect($vars[var_name]).to eq(_value)
207
207
  else
208
- # expect($vars[var_name]).to eq(value)
208
+ expect($vars[var_name]).to eq(value)
209
209
  end
210
210
  end
211
211
 
@@ -51,6 +51,7 @@ def load_object_repository
51
51
  begin
52
52
  loadYAMLfile("features/step_definitions/repositories/project_object.yml")
53
53
  rescue => exception
54
+ p "exception:::#{exception.message}"
54
55
  print_error_object_repository
55
56
  end
56
57
  end
@@ -1,5 +1,5 @@
1
1
  module ITMS
2
2
  module Automation
3
- VERSION = '2.8.1'
3
+ VERSION = '2.8.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itms_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - INFOdation
@@ -110,6 +110,26 @@ 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'
113
133
  description: Behavior driven development (BDD) approach to write automation test script
114
134
  to test Web and Android applications.
115
135
  email: anh.pham@infodation.vn