ds-gui-automation 0.1.23 → 0.1.25

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.
data/Gemfile CHANGED
@@ -10,6 +10,8 @@ gem 'henry-container', "~> 0.1.39"#, :path => '~/projects/henry/core/ruby-contai
10
10
  gem 'nokogiri'
11
11
  gem 'i18n-date'
12
12
  gem 'chunky_png'
13
+ gem 'minitest'
14
+ gem 'activesupport'
13
15
 
14
16
  group :development do
15
17
  gem 'debugger'
@@ -0,0 +1,11 @@
1
+ Feature: Destination Services Detail
2
+ As a user,
3
+ I want to be able to get to the checkout page of an activity.
4
+
5
+ @tour_checkout
6
+ Scenario: Checkout from results
7
+ Given I perform a search from seo URL
8
+ When I click on the detail button
9
+ And I fill the detail information
10
+ And I proceed to checkout
11
+ Then I should see the checkout page correctly
@@ -2,13 +2,13 @@ Feature: Destination Services Detail
2
2
  As a user,
3
3
  I want to be able to enter the detail of an activity.
4
4
 
5
- @detail_disney
6
- Scenario: Disney detail price validation
7
- Given I'm on the ticket's detail
8
- Then I should see the detail page with the corresponding prices for each ticket
9
-
10
- @detail
5
+ @tour_detail
11
6
  Scenario: Detail from results
12
7
  Given I perform a search from seo URL
13
8
  When I click on the detail button
14
- Then I should see the detail page for the selected tour
9
+ Then I should see the detail page for the selected tour
10
+
11
+ @disney_detail
12
+ Scenario: Disney detail price validation
13
+ Given I perform a search from seo URL
14
+ Then I should see the disney detail page correctly
@@ -7,3 +7,245 @@ Feature: Destination Services Results
7
7
  Given I perform a search from seo URL
8
8
  Then I should see the result clusters for the specified provider
9
9
 
