ds-gui-automation 0.1.40 → 0.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,4 +8,104 @@ Feature: Destination Services Detail
8
8
  When I click on the detail button
9
9
  And I fill the detail information
10
10
  And I proceed to checkout
11
- Then I should see the checkout page correctly
11
+ Then I should see the checkout page correctly
12
+
13
+ @payment_methods
14
+ Scenario Outline: Payment Methods in checkout
15
+ Given I perform a search in "<country>" with "<tracking_id>" from seo URL
16
+ When I click on the detail button of the corresponding "<tracking_id>"
17
+ And I fill the detail information
18
+ And I proceed to tour checkout
19
+ Then I should see the checkout page correctly
20
+ And I should see the payment method for "<brand>"
21
+
22
+ @br
23
+ @vi
24
+ Examples:
25
+ |country|tracking_id|type|brand|
26
+ |BR|HB_ORL_SEAWRLDROW|tours|Visa|
27
+
28
+ @br
29
+ @ac
30
+ Examples:
31
+ |country|tracking_id|type|brand|
32
+ |BR|HB_ORL_SEAWRLDROW|tours|MasterCard|
33
+
34
+ @ar
35
+ @vi
36
+ Examples:
37
+ |country|tracking_id|type|brand|
38
+ |AR|PAM_SLA_104|tours|Visa|
39
+
40
+ @ar
41
+ @ax
42
+ Examples:
43
+ |country|tracking_id|type|brand|
44
+ |AR|PAM_SLA_104|tours|American Express|
45
+
46
+
47
+ @mx
48
+ @vi
49
+ Examples:
50
+ |country|tracking_id|type|brand|
51
+ |MX|HB_LAX_DISNEY1PAK|tours|Visa|
52
+
53
+
54
+ @mx
55
+ @ac
56
+ Examples:
57
+ |country|tracking_id|type|brand|
58
+ |MX|HB_LAX_DISNEY1PAK|tours|MasterCard|
59
+
60
+ @mx
61
+ @ax
62
+ Examples:
63
+ |country|tracking_id|type|brand|
64
+ |MX|HB_LAX_DISNEY1PAK|tours|American Express|
65
+
66
+
67
+ @co
68
+ @vi
69
+ Examples:
70
+ |country|tracking_id|type|brand|
71
+ |CO|HB_ORL_SEAWRLDROW|tours|Visa|
72
+
73
+ @co
74
+ @ac
75
+ Examples:
76
+ |country|tracking_id|type|brand|
77
+ |CO|HB_ORL_SEAWRLDROW|tours|MasterCard|
78
+
79
+ @cl
80
+ @vi
81
+ Examples:
82
+ |country|tracking_id|type|brand|
83
+ |CO|HB_ORL_SEAWRLDROW|tours|Visa|
84
+
85
+ @cl
86
+ @ac
87
+ Examples:
88
+ |country|tracking_id|type|brand|
89
+ |CO|HB_ORL_SEAWRLDROW|tours|MasterCard|
90
+
91
+
92
+ @available_installments
93
+ Scenario Outline: Available installments in checkout
94
+ Given I perform a search in "<country>" with "<tracking_id>" from seo URL
95
+ When I click on the detail button of the corresponding "<tracking_id>"
96
+ And I fill the detail information
97
+ And I proceed to tour checkout
98
+ Then I should see the checkout page correctly
99
+ And I should see the available installments for "<brand>" and "<installments>"
100
+
101
+ @br
102
+ @vi
103
+ Examples:
104
+ |country|tracking_id|type|brand|installments|
105
+ |BR|HB_ORL_SEAWRLDROW|tours|Visa|3x|
106
+
107
+ @br
108
+ @ac
109
+ Examples:
110
+ |country|tracking_id|type|brand|installments|
111
+ |BR|HB_ORL_SEAWRLDROW|tours|MasterCard|3x|
@@ -96,3 +96,19 @@ Then(/^I should see the checkout page correctly$/) do
96
96
  @browser.a(:class, 'ux-common-checkout-buy-button').present?.should be_true
97
97
 
98
98
  end
