ds-gui-automation 0.1.75 → 0.1.76
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.
- checksums.yaml +4 -4
- data/features/cart_thanks.feature +48 -0
- data/features/step_definitions/checkout_steps.rb +50 -1
- data/features/step_definitions/detail_steps.rb +63 -0
- data/features/step_definitions/results_steps.rb +61 -0
- data/features/step_definitions/thanks_steps.rb +70 -1
- data/features/support/env.rb +1 -1
- data/features/thanks.feature +3 -1
- data/henry-context.yml +59 -0
- data/lib/ds/version.rb +1 -1
- data/lib/page_objects/modules/checkout.rb +28 -6
- data/lib/page_objects/modules/commons.rb +20 -0
- data/lib/page_objects/modules/results.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cef362fe45c357aa0c721a93e2c73f46ea3ec0fc
|
4
|
+
data.tar.gz: 72babab8a42d72f888875a05af0b76463ca24719
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edd5200efc584d1829a256f04f1dd89304fb9883bb8b8b1d36f273602980e7c412a710c9422d2bc37b9ce1199d64509eb1a435dd33fda5ae8fd35c78abf37592
|
7
|
+
data.tar.gz: e590ea12612c902fab224b1e7cf4739b289f1316d27a2fa4b0167a012bef7fa0ca424784d2ef46cf4cd78bb099e7c27cf79448b2ea703029e6276b886c072348
|
@@ -0,0 +1,48 @@
|
|
1
|
+
Feature: Destination Services Thanks
|
2
|
+
As a user,
|
3
|
+
I want to be able to get to the checkout page of an activity.
|
4
|
+
|
5
|
+
@cart_thanks
|
6
|
+
Scenario Outline: thanks from results
|
7
|
+
Given I perform a search in "<country>" with "<tour_tracking_id>" from seo URL for tour cart
|
8
|
+
When I click on the detail button for cart tour
|
9
|
+
And I fill the detail information
|
10
|
+
And I add the tour to the cart
|
11
|
+
Then I verify that the first item has been added to the cart
|
12
|
+
Given I perform a search in "<country>" with "<ticket_tracking_id>" from seo URL for ticket cart
|
13
|
+
When I click on the detail button for cart ticket
|
14
|
+
And I fill the detail information for tickets
|
15
|
+
And I add the ticket to the cart
|
16
|
+
And I proceed to checkout
|
17
|
+
Then I should see the checkout page correctly
|
18
|
+
When I fill the checkout information for cart
|
19
|
+
And I fill the particular information for tours
|
20
|
+
And I proceed to thanks
|
21
|
+
And I fill the risk information
|
22
|
+
Then I should see the thanks page correctly for cart
|
23
|
+
And I verify that the reservation was made on Fenix for cart
|
24
|
+
|
25
|
+
@br
|
26
|
+
Examples:
|
27
|
+
|country|tour_tracking_id|ticket_tracking_id|
|
28
|
+
|BR|HB_ORL_SEAWRLDROW,HB_ORL_LEGOFLORID,HB_ORL_ORLFLEXTIX,HB_ORL_BUSCHROW,HB_NYC_NYCITYPASS,HB_ORL_MCOMDVLTMS,HB_LAX_UNIVERSTUD,HB_ORL_BMGMCO,HB_TPA_BUSCHROW,PAM_CUN_1221,PAM_BUE_368,PAM_NYC_259,PAM_GR3_163,GL_SCL_512,GL_NYC_297,GL_SCL_519,GL_ORL_2246|DY_ORL,UN_ORL|
|
29
|
+
|
30
|
+
@ar
|
31
|
+
Examples:
|
32
|
+
|country|tour_tracking_id|ticket_tracking_id|
|
33
|
+
|AR|PAM_SLA_76,PAM_FTE_620,PAM_MDZ_194,PAM_SLA_73,HB_ORL_SEAWRLDROW,HB_ORL_LEGOFLORID,HB_ORL_ORLFLEXTIX,HB_ORL_BUSCHROW,HB_NYC_NYCITYPASS|DY_ORL,UN_ORL|
|
34
|
+
|
35
|
+
@mx
|
36
|
+
Examples:
|
37
|
+
|country|tour_tracking_id|ticket_tracking_id|
|
38
|
+
|MX|HB_LAX_DISNEY1PAK,HB_LAX_UNIVERSTUD,PAM_CUN_1221,PAM_CUN_915,GL_NYC_297,GL_LAS_659|DY_ORL,UN_ORL|
|
39
|
+
|
40
|
+
@co
|
41
|
+
Examples:
|
42
|
+
|country|tour_tracking_id|ticket_tracking_id|
|
43
|
+
|CO|HB_ORL_SEAWRLDROW,PAM_CUN_1221,GL_ADZ_1691,VIA_ORL_5090KIDS|DY_ORL,UN_ORL|
|
44
|
+
|
45
|
+
@cl
|
46
|
+
Examples:
|
47
|
+
|country|tour_tracking_id|ticket_tracking_id|
|
48
|
+
|CL|HB_ORL_SEAWRLDROW,PAM_BZC_534,GL_BUE_2172,VIA_LIM_5694LIM|DY_ORL,UN_ORL|
|
@@ -4,7 +4,7 @@ When(/^I fill the detail information$/) do
|
|
4
4
|
DestinationServicesGUI::Detail.wait_for_detail
|
5
5
|
DestinationServicesGUI::Detail.open_tour_calendar
|
6
6
|
|
7
|
-
sleep
|
7
|
+
sleep 5
|
8
8
|
|
9
9
|
DestinationServicesGUI::Detail.get_tour_available_dates.shuffle.first.click
|
10
10
|
|
@@ -43,6 +43,21 @@ When(/^I fill the detail information for tickets universal$/) do
|
|
43
43
|
|
44
44
|
end
|
45
45
|
|
46
|
+
When(/^I fill the detail information for tickets$/) do
|
47
|
+
|
48
|
+
DestinationServicesGUI::Detail.wait_for_detail
|
49
|
+
|
50
|
+
DestinationServicesGUI::Detail.set_tour_adults_number(2)
|
51
|
+
|
52
|
+
if @browser.li(:class, 'ux-destination-services-list-item-additional').present?
|
53
|
+
|
54
|
+
additionals = @browser.li(:class, 'ux-destination-services-list-item-additional').ul(:class, 'list-submenu-additional').lis(:class,'ng-scope')
|
55
|
+
|
56
|
+
(additionals.size == 3).should be_true
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
46
61
|
When(/^I proceed to tour checkout$/) do
|
47
62
|
|
48
63
|
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
@@ -147,3 +162,37 @@ Then(/^I should see the available installments for "(.*)" and "(.*)"$/) do | bra
|
|
147
162
|
|
148
163
|
end
|
149
164
|
|
165
|
+
|
166
|
+
|
167
|
+
When(/^I proceed to checkout$/) do
|
168
|
+
|
169
|
+
if @browser.url.include?('cart')
|
170
|
+
|
171
|
+
@browser.div(:class, 'ux-cluster').wait_until_present(30)
|
172
|
+
|
173
|
+
DestinationServicesGUI::Checkout.wait_for_cart_pricebox_spinner
|
174
|
+
|
175
|
+
sleep 10
|
176
|
+
|
177
|
+
(@browser.div(:class, 'ux-common-grid-col12').divs(:class, 'ux-cluster-content').size == 2).should be_true
|
178
|
+
|
179
|
+
@browser.a(:class, 'ux-flat-button').click
|
180
|
+
|
181
|
+
else
|
182
|
+
@browser.span(:class, 'ux-my-tickets-arrow-border').wait_until_present
|
183
|
+
|
184
|
+
sleep 5
|
185
|
+
|
186
|
+
@browser.span(:class, 'ux-my-tickets-arrow-border').click
|
187
|
+
|
188
|
+
DestinationServicesGUI::Checkout.wait_for_results_cart_spinner
|
189
|
+
|
190
|
+
sleep 10
|
191
|
+
|
192
|
+
(@browser.ul(:class, 'ux-my-tickets-purchases-item-group').lis.size == 2).should be_true
|
193
|
+
|
194
|
+
@browser.div(:class, 'ux-my-tickets-purchases-pricebox').a(:class, 'ux-flat-button ux-red ux-medium').click
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|
198
|
+
|
@@ -31,8 +31,23 @@ When(/^I click on the detail button of the corresponding "(.*)"$/) do | tracking
|
|
31
31
|
|
32
32
|
end
|
33
33
|
|
34
|
+
When(/^I click on the detail button for cart tour$/) do
|
35
|
+
|
36
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
37
|
+
|
38
|
+
DestinationServicesGUI::Results.get_results_by_tracking_id(@tour_tracking_id, IS_MODULAR).first.click
|
39
|
+
|
40
|
+
end
|
34
41
|
|
35
42
|
|
43
|
+
When(/^I click on the detail button for cart ticket$/) do
|
44
|
+
|
45
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
46
|
+
|
47
|
+
DestinationServicesGUI::Results.get_results_by_tracking_id(@ticket_tracking_id, IS_MODULAR).first.click
|
48
|
+
|
49
|
+
end
|
50
|
+
|
36
51
|
Then(/^I should see the detail page for the selected tour$/) do
|
37
52
|
|
38
53
|
DestinationServicesGUI::Detail.wait_for_detail
|
@@ -103,6 +118,54 @@ Then(/^I should see the detail page for Disney$/) do ## pending update
|
|
103
118
|
|
104
119
|
distribution[0].options.to_a[0..5].delete_if { | option | option.text.include? "0" }.shuffle.first.select
|
105
120
|
|
121
|
+
end
|
122
|
+
|
123
|
+
|
124
|
+
When(/^I add the tour to the cart$/) do
|
125
|
+
|
126
|
+
@browser.span(:class, 'ux-destination-services-cart-button').click
|
127
|
+
|
128
|
+
sleep 5
|
129
|
+
|
130
|
+
@browser.url.include?('cart') ? @browser.div(:class, 'ux-cluster').wait_until_present(30) : @browser.span(:class, 'ux-my-tickets-arrow-border').wait_until_present(30)
|
131
|
+
|
132
|
+
end
|
106
133
|
|
134
|
+
When(/^I add the ticket to the cart$/) do
|
135
|
+
|
136
|
+
DestinationServicesGUI::Detail.wait_for_disney_loader
|
137
|
+
|
138
|
+
@browser.div(:class,'destination-services-detail-pricebox-add').a(:class, 'ux-flat-button').click
|
139
|
+
|
140
|
+
sleep 5
|
141
|
+
|
142
|
+
@browser.url.include?('cart') ? @browser.div(:class, 'ux-cluster').wait_until_present(30) : @browser.span(:class, 'ux-my-tickets-arrow-border').wait_until_present(30)
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
Then(/^I verify that the first item has been added to the cart$/) do
|
147
|
+
|
148
|
+
if @browser.url.include?('cart')
|
149
|
+
|
150
|
+
@browser.div(:class, 'ux-cluster').wait_until_present(30)
|
151
|
+
|
152
|
+
DestinationServicesGUI::Checkout.wait_for_cart_pricebox_spinner
|
153
|
+
|
154
|
+
sleep 10
|
155
|
+
|
156
|
+
(@browser.div(:class, 'ux-common-grid-col12').divs(:class, 'ux-cluster-content').size == 1).should be_true
|
157
|
+
else
|
158
|
+
@browser.span(:class, 'ux-my-tickets-arrow-border').wait_until_present
|
159
|
+
|
160
|
+
sleep 5
|
161
|
+
|
162
|
+
@browser.span(:class, 'ux-my-tickets-arrow-border').click
|
163
|
+
|
164
|
+
DestinationServicesGUI::Checkout.wait_for_results_cart_spinner
|
165
|
+
|
166
|
+
sleep 10
|
167
|
+
|
168
|
+
(@browser.ul(:class, 'ux-my-tickets-purchases-item-group').lis.size == 1).should be_true
|
169
|
+
end
|
107
170
|
|
108
171
|
end
|
@@ -70,3 +70,64 @@ Then(/^I should see the results page with the search result$/) do
|
|
70
70
|
# @browser.div(:class, 'cp-pager ng-isolate-scope').should be_visible if results_quantity > 20
|
71
71
|
|
72
72
|
end
|
73
|
+
|
74
|
+
|
75
|
+
Given(/^I perform a search in "(.*)" with "(.*)" from seo URL for tour cart$/) do | country, tracking_ids |
|
76
|
+
|
77
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
78
|
+
|
79
|
+
DestinationServicesGUI::Search.set_country(country)
|
80
|
+
|
81
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
82
|
+
|
83
|
+
@tour_tracking_id = tracking_ids.split(',').shuffle.first
|
84
|
+
|
85
|
+
puts "Selected Tour: #{@tour_tracking_id} "
|
86
|
+
|
87
|
+
DestinationServicesGUI::Search.perform_search_for_tracking_id(@tour_tracking_id)
|
88
|
+
|
89
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
90
|
+
|
91
|
+
DestinationServicesGUI::Results.wait_for_results
|
92
|
+
|
93
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
94
|
+
|
95
|
+
puts @browser.url
|
96
|
+
|
97
|
+
DestinationServicesGUI.set_cookie('X-UOW' => BOT_UOW)
|
98
|
+
|
99
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
100
|
+
|
101
|
+
#DestinationServicesGUI::Results.wait_for_modal
|
102
|
+
|
103
|
+
end
|
104
|
+
|
105
|
+
Given(/^I perform a search in "(.*)" with "(.*)" from seo URL for ticket cart$/) do | country, tracking_ids |
|
106
|
+
|
107
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
108
|
+
|
109
|
+
DestinationServicesGUI::Search.set_country(country)
|
110
|
+
|
111
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
112
|
+
|
113
|
+
@ticket_tracking_id = tracking_ids.split(',').shuffle.first
|
114
|
+
|
115
|
+
puts "Selected Ticket: #{@ticket_tracking_id} "
|
116
|
+
|
117
|
+
DestinationServicesGUI::Search.perform_search_for_tracking_id(@ticket_tracking_id)
|
118
|
+
|
119
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
120
|
+
|
121
|
+
DestinationServicesGUI::Results.wait_for_results
|
122
|
+
|
123
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
124
|
+
|
125
|
+
puts @browser.url
|
126
|
+
|
127
|
+
DestinationServicesGUI.set_cookie('X-UOW' => BOT_UOW)
|
128
|
+
|
129
|
+
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
130
|
+
|
131
|
+
#DestinationServicesGUI::Results.wait_for_modal
|
132
|
+
|
133
|
+
end
|
@@ -61,7 +61,7 @@ end
|
|
61
61
|
|
62
62
|
When(/^I fill the particular information for tickets$/) do
|
63
63
|
|
64
|
-
DestinationServicesGUI::Checkout.select_ticket_date
|
64
|
+
DestinationServicesGUI::Checkout.select_ticket_date(browser)
|
65
65
|
|
66
66
|
end
|
67
67
|
|
@@ -74,4 +74,73 @@ When(/^I fill the risk information$/) do
|
|
74
74
|
DestinationServicesGUI::Checkout.fill_risk_questions
|
75
75
|
|
76
76
|
|
77
|
+
end
|
78
|
+
|
79
|
+
When(/^I fill the checkout information for cart$/) do
|
80
|
+
|
81
|
+
@browser.input(:id,'checkbox-cart-passenger').click
|
82
|
+
|
83
|
+
DestinationServicesGUI::Checkout.fill_passenger_information_for_cart
|
84
|
+
|
85
|
+
DestinationServicesGUI::Checkout.fill_credit_card_information
|
86
|
+
|
87
|
+
DestinationServicesGUI::Checkout.fill_contact_information
|
88
|
+
|
89
|
+
DestinationServicesGUI::Checkout.fill_billing_information if $SITE == 'AR'
|
90
|
+
|
91
|
+
if @browser.ul(:class, 'destination-services-cart-checkout-travelDate').present?
|
92
|
+
|
93
|
+
@browser.ul(:class, 'destination-services-cart-checkout-travelDate').lis.each do | calendar |
|
94
|
+
|
95
|
+
DestinationServicesGUI::Checkout.select_ticket_date(calendar)
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
Then(/^I verify that the reservation was made on Fenix for cart$/) do
|
105
|
+
|
106
|
+
sleep 10
|
107
|
+
|
108
|
+
@browser.ps(:class,'ux-common-thanks-ticket-number').each do | booking |
|
109
|
+
|
110
|
+
crm_id = booking.span(:class, 'destination-services-cart-ticket-id').text.split(':').last.strip
|
111
|
+
|
112
|
+
booking_name = booking.span(:class, 'destination-services-cart-ticket-item-name').text
|
113
|
+
|
114
|
+
(booking_name.include?('Walt Disney World') || booking_name.include?('Universal Studios Orlando')) ? type = 'tickets' : type = 'tours'
|
115
|
+
|
116
|
+
if BETA
|
117
|
+
transaction = HTTParty.get("http://10.2.7.16:80/fenix/ds/#{type}?transaction_id=#{crm_id}", :headers =>{'X-Version-Override' => BETA_COOKIES})
|
118
|
+
else
|
119
|
+
transaction = HTTParty.get("http://10.2.7.16:80/fenix/ds/#{type}?transaction_id=#{crm_id}")
|
120
|
+
end
|
121
|
+
|
122
|
+
if type == 'tickets'
|
123
|
+
transaction['items'].first['extra_data']['tracking_id'].eql?(@ticket_tracking_id).should be_true
|
124
|
+
puts "ID de reserva: #{crm_id}, Tracking ID: #{@tour_tracking_id}"
|
125
|
+
else
|
126
|
+
transaction['items'].first['extra_data']['tracking_id'].eql?(@tour_tracking_id).should be_true
|
127
|
+
puts "ID de reserva: #{crm_id}, Tracking ID: #{@ticket_tracking_id}"
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
132
|
+
end
|
133
|
+
|
134
|
+
Then(/^I should see the thanks page correctly for cart$/) do
|
135
|
+
|
136
|
+
@browser.p(:class,'ux-common-thanks-ticket-number').present?.should be_true
|
137
|
+
|
138
|
+
@browser.ps(:class,'ux-common-thanks-ticket-number').each do | booking |
|
139
|
+
|
140
|
+
crm_id = booking.span(:class, 'destination-services-cart-ticket-id').text.split(':').last.strip
|
141
|
+
|
142
|
+
crm_id.empty?.should be_false
|
143
|
+
|
144
|
+
end
|
145
|
+
|
77
146
|
end
|
data/features/support/env.rb
CHANGED
data/features/thanks.feature
CHANGED
@@ -62,7 +62,6 @@ Feature: Destination Services Thanks
|
|
62
62
|
Examples:
|
63
63
|
|country|tracking_id|type|
|
64
64
|
|AR|PAM_SLA_76|tours|
|
65
|
-
|AR|PAM_FTE_620|tours|
|
66
65
|
|AR|PAM_MDZ_194|tours|
|
67
66
|
|AR|PAM_SLA_73|tours|
|
68
67
|
|
@@ -174,6 +173,9 @@ Feature: Destination Services Thanks
|
|
174
173
|
|BR|TF_CUN|transfers|
|
175
174
|
|BR|TF_BUE|transfers|
|
176
175
|
|
176
|
+
## Example http://www.despegar.com.ar/transfer/#!/search/roundtrip/airport/GIG/hotel/459182/22-05-2015/00:00/29-05-2015/00:00/1
|
177
|
+
## Show provider script: javascript:( function(){var priceboxes = $(".ux-cluster-pricebox"); angular.forEach(priceboxes, function(elem, index){var ngElem= angular.element(elem); $(elem).append('<div class="transfer-provider">' + ngElem.scope().transfer.provider + '</div>').find(".transfer-provider").css({'color': 'red', 'font-weight': 'bold'});});})();
|
178
|
+
|
177
179
|
@br
|
178
180
|
@tf_gl
|
179
181
|
Examples:
|
data/henry-context.yml
CHANGED
@@ -1566,6 +1566,65 @@ tasks:
|
|
1566
1566
|
tags:
|
1567
1567
|
- insurance
|
1568
1568
|
- br
|
1569
|
+
reports:
|
1570
|
+
- format: html
|
1571
|
+
name: ${DATE}_${TASK_NAME}.html
|
1572
|
+
|
1573
|
+
- name: cart_thanks
|
1574
|
+
class_name: Henry::Task::CucumberTask
|
1575
|
+
options:
|
1576
|
+
tags:
|
1577
|
+
- cart_thanks
|
1578
|
+
reports:
|
1579
|
+
- format: html
|
1580
|
+
name: ${DATE}_${TASK_NAME}.html
|
1581
|
+
|
1582
|
+
- name: cart_thanks_br
|
1583
|
+
class_name: Henry::Task::CucumberTask
|
1584
|
+
options:
|
1585
|
+
tags:
|
1586
|
+
- cart_thanks
|
1587
|
+
- br
|
1588
|
+
reports:
|
1589
|
+
- format: html
|
1590
|
+
name: ${DATE}_${TASK_NAME}.html
|
1591
|
+
|
1592
|
+
- name: cart_thanks_ar
|
1593
|
+
class_name: Henry::Task::CucumberTask
|
1594
|
+
options:
|
1595
|
+
tags:
|
1596
|
+
- cart_thanks
|
1597
|
+
- ar
|
1598
|
+
reports:
|
1599
|
+
- format: html
|
1600
|
+
name: ${DATE}_${TASK_NAME}.html
|
1601
|
+
|
1602
|
+
- name: cart_thanks_cl
|
1603
|
+
class_name: Henry::Task::CucumberTask
|
1604
|
+
options:
|
1605
|
+
tags:
|
1606
|
+
- cart_thanks
|
1607
|
+
- cl
|
1608
|
+
reports:
|
1609
|
+
- format: html
|
1610
|
+
name: ${DATE}_${TASK_NAME}.html
|
1611
|
+
|
1612
|
+
- name: cart_thanks_co
|
1613
|
+
class_name: Henry::Task::CucumberTask
|
1614
|
+
options:
|
1615
|
+
tags:
|
1616
|
+
- cart_thanks
|
1617
|
+
- co
|
1618
|
+
reports:
|
1619
|
+
- format: html
|
1620
|
+
name: ${DATE}_${TASK_NAME}.html
|
1621
|
+
|
1622
|
+
- name: cart_thanks_mx
|
1623
|
+
class_name: Henry::Task::CucumberTask
|
1624
|
+
options:
|
1625
|
+
tags:
|
1626
|
+
- cart_thanks
|
1627
|
+
- mx
|
1569
1628
|
reports:
|
1570
1629
|
- format: html
|
1571
1630
|
name: ${DATE}_${TASK_NAME}.html
|
data/lib/ds/version.rb
CHANGED
@@ -16,6 +16,22 @@ module Checkout
|
|
16
16
|
|
17
17
|
end
|
18
18
|
|
19
|
+
def fill_passenger_information_for_cart
|
20
|
+
|
21
|
+
pax = browser.div(:id,'ux-destination-services-paxform0')
|
22
|
+
|
23
|
+
pax.text_field(:id, 'traveler-first-name-0').set('TEST DS')
|
24
|
+
|
25
|
+
pax.text_field(:id, 'traveler-last-name-0').set('BOT')
|
26
|
+
|
27
|
+
browser.send_keys(:enter)
|
28
|
+
|
29
|
+
sleep 2
|
30
|
+
|
31
|
+
pax.text_field(:id, 'traveler-document-number-0').set('33555444') if pax.text_field(:id, 'traveler-document-number-0').present?
|
32
|
+
|
33
|
+
end
|
34
|
+
|
19
35
|
def fill_credit_card_information
|
20
36
|
|
21
37
|
browser.text_field(:id, 'card-number').set('4242424242424242')
|
@@ -69,25 +85,31 @@ module Checkout
|
|
69
85
|
|
70
86
|
end
|
71
87
|
|
72
|
-
def get_ticket_dates
|
88
|
+
def get_ticket_dates(calendar)
|
73
89
|
|
74
|
-
|
90
|
+
calendar.a(:class,'calendar-icon').wait_until_present(20)
|
75
91
|
|
76
|
-
|
92
|
+
calendar.a(:class,'calendar-icon').click
|
93
|
+
|
94
|
+
calendar.div(:class, 'datepicker').wait_until_present(20)
|
77
95
|
|
78
96
|
dates = []
|
79
97
|
|
80
98
|
sleep 1
|
81
99
|
|
82
|
-
dates =
|
100
|
+
dates = calendar.div(:class, 'view days').table.tds(:class, 'in').select { | td | !td.a(:class, 'disabled').present? }
|
101
|
+
|
102
|
+
calendar.span(:class, 'nibbler-common-overlay-close').wait_until_present(20)
|
83
103
|
|
84
104
|
dates
|
85
105
|
|
86
106
|
end
|
87
107
|
|
88
|
-
def select_ticket_date
|
108
|
+
def select_ticket_date(calendar)
|
109
|
+
|
110
|
+
get_ticket_dates(calendar).last.click unless !calendar.a(:class,'calendar-icon').present?
|
89
111
|
|
90
|
-
|
112
|
+
calendar.span(:class, 'nibbler-common-overlay-close').click
|
91
113
|
|
92
114
|
end
|
93
115
|
|
@@ -128,6 +128,26 @@ module Commons
|
|
128
128
|
|
129
129
|
end
|
130
130
|
|
131
|
+
def wait_for_results_cart_spinner
|
131
132
|
|
133
|
+
timeout = 0
|
134
|
+
|
135
|
+
while browser.span(:class, 'ux-shopping-cart-spinner').visible? and timeout < 40
|
136
|
+
sleep 3
|
137
|
+
timeout += 3
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
|
142
|
+
def wait_for_cart_pricebox_spinner
|
143
|
+
|
144
|
+
timeout = 0
|
145
|
+
|
146
|
+
while browser.span(:class, 'ux-pricebox-spinner').visible? and timeout < 40
|
147
|
+
sleep 3
|
148
|
+
timeout += 3
|
149
|
+
end
|
150
|
+
|
151
|
+
end
|
132
152
|
|
133
153
|
end
|
@@ -9,6 +9,8 @@ module Results
|
|
9
9
|
## Se selecciona el tipo de vista
|
10
10
|
DestinationServicesGUI.set_cookie({'X-Version-Override' => BETA_COOKIES}) if BETA
|
11
11
|
|
12
|
+
wait_for_results
|
13
|
+
|
12
14
|
cluster_view = browser.span(:class, 'ux-common-icon-cluster-view')
|
13
15
|
|
14
16
|
modular_view = browser.span(:class, 'ux-common-icon-modular-view')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ds-gui-automation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.76
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Santiago Ochoa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- Gemfile
|
77
77
|
- ds-gui-automation.gemspec
|
78
78
|
- features/aftersale.feature
|
79
|
+
- features/cart_thanks.feature
|
79
80
|
- features/checkout.feature
|
80
81
|
- features/detail.feature
|
81
82
|
- features/fenix.feature
|