10
+ @tour_results
11
+ Scenario Outline: results from results
12
+ Given I perform a search in "<country>" with "<tracking_id>" from seo URL
13
+ Then I should see the result clusters for the specified "<tracking_id>"
14
+
15
+ @br
16
+ @hb
17
+ Examples:
18
+ |country|tracking_id|type|
19
+ |BR|HB_ORL_SEAWRLDROW|tours|
20
+ |BR|HB_ORL_LEGOFLORID|tours|
21
+ |BR|HB_ORL_ORLFLEXTIX|tours|
22
+ |BR|HB_ORL_BUSCHROW|tours|
23
+ |BR|HB_NYC_NYCITYPASS|tours|
24
+ |BR|HB_ORL_MCOMDVLTMS|tours|
25
+ |BR|HB_LAX_UNIVERSTUD|tours|
26
+ |BR|HB_ORL_BMGMCOLAT|tours|
27
+ |BR|HB_TPA_BUSCHROW|tours|
28
+
29
+ @br
30
+ @pam
31
+ Examples:
32
+ |country|tracking_id|type|
33
+ |BR|PAM_CUN_1221|tours|
34
+ |BR|PAM_BUE_368|tours|
35
+ |BR|PAM_NYC_259|tours|
36
+ |BR|PAM_BUE_313|tours|
37
+ |BR|PAM_GR3_163|tours|
38
+
39
+ @br
40
+ @gl
41
+ Examples:
42
+ |country|tracking_id|type|
43
+ |BR|GL_SCL_512|tours|
44
+ |BR|GL_NYC_297|tours|
45
+ |BR|GL_SCL_519|tours|
46
+ |BR|GL_ORL_2246|tours|
47
+ |BR|GL_MVD_1619|tours|
48
+
49
+ @br
50
+ @via
51
+ Examples:
52
+ |country|tracking_id|type|
53
+ |BR|VIA_ORL_5090KIDS|tours|
54
+ |BR|VIA_PAR_5307DISNEYPASS|tours|
55
+ |BR|VIA_NYC_3267MTNYC|tours|
56
+
57
+ @ar
58
+ @pam
59
+ Examples:
60
+ |country|tracking_id|type|
61
+ |AR|PAM_SLA_104|tours|
62
+ |AR|PAM_SLA_76|tours|
63
+ |AR|PAM_FTE_620|tours|
64
+ |AR|PAM_MDZ_194|tours|
65
+ |AR|PAM_SLA_73|tours|
66
+
67
+ @mx
68
+ @hb
69
+ Examples:
70
+ |country|tracking_id|type|
71
+ |MX|HB_LAX_DISNEY1PAK|tours|
72
+ |MX|HB_LAX_UNIVERSTUD|tours|
73
+
74
+ @mx
75
+ @pam
76
+ Examples:
77
+ |country|tracking_id|type|
78
+ |MX|PAM_CUN_1221|tours|
79
+ |MX|PAM_CUN_915|tours|
80
+
81
+ @mx
82
+ @gl
83
+ Examples:
84
+ |country|tracking_id|type|
85
+ |MX|GL_NYC_297|tours|
86
+ |MX|GL_LAS_659|tours|
87
+
88
+ @mx
89
+ @via
90
+ Examples:
91
+ |country|tracking_id|type|
92
+ |MX|VIA_LAX_3357DISNEY|tours|
93
+
94
+ @co
95
+ @hb
96
+ Examples:
97
+ |country|tracking_id|type|
98
+ |CO|HB_ORL_SEAWRLDROW|tours|
99
+
100
+ @co
101
+ @pam
102
+ Examples:
103
+ |country|tracking_id|type|
104
+ |CO|PAM_CUN_1221|tours|
105
+
106
+ @co
107
+ @gl
108
+ Examples:
109
+ |country|tracking_id|type|
110
+ |CO|GL_ADZ_1691|tours|
111
+
112
+ @co
113
+ @via
114
+ Examples:
115
+ |country|tracking_id|type|
116
+ |CO|VIA_ORL_5090KIDS|tours|
117
+
118
+ @cl
119
+ @hb
120
+ Examples:
121
+ |country|tracking_id|type|
122
+ |CL|HB_ORL_SEAWRLDROW|tours|
123
+
124
+ @cl
125
+ @pam
126
+ Examples:
127
+ |country|tracking_id|type|
128
+ |CL|PAM_BZC_534|tours|
129
+
130
+ @cl
131
+ @gl
132
+ Examples:
133
+ |country|tracking_id|type|
134
+ |CL|GL_BUE_2172|tours|
135
+
136
+ @cl
137
+ @via
138
+ Examples:
139
+ |country|tracking_id|type|
140
+ |CL|VIA_LIM_5694LIM|tours|
141
+
142
+ @transfer_results
143
+ Scenario Outline: results from results
144
+ Given I perform a search in "<country>" with "<tracking_id>" from seo URL
145
+ Then I should see the result clusters for the specified "<tracking_id>"
146
+
147
+ @br
148
+ @tf_pam
149
+ Examples:
150
+ |country|tracking_id|type|
151
+ |BR|TF_NYC|transfers|
152
+ |BR|TF_CUN|transfers|
153
+ |BR|TF_BUE|transfers|
154
+
155
+ @br
156
+ @tf_gl
157
+ Examples:
158
+ |country|tracking_id|type|
159
+ |BR|TF_LON|transfers|
160
+ |BR|TF_ROM|transfers|
161
+ |BR|TF_SCL|transfers|
162
+
163
+ @mx
164
+ @tf_pam
165
+ Examples:
166
+ |country|tracking_id|type|
167
+ |MX|TF_CUN|transfers|
168
+
169
+ @mx
170
+ @tf_gl
171
+ Examples:
172
+ |country|tracking_id|type|
173
+ |MX|TF_LAS|transfers|
174
+
175
+ @co
176
+ @tf_pam
177
+ Examples:
178
+ |country|tracking_id|type|
179
+ |CO|TF_CUN|transfers|
180
+
181
+ @co
182
+ @tf_gl
183
+ Examples:
184
+ |country|tracking_id|type|
185
+ |CO|TF_CTG|transfers|
186
+
187
+ @cl
188
+ @tf_pam
189
+ Examples:
190
+ |country|tracking_id|type|
191
+ |CL|TF_MEX|transfers|
192
+
193
+ @cl
194
+ @tf_gl
195
+ Examples:
196
+ |country|tracking_id|type|
197
+ |CL|TF_CTG|transfers|
198
+
199
+
200
+ @disney_results
201
+ Scenario Outline: results from results
202
+ Given I perform a search in "<country>" with "<tracking_id>" from seo URL
203
+ Then I should see the result clusters for the specified "<tracking_id>"
204
+
205
+ @br
206
+ Examples:
207
+ |country|tracking_id|type|
208
+ |BR|DY_ORL|tickets|
209
+
210
+ @mx
211
+ Examples:
212
+ |country|tracking_id|type|
213
+ |MX|DY_ORL|tickets|
214
+
215
+ @co
216
+ Examples:
217
+ |country|tracking_id|type|
218
+ |CO|DY_ORL|tickets|
219
+
220
+ @cl
221
+ Examples:
222
+ |country|tracking_id|type|
223
+ |CL|DY_ORL|tickets|
224
+
225
+
226
+
227
+ @universal_results
228
+ Scenario Outline: results from results
229
+
230
+ Given I perform a search in "<country>" with "<tracking_id>" from seo URL
231
+ Then I should see the result clusters for the specified "<tracking_id>"
232
+
233
+ @br
234
+ Examples:
235
+ |country|tracking_id|type|
236
+ |BR|UN_ORL|tickets|
237
+
238
+ @mx
239
+ Examples:
240
+ |country|tracking_id|type|
241
+ |MX|UN_ORL|tickets|
242
+
243
+ @co
244
+ Examples:
245
+ |country|tracking_id|type|
246
+ |CO|UN_ORL|tickets|
247
+
248
+ @cl
249
+ Examples:
250
+ |country|tracking_id|type|
251
+ |CL|UN_ORL|tickets|
@@ -0,0 +1,98 @@
1
+
2
+ When(/^I fill the detail information$/) do
3
+
4
+ DestinationServicesGUI::Detail.wait_for_detail
5
+ DestinationServicesGUI::Detail.open_tour_calendar
6
+
7
+ sleep 2
8
+
9
+ DestinationServicesGUI::Detail.get_tour_available_dates.first.click
10
+
11
+ schedule = @browser.select(:class, 'datepicker-select-hours')
12
+
13
+ if schedule.present? ##checkea que haya al menos un horario disponible, en caso de existir el select list
14
+ (DestinationServicesGUI::Detail.get_tour_available_schedules.size > 0).should be_true
15
+ DestinationServicesGUI::Detail.get_tour_available_schedules.shuffle.first.select
16
+ end
17
+
18
+ DestinationServicesGUI::Detail.set_tour_adults_number(2)
19
+
20
+ @detail_price = @browser.span(:class,'ux-common-price').text.split(' ')[1]
21
+
22
+ end
23
+
24
+ When(/^I fill the detail information for tickets$/) do
25
+
26
+ DestinationServicesGUI::Detail.wait_for_detail
27
+
28
+ DestinationServicesGUI::Detail.set_tour_adults_number(2)
29
+
30
+ end
31
+
32
+ When(/^I proceed to tour checkout$/) do
33
+
34
+ DestinationServicesGUI::Detail.go_to_tour_checkout
35
+
36
+ end
37
+
38
+ When(/^I proceed to disney checkout$/) do
39
+
40
+ DestinationServicesGUI::Detail.go_to_disney_checkout
41
+
42
+ end
43
+
44
+ When(/^I proceed to universal checkout$/) do
45
+
46
+ DestinationServicesGUI::Detail.go_to_universal_checkout
47
+
48
+ end
49
+
50
+ Then(/^I should see the checkout page correctly$/) do
51
+
52
+ DestinationServicesGUI::Checkout.wait_for_checkout
53
+
54
+ # @browser.em(:id,'robot-price-per-passenger').present?.should be_true AGREGAR EN VALIDACIONES PARTICULARES DE TOURS
55
+
56
+ @browser.em(:id,'robot-total-price').present?.should be_true
57
+
58
+ @browser.text_field(:id, 'traveler-first-name-1').present?.should be_true
59
+
60
+ @browser.text_field(:id, 'traveler-last-name-1').present?.should be_true
61
+
62
+ @browser.div(:class, 'ux-common-checkout-payment-method').present?.should be_true
63
+
64
+ (@browser.ul(:class, 'ux-common-checkout-payment-method-payments').lis.size > 1).should be_true
65
+
66
+ @browser.div(:id, 'card-form').present?.should be_true
67
+
68
+ @browser.select_list(:id, 'ux-common-checkout-creditcard-type').present?.should be_true
69
+
70
+ (@browser.select_list(:id, 'ux-common-checkout-creditcard-type').options.size > 1).should be_true
71
+
72
+ @browser.text_field(:id, 'card-number').present?.should be_true
73
+
74
+ @browser.select_list(:id, 'card-expiration-month').present?.should be_true
75
+
76
+ @browser.select_list(:id, 'card-expiration-year').present?.should be_true
77
+
78
+ @browser.text_field(:id, 'security-code').present?.should be_true
79
+
80
+ @browser.text_field(:id, 'owner-name').present?.should be_true
81
+
82
+ @browser.text_field(:id, 'contact-email').present?.should be_true
83
+
84
+ @browser.text_field(:id, 'contact-email-repeat').present?.should be_true
85
+
86
+ @browser.select_list(:id, 'traveler-phone-type-0')
87
+
88
+ @browser.text_field(:id, 'traveler-country-code-0').present?.should be_true
89
+
90
+ @browser.text_field(:id, 'traveler-area-code-0').present?.should be_true
91
+
92
+ @browser.text_field(:id, 'traveler-phone-number-0').present?.should be_true
93
+
94
+ @browser.checkbox(:id, 'ux-common-checkoutchange-agreement-cb').present?.should be_true
95
+
96
+ @browser.a(:class, 'ux-common-checkout-buy-button').present?.should be_true
97
+
98
+ end
@@ -19,10 +19,88 @@ Then(/^I should see the detail page with the corresponding prices for each ticke
19
19
  end
20
20
 
21
21
  When(/^I click on the detail button$/) do
22
- DestinationServicesGUI::Results.show_results_tracking_id
23
- DestinationServicesGUI::Results.get_results_by_provider_code(PROVIDER_ID, IS_MODULAR).first.click
22
+
23
+ DestinationServicesGUI::Results.get_results_by_tracking_id(PROVIDER_ID, IS_MODULAR).first.click
24
+ end
25
+
26
+ When(/^I click on the detail button of the corresponding "(.*)"$/) do | tracking_id |
27
+
28
+ DestinationServicesGUI::Results.get_results_by_tracking_id(tracking_id, IS_MODULAR).first.click
29
+
24
30
  end
25
31
 
32
+
33
+
26
34
  Then(/^I should see the detail page for the selected tour$/) do
27
35
 
36
+ DestinationServicesGUI::Detail.wait_for_detail
37
+
38
+ @browser.div(:class, 'ux-destination-services-detail-pricebox').present?.should be_true
39
+
40
+ @browser.span(:class, 'ux-common-price').text.blank?.should be_false
41
+
42
+ @browser.div(:class, 'ux-destination-services-detail-title').text.blank?.should be_false
43
+
44
+ @browser.div(:class, 'pdt-activities').present?.should be_true
45
+
46
+ @browser.div(:class, 'ux-destination-services-detail-sidebar-box').present?.should be_true
47
+
48
+ @browser.div(:class, 'ux-destination-services-detail-picture').present?.should be_true
49
+
50
+ @browser.div(:class, 'ux-destination-services-detail-pricebox-date-input').present?.should be_true
51
+
52
+ DestinationServicesGUI::Detail.open_tour_calendar
53
+
54
+ (DestinationServicesGUI::Detail.get_tour_available_dates.size > 0).should be_true ## checkea que se muestre al menos una fecha disponible
55
+
56
+ DestinationServicesGUI::Detail.get_tour_available_dates.first.click
57
+
58
+ schedule = @browser.select(:class, 'datepicker-select-hours')
59
+
60
+ if schedule.present? ##checkea que haya al menos un horario disponible, en caso de existir el select list
61
+ (DestinationServicesGUI::Detail.get_tour_available_schedules.size > 0).should be_true
62
+ DestinationServicesGUI::Detail.get_tour_available_schedules.shuffle.first.select
63
+ end
64
+
65
+ DestinationServicesGUI::Detail.set_tour_adults_number(2)
66
+
67
+ end
68
+
69
+ Then(/^I should see the detail page for Disney$/) do ## pending update
70
+
71
+ DestinationServicesGUI::Detail.wait_for_detail
72
+
73
+ @browser.div(:class, 'ux-destination-services-detail-pricebox').present?.should be_true
74
+
75
+ @browser.span(:class, 'ux-common-price').text.blank?.should be_false
76
+
77
+ @browser.div(:class, 'ux-destination-services-detail-title').text.blank?.should be_false
78
+
79
+ @browser.div(:class, 'pdt-activities').present?.should be_true
80
+
81
+ @browser.div(:class, 'ux-destination-services-detail-sidebar-box').present?.should be_true
82
+
83
+ @browser.div(:class, 'ux-destination-services-detail-picture').present?.should be_true
84
+
85
+ @browser.div(:class, 'ux-destination-services-detail-pricebox-date-input').present?.should be_true
86
+
87
+ @browser.div(:class, 'ux-destination-services-detail-pricebox-date-input').click
88
+
89
+ (DestinationServicesGUI::Detail.get_tour_available_dates.size > 0).should be_true ## checkea que se muestre al menos una fecha disponible
90
+
91
+ DestinationServicesGUI::Detail.get_tour_available_dates.first.click
92
+
93
+ schedule = @browser.select(:class, 'datepicker-select-hours')
94
+
95
+ if schedule.present? ##checkea que haya al menos un horario disponible, en caso de existir el select list
96
+ (DestinationServicesGUI::Detail.get_tour_available_schedules.size > 0).should be_true
97
+ DestinationServicesGUI::Detail.get_tour_available_schedules.shuffle.first.select
98
+ end
99
+
100
+ distribution = @browser.divs(:class, 'ux-common-grid-col4 ux-common-grid-col6-large ux-common-grid-col6-medium')
101
+
102
+ distribution[0].options.to_a[0..5].delete_if { | option | option.text.include? "0" }.shuffle.first.select
103
+
104
+
105
+
28
106
  end