ds-gui-automation 0.2.44 → 0.2.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/step_definitions/checkout_steps.rb +10 -1
- data/features/step_definitions/results_steps.rb +22 -0
- data/features/thanks.feature +6 -26
- data/lib/ds/version.rb +1 -1
- data/lib/page_objects/modules/checkout.rb +5 -0
- data/lib/page_objects/modules/commons.rb +22 -6
- data/lib/page_objects/modules/results.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0e6b3f4da8531fa25e755c147c5e454b8f2f56b
|
4
|
+
data.tar.gz: 1ae31d2905e0e7a0490dd81b7d37ff846345c92b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 335c21efbeb083e97fb4b9761c4dfdb254896ae5a591d27a8f771d0bf9277a8cd9821ba87c4e82ee301f6d3768156b3138a2d4f8c0a50fd711f57afce84a3557
|
7
|
+
data.tar.gz: 0bcf0478f34e7dd8a9d38becc77e86714a256131ba9eb5aac60eff0418d6759496e408a35947f7da5cb8bee030978a0247eaad65accd0a06b5c6ae234c3eb140
|
@@ -99,7 +99,7 @@ Then(/^I should see the checkout page correctly$/) do
|
|
99
99
|
|
100
100
|
DestinationServicesGUI::Checkout.wait_for_modal
|
101
101
|
|
102
|
-
sleep
|
102
|
+
sleep 10
|
103
103
|
|
104
104
|
if @browser.url.include?('pre-checkout')
|
105
105
|
@browser.span(:class,'eva-button-primary-large').wait_until_present(120)
|
@@ -219,3 +219,12 @@ When(/^I proceed to checkout$/) do
|
|
219
219
|
|
220
220
|
end
|
221
221
|
|
222
|
+
Given(/^I proceed to transfer checkout$/) do
|
223
|
+
|
224
|
+
clusters = @browser.divs(:class,'ux-transfers-cluster')
|
225
|
+
|
226
|
+
clusters.to_a.shuffle.first.a(:class, 'ux-button primary').click
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
|
@@ -153,3 +153,25 @@ Given(/^I perform a search in "(.*)" with "(.*)" from seo URL for ticket cart$/)
|
|
153
153
|
#DestinationServicesGUI::Results.wait_for_modal
|
154
154
|
|
155
155
|
end
|
156
|
+
|
157
|
+
Given(/^I perform a transfer search in "(.*?)" with destination "(.*?)"$/) do |country, destination|
|
158
|
+
|
159
|
+
DestinationServicesGUI::Results.set_country(country)
|
160
|
+
|
161
|
+
from_date = (Time.now + 2629743).strftime('%d-%m-%Y')
|
162
|
+
|
163
|
+
to_date = (Time.now + 2629743 + 604800).strftime('%d-%m-%Y')
|
164
|
+
|
165
|
+
url = $DOMAIN + '/transfer/#!' + "/search/roundtrip/airport/#{destination}/hotel/265793/#{from_date}/00:00/#{to_date}/00:00/1"
|
166
|
+
|
167
|
+
@browser.goto(url)
|
168
|
+
|
169
|
+
DestinationServicesGUI::Results.wait_for_transfer_results
|
170
|
+
|
171
|
+
DestinationServicesGUI::Results.show_transfer_results_tracking_id
|
172
|
+
|
173
|
+
end
|
174
|
+
|
175
|
+
|
176
|
+
##http://www.despegar.com.ar/transfer/#!/search/roundtrip/airport/CUN/hotel/265793/27-02-2016/00:00/07-03-2016/00:00/1
|
177
|
+
|
data/features/thanks.feature
CHANGED
@@ -138,13 +138,10 @@ Feature: Destination Services Thanks
|
|
138
138
|
|
139
139
|
@transfer_thanks
|
140
140
|
Scenario Outline: thanks from results
|
141
|
-
Given I perform a search in "<country>" with "<
|
142
|
-
|
143
|
-
And I fill the detail information
|
144
|
-
And I proceed to tour checkout
|
141
|
+
Given I perform a transfer search in "<country>" with destination "<destination>"
|
142
|
+
And I proceed to transfer checkout
|
145
143
|
Then I should see the checkout page correctly
|
146
144
|
When I fill the checkout information
|
147
|
-
And I fill the particular information for tours
|
148
145
|
And I fill the particular information for transfers
|
149
146
|
And I proceed to thanks
|
150
147
|
And I fill the risk information
|
@@ -152,31 +149,14 @@ Feature: Destination Services Thanks
|
|
152
149
|
And I verify that the reservation was made on Fenix for "<type>" and "<tracking_id>"
|
153
150
|
|
154
151
|
@br
|
155
|
-
@tf_pam
|
156
152
|
Examples:
|
157
|
-
|country|
|
158
|
-
|BR|
|
159
|
-
|BR|TF_CUN|transfers|
|
160
|
-
|BR|TF_BUE|transfers|
|
153
|
+
|country|destination|type|
|
154
|
+
|BR|CUN|transfers|
|
161
155
|
|
162
|
-
## Example http://www.despegar.com.ar/transfer/#!/search/roundtrip/airport/
|
156
|
+
## Example http://www.despegar.com.ar/transfer/#!/search/roundtrip/airport/CUN/hotel/265793/27-02-2016/00:00/07-03-2016/00:00/1
|
157
|
+
## http://www.despegar.com.ar/transfer/#!/search/oneway/airport/CUN/hotel/265793/27-02-2016/00:00/1
|
163
158
|
## 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'});});})();
|
164
159
|
|
165
|
-
@br
|
166
|
-
@tf_gl
|
167
|
-
Examples:
|
168
|
-
|country|tracking_id|type|
|
169
|
-
|BR|TF_LON|transfers|
|
170
|
-
|BR|TF_ROM|transfers|
|
171
|
-
|BR|TF_SCL|transfers|
|
172
|
-
|
173
|
-
@mx
|
174
|
-
@tf_pam
|
175
|
-
Examples:
|
176
|
-
|country|tracking_id|type|
|
177
|
-
|MX|TF_CUN|transfers|
|
178
|
-
|
179
|
-
@mx
|
180
160
|
@tf_gl
|
181
161
|
Examples:
|
182
162
|
|country|tracking_id|type|
|
data/lib/ds/version.rb
CHANGED
@@ -89,6 +89,11 @@ module Checkout
|
|
89
89
|
|
90
90
|
browser.text_field(:id, 'arrival-flight-number').set('1234') if browser.text_field(:id, 'arrival-flight-number').present?
|
91
91
|
|
92
|
+
browser.text_field(:id, 'departure-flight-airline').set('Test Airline') if browser.text_field(:id, 'departure-flight-airline').present?
|
93
|
+
|
94
|
+
browser.text_field(:id, 'departure-flight-number').set('1234') if browser.text_field(:id, 'departure-flight-number').present?
|
95
|
+
|
96
|
+
|
92
97
|
end
|
93
98
|
|
94
99
|
def get_ticket_dates(calendar)
|
@@ -15,6 +15,14 @@ module Commons
|
|
15
15
|
|
16
16
|
end
|
17
17
|
|
18
|
+
def show_transfer_results_tracking_id
|
19
|
+
results_script = %Q(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'});});})();)
|
20
|
+
|
21
|
+
browser.execute_script(results_script)
|
22
|
+
|
23
|
+
sleep 2
|
24
|
+
end
|
25
|
+
|
18
26
|
def get_provider_code(cluster)
|
19
27
|
|
20
28
|
cluster = cluster.li(:class, 'providers').text.split('_').first.split(' ').last
|
@@ -60,17 +68,13 @@ module Commons
|
|
60
68
|
|
61
69
|
def wait_for_results
|
62
70
|
|
63
|
-
|
64
|
-
|
65
|
-
cluster_results = browser.div(:class, 'ux-destination-services-cluster')
|
66
|
-
|
67
|
-
new_design_grid = browser.div(:class,'ds-results-wrapper').div(:class, 'eva-grid')
|
71
|
+
cart_icon = browser.div(:class, 'ds-my-tickets')
|
68
72
|
|
69
73
|
timeout = 0
|
70
74
|
|
71
75
|
alert_handle
|
72
76
|
|
73
|
-
while !
|
77
|
+
while !cart_icon.present? and timeout < 60
|
74
78
|
alert_handle
|
75
79
|
sleep 3
|
76
80
|
timeout += 3
|
@@ -188,4 +192,16 @@ module Commons
|
|
188
192
|
browser.driver.switch_to.alert.accept if !alert_not_present
|
189
193
|
end
|
190
194
|
|
195
|
+
def wait_for_transfer_results
|
196
|
+
timeout = 0
|
197
|
+
|
198
|
+
title = browser.span(:class, 'ux-home-title-disclaimer')
|
199
|
+
|
200
|
+
while !title.present? and timeout < 40
|
201
|
+
sleep 3
|
202
|
+
timeout += 3
|
203
|
+
end
|
204
|
+
|
205
|
+
end
|
206
|
+
|
191
207
|
end
|
@@ -83,9 +83,9 @@ module Results
|
|
83
83
|
|
84
84
|
wait_for_results
|
85
85
|
|
86
|
-
current_item_number = browser.divs(:class, 'ds-results-cluster').size
|
86
|
+
current_item_number = browser.divs(:class, 'ds-activities-search-item-container').size + browser.divs(:class, 'ds-results-cluster').size
|
87
87
|
|
88
|
-
total_item_number = browser.div(:class, '
|
88
|
+
total_item_number = browser.div(:class, 'search-view-main-title').text.split.first.to_i
|
89
89
|
|
90
90
|
while current_item_number != total_item_number do
|
91
91
|
|
@@ -97,7 +97,7 @@ module Results
|
|
97
97
|
sleep 1
|
98
98
|
end
|
99
99
|
|
100
|
-
current_item_number = browser.divs(:class, 'ds-results-cluster').size
|
100
|
+
current_item_number = browser.divs(:class, 'ds-activities-search-item-container').size + browser.divs(:class, 'ds-results-cluster').size
|
101
101
|
|
102
102
|
end
|
103
103
|
|
@@ -185,7 +185,7 @@ module Results
|
|
185
185
|
clusters = browser.divs(:class, 'ux-common-grid-col4 ux-common-grid-col4-large ux-common-grid-col4-medium ux-common-grid-col12-small ux-common-grid-first-small ng-scope').to_a
|
186
186
|
clusters = clusters.select { | cluster | get_tracking_id(cluster).eql?(trackingId) }
|
187
187
|
else
|
188
|
-
clusters = browser.divs(:class, 'ds-results-cluster').to_a
|
188
|
+
clusters = browser.divs(:class, 'ds-results-cluster').to_a + browser.divs(:class, 'ds-activities-search-item-container').to_a
|
189
189
|
clusters = clusters.select { | cluster | get_tracking_id(cluster).eql?(trackingId) }
|
190
190
|
end
|
191
191
|
else
|
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.2.
|
4
|
+
version: 0.2.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Santiago Ochoa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|