99
+
100
+ Then(/^I should see the payment method for "(.*)"$/) do | brand |
101
+
102
+ @browser.li(:id, 'payment-list-item-0').radio(:class, 'ux-common-checkout-payment-method-radiobutton').click
103
+
104
+ sleep 2
105
+
106
+ DestinationServicesGUI::Checkout.get_card_brand_by_name(brand).size.eql?(1).should be_true
107
+
108
+ end
109
+
110
+ Then(/^I should see the available installments for "(.*)" and "(.*)"$/) do | brand, installments |
111
+
112
+ (DestinationServicesGUI::Checkout.get_payment_methods(brand, installments).size > 0).should be_true
113
+
114
+ end
@@ -2,6 +2,9 @@ When(/^I fill the checkout information$/) do
2
2
  DestinationServicesGUI::Checkout.fill_passenger_information
3
3
  DestinationServicesGUI::Checkout.fill_credit_card_information
4
4
  DestinationServicesGUI::Checkout.fill_contact_information
5
+
6
+ DestinationServicesGUI::Checkout.fill_billing_information if $SITE == 'AR'
7
+
5
8
  end
6
9
 
7
10
  When(/^I fill the particular information for tours$/) do
data/henry-context.yml CHANGED
@@ -1130,4 +1130,147 @@ tasks:
1130
1130
  - mx
1131
1131
  reports:
1132
1132
  - format: html
1133
- name: ${DATE}_${TASK_NAME}.html
1133
+ name: ${DATE}_${TASK_NAME}.html
1134
+
1135
+ - name: payment_methods_br_vi
1136
+ class_name: Henry::Task::CucumberTask
1137
+ options:
1138
+ tags:
1139
+ - payment_methods
1140
+ - br
1141
+ - vi
1142
+ reports:
1143
+ - format: html
1144
+ name: ${DATE}_${TASK_NAME}.html
1145
+
1146
+ - name: payment_methods_br_ac
1147
+ class_name: Henry::Task::CucumberTask
1148
+ options:
1149
+ tags:
1150
+ - payment_methods
1151
+ - br
1152
+ - ac
1153
+ reports:
1154
+ - format: html
1155
+ name: ${DATE}_${TASK_NAME}.html
1156
+
1157
+ - name: payment_methods_ar_vi
1158
+ class_name: Henry::Task::CucumberTask
1159
+ options:
1160
+ tags:
1161
+ - payment_methods
1162
+ - ar
1163
+ - vi
1164
+ reports:
1165
+ - format: html
1166
+ name: ${DATE}_${TASK_NAME}.html
1167
+
1168
+ - name: payment_methods_ar_ax
1169
+ class_name: Henry::Task::CucumberTask
1170
+ options:
1171
+ tags:
1172
+ - payment_methods
1173
+ - ar
1174
+ - ax
1175
+ reports:
1176
+ - format: html
1177
+ name: ${DATE}_${TASK_NAME}.html
1178
+
1179
+ - name: payment_methods_mx_vi
1180
+ class_name: Henry::Task::CucumberTask
1181
+ options:
1182
+ tags:
1183
+ - payment_methods
1184
+ - mx
1185
+ - vi
1186
+ reports:
1187
+ - format: html
1188
+ name: ${DATE}_${TASK_NAME}.html
1189
+
1190
+ - name: payment_methods_mx_ac
1191
+ class_name: Henry::Task::CucumberTask
1192
+ options:
1193
+ tags:
1194
+ - payment_methods
1195
+ - mx
1196
+ - ac
1197
+ reports:
1198
+ - format: html
1199
+ name: ${DATE}_${TASK_NAME}.html
1200
+
1201
+ - name: payment_methods_mx_ax
1202
+ class_name: Henry::Task::CucumberTask
1203
+ options:
1204
+ tags:
1205
+ - payment_methods
1206
+ - mx
1207
+ - ax
1208
+ reports:
1209
+ - format: html
1210
+ name: ${DATE}_${TASK_NAME}.html
1211
+
1212
+ - name: payment_methods_co_vi
1213
+ class_name: Henry::Task::CucumberTask
1214
+ options:
1215
+ tags:
1216
+ - payment_methods
1217
+ - co
1218
+ - vi
1219
+ reports:
1220
+ - format: html
1221
+ name: ${DATE}_${TASK_NAME}.html
1222
+
1223
+ - name: payment_methods_co_ac
1224
+ class_name: Henry::Task::CucumberTask
1225
+ options:
1226
+ tags:
1227
+ - payment_methods
1228
+ - co
1229
+ - ac
1230
+ reports:
1231
+ - format: html
1232
+ name: ${DATE}_${TASK_NAME}.html
1233
+
1234
+ - name: payment_methods_cl_ac
1235
+ class_name: Henry::Task::CucumberTask
1236
+ options:
1237
+ tags:
1238
+ - payment_methods
1239
+ - cl
1240
+ - ac
1241
+ reports:
1242
+ - format: html
1243
+ name: ${DATE}_${TASK_NAME}.html
1244
+
1245
+ - name: payment_methods_cl_vi
1246
+ class_name: Henry::Task::CucumberTask
1247
+ options:
1248
+ tags:
1249
+ - payment_methods
1250
+ - cl
1251
+ - vi
1252
+ reports:
1253
+ - format: html
1254
+ name: ${DATE}_${TASK_NAME}.html
1255
+
1256
+ - name: available_installments_br_vi
1257
+ class_name: Henry::Task::CucumberTask
1258
+ options:
1259
+ tags:
1260
+ - available_installments
1261
+ - br
1262
+ - vi
1263
+ reports:
1264
+ - format: html
1265
+ name: ${DATE}_${TASK_NAME}.html
1266
+
1267
+ - name: available_installments_br_ac
1268
+ class_name: Henry::Task::CucumberTask
1269
+ options:
1270
+ tags:
1271
+ - available_installments
1272
+ - br
1273
+ - ac
1274
+ reports:
1275
+ - format: html
1276
+ name: ${DATE}_${TASK_NAME}.html
data/lib/ds/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DestinationServicesGUI
2
- VERSION = "0.1.40"
3
- end
2
+ VERSION = "0.1.41"
3
+ end
@@ -8,6 +8,12 @@ module Checkout
8
8
 
9
9
  browser.text_field(:name, 'dsInputDefinition.passengerDefinitions[0].lastName.value').set('Romero')
10
10
 
11
+ browser.send_keys(:enter)
12
+
13
+ sleep 2
14
+
15
+ browser.text_field(:id, 'traveler-document-number-1').set('33555444') if browser.text_field(:id, 'traveler-document-number-1').present?
16
+
11
17
  end
12
18
 
13
19
  def fill_credit_card_information
@@ -22,6 +28,10 @@ module Checkout
22
28
 
23
29
  browser.text_field(:id, 'owner-name').set('Diego QA Romero')
24
30
 
31
+ browser.text_field(:id, 'owner-document-creditcard').set('33444555') if browser.text_field(:id, 'owner-document-creditcard').present?
32
+
33
+ browser.select_list(:id, 'ux-checkout-passenger-gender').select_value('MALE') if browser.select_list(:id, 'ux-checkout-passenger-gender').present?
34
+
25
35
  end
26
36
 
27
37
  def fill_contact_information
@@ -97,4 +107,52 @@ module Checkout
97
107
 
98
108
  end
99
109
 
110
+ def get_card_brand_by_name(brand)
111
+
112
+ brand = browser.select_list(:id, 'ux-common-checkout-creditcard-type').options.reject { | option | !option.text.eql?("#{brand}") }
113
+
114
+ brand
115
+
116
+ end
117
+
118
+ def get_payment_methods_by_installments(installments)
119
+
120
+ methods = browser.ul(:class,'ux-common-checkout-payment-method-payments').lis(:class, 'ux-common-checkout-payment-method-payments-list').reject { | q | !q.div(:class, 'ux-common-checkout-payment-method-quantity').text.include?("#{installments}") }
121
+
122
+ methods
123
+
124
+ end
125
+
126
+ def get_payment_methods(brand, installments)
127
+
128
+ methods = get_payment_methods_by_installments(installments)
129
+
130
+ available = []
131
+
132
+ methods.each do | method |
133
+
134
+ method.radio(:class, 'ux-common-checkout-payment-method-radiobutton').click
135
+
136
+ available << get_card_brand_by_name(brand).first
137
+
138
+ end
139
+
140
+ available
141
+
142
+ end
143
+
144
+ def fill_billing_information
145
+
146
+ browser.select_list(:id, 'addressDefinition-state').select_value(14061)
147
+
148
+ browser.text_field(:id, 'city').set('la pla')
149
+
150
+ sleep 10
151
+
152
+ browser.send_keys(:enter)
153
+
154
+ browser.text_field(:id, 'billingDefinition-street').set('Direccion Test 1234')
155
+
156
+ end
157
+
100
158
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ds-gui-automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.40
4
+ version: 0.1.41
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-24 00:00:00.000000000 Z
12
+ date: 2014-12-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: henry-container