flights_gui_henry_tests 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/features/step_definitions/checkout/checkout_steps.rb +78 -28
- data/features/step_definitions/checkout/error_messages.rb +42 -20
- data/features/step_definitions/search/flight_gui_steps.rb +2 -24
- data/features/support/lib/clusters/details/details_cluster.rb +1 -1
- data/features/tests/checkout/button_cac.feature +1 -0
- data/features/tests/landing/landing_sort.feature +5 -5
- data/flights_gui_henry_tests.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWJjYTFmZWU3OTE4ZDExNjI0NzkyNWFiNTBmNTZhZjU2MjEzYjI4ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDFlNjgxYzZkNThjMmVjNDU1MzAwN2YxZWJkM2EwNWE0OGUzYTk3Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjNkMjdiOGJhYzYzMWJhZmNlNmYwNWRjODJiMTBkMzllMzA2YmFmNmZmZDM4
|
10
|
+
NGQ1MWNiMjQzMTBjNmU2MzdhNzdkMTI1NDBlMTgyNWQwNDQ5ZDczNjNmZjMw
|
11
|
+
YjAxODc3ZDZkMTI3NjBjZmI4YTVhYzg3NmJiZmI2ZDMwNjIyMzM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTNkMDUyY2NhZGRmOTVlMDEwYzM0ZmRhOTY5ODJiOWYzYTgyY2U5YWU4N2Y1
|
14
|
+
N2UwZWUxZjM0ZmIwYWNiNDMwNDkyYzAzMGRhMzhlZWZlYWJmYTc1ZmVlYmY5
|
15
|
+
OGNjN2IwZDc1NjUzMGU5Y2I3MmJkYTEyMTFhZmY1OTU0MTU5NDk=
|
@@ -40,18 +40,18 @@ And /^Verifico que se muestren la caja de clientes felices$/ do
|
|
40
40
|
if $SITE=="US"
|
41
41
|
BROWSER.div(:id,'happy-clients').should_not visible("Se muestra la caja de comentarios en usa")
|
42
42
|
end
|
43
|
-
if BROWSER.div(:id,'happy-clients').present?
|
44
|
-
happy_clients = BROWSER.div(:id,'happy-clients')
|
43
|
+
if BROWSER.div(:id,'happy-clients').present?
|
44
|
+
happy_clients = BROWSER.div(:id,'happy-clients')
|
45
45
|
happy_clients.should visible
|
46
|
-
happy_clients.div(:class,'comment').should visible
|
47
|
-
happy_clients.div(:class,'comment').text.should match('[A-Z]|[a-z]')
|
48
|
-
happy_clients.
|
49
|
-
happy_clients.
|
50
|
-
happy_clients.
|
51
|
-
happy_clients.
|
52
|
-
happy_clients.
|
53
|
-
happy_clients.
|
54
|
-
happy_clients.
|
46
|
+
happy_clients.div(:class,'ux-common-comment').should visible
|
47
|
+
happy_clients.div(:class,'ux-common-comment').text.should match('[A-Z]|[a-z]')
|
48
|
+
happy_clients.div(:class,'ux-common-comment-description').should visible
|
49
|
+
happy_clients.div(:class,'ux-common-comment-description').span(:class,'flights-comment-description').should visible
|
50
|
+
happy_clients.div(:class,'ux-common-comment-description').span(:class,'flights-comment-description').text.no_accents.should match('[A-Z]|[a-z]')
|
51
|
+
happy_clients.div(:class,'ux-common-comment-profile').span(:class,'ux-common-comment-name').should visible
|
52
|
+
happy_clients.div(:class,'ux-common-comment-profile').span(:class,'ux-common-comment-name').text.no_accents.should match('[A-Z]|[a-z]')
|
53
|
+
happy_clients.span(:class,'description').should visible
|
54
|
+
happy_clients.span(:class,'description').text.no_accents.should match('Por que \d+ millones de viajeros nos eligen|Why \d+ million travelers choose us|Por que \d+ milhoes de viajantes nos escolhem')
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
@@ -167,31 +167,38 @@ And /^Levanto los datos del vuelo$/ do
|
|
167
167
|
end
|
168
168
|
begin
|
169
169
|
BROWSER.div(:id,'popup-booking-details').span(:class,'popup-close-button popup-close').click
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
value.should equal(@popup_detalle_vuelo.tarifas[key])
|
183
|
-
end
|
170
|
+
@popup_detalle_vuelo = CheckoutCluster.new(@search.description,popup_detalle_vuelo)
|
171
|
+
unless @pop_up
|
172
|
+
puts @popup_detalle_vuelo.tarifas
|
173
|
+
@popup_detalle_vuelo.validarSumaDesgloce.should be_within(4).of(@popup_detalle_vuelo.tarifas['total'].value)
|
174
|
+
unless @popup_detalle_vuelo.tarifas['adt'].valor.zero?
|
175
|
+
@popup_detalle_vuelo.tarifas['adt'].valor.should equal(@popup_detalle_vuelo.tarifas['tarifa_adulto'].valor * @search.adt)
|
176
|
+
end
|
177
|
+
@itinerario_checkout.tarifas.each_pair do |key,value|
|
178
|
+
if @popup_detalle_vuelo.tarifas[key] and !value.zero? and value.currency == @popup_detalle_vuelo.tarifas[key].currency
|
179
|
+
value.should equal(@popup_detalle_vuelo.tarifas[key])
|
180
|
+
end
|
181
|
+
end
|
184
182
|
end
|
185
|
-
|
183
|
+
rescue Selenium::WebDriver::Error::UnknownError,Selenium::WebDriver::Error::ElementNotVisibleError
|
184
|
+
puts "No se pudo cerrar el popup"
|
185
|
+
end
|
186
186
|
end
|
187
187
|
|
188
188
|
When /^Verifico que se muestre el banner de cancelacion$/ do
|
189
189
|
value = get_abtesting "showFreeCancelMessage"
|
190
|
+
data = @search.get_results_search_service
|
191
|
+
provider = data["result"]["data"]["items"][0]["provider"]
|
192
|
+
puts provider
|
190
193
|
if $SITE=="EC" and value < 0
|
191
194
|
BROWSER.div(:id,'cancellation-advice').should visible("banner de cancelacion")
|
192
195
|
BROWSER.div(:id,'cancellation-advice').div(:class,'ux-common-message-content').p(:index,0).text.strip.should equal("¡Compre tranquilo!")
|
193
196
|
BROWSER.div(:id,'cancellation-advice').div(:class,'ux-common-message-content').p(:index,1).text.no_accents.strip.should equal("Si necesita cancelar su compra puede hacerlo gratis desde Mi Despegar hasta las 22 hs. del dia de hoy.")
|
194
|
-
|
197
|
+
elsif $SITE=="BR" and value < 50 and provider=="GDS"
|
198
|
+
BROWSER.div(:id,'cancellation-advice').should visible("banner de cancelacion")
|
199
|
+
BROWSER.div(:id,'cancellation-advice').div(:class,'ux-common-message-content').p(:index,0).text.strip.should equal("Compre tranquilo! Cancele no mesmo dia sem custo*!")
|
200
|
+
BROWSER.div(:id,'cancellation-advice').div(:class,'ux-common-message-content').p(:index,1).text.no_accents.strip.should equal("* Caso necessite cancelar sua compra, voce podera cancelar sem nenhum custo desde MeuDecolar ate as 20 hrs do mesmo dia da compra.")
|
201
|
+
else
|
195
202
|
BROWSER.div(:id,'cancellation-advice').should_not visible("banner de cancelacion")
|
196
203
|
end
|
197
204
|
end
|
@@ -219,4 +226,47 @@ end
|
|
219
226
|
|
220
227
|
When /^Verifico que dirija a la home$/ do
|
221
228
|
Watir::Wait.until(timeout=60){BROWSER.url == "#{@search.host}/"}
|
222
|
-
end
|
229
|
+
end
|
230
|
+
|
231
|
+
When /^pide factura fiscal$/ do
|
232
|
+
(BROWSER.checkbox(:id,'invoice-check').present? or BROWSER.fieldset(:id,'invoice').present?).should be_true
|
233
|
+
end
|
234
|
+
|
235
|
+
And /^Completo los campos de factura fiscal$/ do
|
236
|
+
container = BROWSER.fieldset(:id,'invoice')
|
237
|
+
if $SITE.upcase.match("AR")
|
238
|
+
option = ["FINAL","INSCR","EXENT","MONOTRIBUTO"][rand(3)]
|
239
|
+
BROWSER.fieldset(:id,'invoice').should visible("formulario de factura")
|
240
|
+
container.select_list(:id,'invoice-fiscal-status').select_value(option)
|
241
|
+
if option=="FINAL"
|
242
|
+
container.text_field(:id,'invoice-fiscal-id').value.should equal("20-32456734-9") unless BROWSER.li(:id,'cac-installment').present?
|
243
|
+
else
|
244
|
+
#lleno los campos requeridos
|
245
|
+
container.text_field(:id,'invoice-card-holder-name').set("diego qa romero")
|
246
|
+
container.select_list(:id,'invoice-state').select_value("B")
|
247
|
+
container.text_field(:id,'invoice-city-custom').set("buenos aires")
|
248
|
+
sleep(1)
|
249
|
+
BROWSER.send_keys :enter
|
250
|
+
container.text_field(:id,'invoice-street').set("corrientes")
|
251
|
+
container.text_field(:id,'invoice-postal-code').set("7111")
|
252
|
+
container.text_field(:id,'invoice-address-number').set("123")
|
253
|
+
container.text_field(:id,'invoice-address-floor').set("1")
|
254
|
+
container.text_field(:id,'invoice-address-deparment').set("1")
|
255
|
+
end
|
256
|
+
container.text_field(:id,'invoice-fiscal-id').set("20324567349")
|
257
|
+
else
|
258
|
+
container.checkbox(:id,'invoice-check').set(true)
|
259
|
+
container.text_field(:id,'invoice-fiscal-id').set("3334445556")
|
260
|
+
container.text_field(:id,'invoice-card-holder-name').set("diego qa romero")
|
261
|
+
container.select_list(:id,'invoice-state').options[2].select
|
262
|
+
container.text_field(:id,'invoice-city').set("Rosario")
|
263
|
+
container.text_field(:id,'invoice-street').set("corrientes")
|
264
|
+
if $SITE.upcase.match("MX")
|
265
|
+
container.text_field(:id,'invoice-other-state').set("Chiapas") if container.text_field(:id,'invoice-other-state').present?
|
266
|
+
container.text_field(:id,'invoice-postal-code').set("7111")
|
267
|
+
container.text_field(:id,'invoice-address-number').set("123")
|
268
|
+
container.text_field(:id,'invoice-address-floor').set("1")
|
269
|
+
container.text_field(:id,'invoice-address-deparment').set("1")
|
270
|
+
end
|
271
|
+
end
|
272
|
+
end
|
@@ -4,7 +4,8 @@ When /^Verifico que sean visibles los campos obligatorios$/ do
|
|
4
4
|
index = 0
|
5
5
|
@search.adt.times do |adulto|
|
6
6
|
container.text_field(:id,"passenger-first-name-#{index}").should visible
|
7
|
-
container.text_field(:id,"passenger-last-name-#{index}").should visible
|
7
|
+
container.text_field(:id,"passenger-last-name-#{index}").should visible
|
8
|
+
container.select_list(:id,"nationality-#{index}").select_value($SITE) if container.select_list(:id,"nationality-#{index}").present?
|
8
9
|
index += 1
|
9
10
|
end
|
10
11
|
@search.cnn.times do |adulto|
|
@@ -13,6 +14,7 @@ When /^Verifico que sean visibles los campos obligatorios$/ do
|
|
13
14
|
container.select_list(:id,"passenger-birthday-day-#{index}").should visible
|
14
15
|
container.select_list(:id,"passenger-birthday-month-#{index}").should visible
|
15
16
|
container.select_list(:id,"passenger-birthday-year-#{index}").should visible
|
17
|
+
container.select_list(:id,"nationality-#{index}").select_value($SITE) if container.select_list(:id,"nationality-#{index}").present?
|
16
18
|
index += 1
|
17
19
|
end
|
18
20
|
@search.inf.times do |adulto|
|
@@ -21,6 +23,7 @@ When /^Verifico que sean visibles los campos obligatorios$/ do
|
|
21
23
|
container.select_list(:id,"passenger-birthday-day-#{index}").should visible
|
22
24
|
container.select_list(:id,"passenger-birthday-month-#{index}").should visible
|
23
25
|
container.select_list(:id,"passenger-birthday-year-#{index}").should visible
|
26
|
+
container.select_list(:id,"nationality-#{index}").select_value($SITE) if container.select_list(:id,"nationality-#{index}").present?
|
24
27
|
index += 1
|
25
28
|
end
|
26
29
|
container = BROWSER.fieldset(:id,'payment')
|
@@ -187,30 +190,49 @@ end
|
|
187
190
|
|
188
191
|
When /^Verifico que se muestren los campos de factura$/ do
|
189
192
|
container = BROWSER.fieldset(:id,'invoice')
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
193
|
+
if $SITE.match("AR")
|
194
|
+
option = ["FINAL","INSCR","EXENT","MONOTRIBUTO"][rand(3)]
|
195
|
+
puts option
|
196
|
+
container.select_list(:id,'invoice-fiscal-status').select_value(option)
|
197
|
+
BROWSER.fieldset(:id,'invoice').should visible("formulario de factura")
|
198
|
+
container.select_list(:id,'invoice-fiscal-status').should visible
|
199
|
+
container.text_field(:id,'invoice-fiscal-id').should visible
|
200
|
+
if option!="FINAL"
|
201
|
+
sleep(60)
|
202
|
+
container.select_list(:id,'invoice-state').should visible
|
203
|
+
container.text_field(:id,'invoice-city-custom').should visible
|
204
|
+
container.text_field(:id,'invoice-street').should visible
|
205
|
+
container.text_field(:id,'invoice-postal-code').should visible
|
206
|
+
container.text_field(:id,'invoice-address-number').should visible
|
207
|
+
container.text_field(:id,'invoice-address-floor').should visible
|
208
|
+
container.text_field(:id,'invoice-address-deparment').should visible
|
209
|
+
end
|
210
|
+
else
|
211
|
+
container.div(:id,'invoiceDefinition.selected.value').should visible
|
212
|
+
container.div(:id,'invoiceDefinition.invoiceDataDefinition').should_not visible
|
213
|
+
container.checkbox(:id,'invoice-check').should visible
|
214
|
+
container.checkbox(:id,'invoice-check').set(true)
|
215
|
+
container.text_field(:id,'invoice-fiscal-id').should visible
|
216
|
+
container.text_field(:id,'invoice-card-holder-name').should visible
|
217
|
+
container.select_list(:id,'invoice-country').should visible
|
218
|
+
container.select_list(:id,'invoice-state').should visible
|
219
|
+
container.text_field(:id,'invoice-city-custom').should visible
|
220
|
+
container.text_field(:id,'invoice-street').should visible
|
221
|
+
if $SITE.match("MX")
|
222
|
+
container.text_field(:id,'invoice-email').should_not visible
|
223
|
+
container.text_field(:id,'invoice-postal-code').should visible
|
224
|
+
container.text_field(:id,'invoice-address-number').should visible
|
225
|
+
container.text_field(:id,'invoice-address-floor').should visible
|
226
|
+
container.text_field(:id,'invoice-address-deparment').should visible
|
227
|
+
container.link(:class,'search-postal-code').should visible
|
228
|
+
end
|
229
|
+
end
|
208
230
|
end
|
209
231
|
|
210
232
|
When /^Verifico texto de error de campos de factura vacio$/ do
|
211
233
|
container = BROWSER.fieldset(:id,'invoice')
|
212
234
|
BROWSER.link(:id,'submit').click
|
213
|
-
container.span(:id,'invoice-fiscal-id-missing_field').text.no_accents.should match("Por favor, ingrese el RFC de la razon social informada|Por favor, ingrese un numero de RUC")
|
235
|
+
container.span(:id,'invoice-fiscal-id-missing_field').text.no_accents.should match("Por favor, ingrese el RFC de la razon social informada|Por favor, ingrese un numero de RUC|Por favor, ingrese el CUI")
|
214
236
|
if $SITE.match("MX")
|
215
237
|
container.span(:id,'invoice-card-holder-name-missing_field').text.no_accents.should match("Por favor, ingrese el nombre o razon social")
|
216
238
|
container.span(:id,'invoice-email-missing_field').text.no_accents.should match("Por favor, ingrese el e-mail donde desea recibir la factura fiscal")
|
@@ -191,7 +191,7 @@ And /^Realizo la compra$/ do
|
|
191
191
|
begin
|
192
192
|
BROWSER.execute_script("javascript:void($('#submit').click());")
|
193
193
|
rescue Selenium::WebDriver::Error::UnknownError
|
194
|
-
BROWSER.a(:id=>'submit').click
|
194
|
+
BROWSER.a(:id=>'submit').click
|
195
195
|
rescue Watir::Wait::TimeoutError, Timeout::Error
|
196
196
|
stop_browser(BROWSER)
|
197
197
|
end
|
@@ -297,26 +297,4 @@ Then /^lleno los datos de tarjeta adicionales$/ do
|
|
297
297
|
container.text_field(:id,"invoice-street").set("Calle") if container.text_field(:id,"invoice-street").present?
|
298
298
|
container.text_field(:id,"invoice-address-number").set("470") if container.text_field(:id,"invoice-address-number").present?
|
299
299
|
BROWSER.link(:id,'submit').click if BROWSER.link(:id,'submit').present?
|
300
|
-
end
|
301
|
-
|
302
|
-
When /^pide factura fiscal$/ do
|
303
|
-
BROWSER.checkbox(:id,'invoice-check').should visible
|
304
|
-
end
|
305
|
-
|
306
|
-
And /^Completo los campos de factura fiscal$/ do
|
307
|
-
container = BROWSER.fieldset(:id,'invoice')
|
308
|
-
container.checkbox(:id,'invoice-check').set(true)
|
309
|
-
container.text_field(:id,'invoice-fiscal-id').set("3334445556")
|
310
|
-
container.text_field(:id,'invoice-card-holder-name').set("diego qa romero")
|
311
|
-
container.select_list(:id,'invoice-state').options[2].select
|
312
|
-
container.text_field(:id,'invoice-city').set("Rosario")
|
313
|
-
container.text_field(:id,'invoice-street').set("corrientes")
|
314
|
-
if $SITE.upcase.match("MX")
|
315
|
-
container.text_field(:id,'invoice-email').set("bookingvuelos@despegar.com")
|
316
|
-
container.text_field(:id,'invoice-other-state').set("Chiapas") if container.text_field(:id,'invoice-other-state').present?
|
317
|
-
container.text_field(:id,'invoice-postal-code').set("7111")
|
318
|
-
container.text_field(:id,'invoice-address-number').set("123")
|
319
|
-
container.text_field(:id,'invoice-address-floor').set("1")
|
320
|
-
container.text_field(:id,'invoice-address-deparment').set("1")
|
321
|
-
end
|
322
|
-
end
|
300
|
+
end
|
@@ -10,7 +10,7 @@ class DetailsCluster
|
|
10
10
|
tramo['bussines'] = nil
|
11
11
|
tramo['clase'] = (div/"div.segment span.class").first.inner_text.strip.no_accents
|
12
12
|
else
|
13
|
-
tramo['bussines'] = ((div/"div.segment span.not-economy-segments span.not-economy-segments-description").first.inner_text.strip.no_accents == "Business")
|
13
|
+
tramo['bussines'] = true #((div/"div.segment span.not-economy-segments span.not-economy-segments-description").first.inner_text.strip.no_accents == "Business")
|
14
14
|
tramo['clase'] = (div/"div.segment span.not-economy-segments span.not-economy-segments-description").first.inner_text.strip.no_accents
|
15
15
|
end
|
16
16
|
tramo['ciudad_origen'] = (div/"li.departure span.location span.data").first.inner_text.strip.no_accents
|
@@ -13,6 +13,7 @@ Característica: checkout.button_cac
|
|
13
13
|
Entonces Completo el formulario de pasajeros
|
14
14
|
Y Completo los datos para reservas CAC
|
15
15
|
Y Completo los datos de contacto
|
16
|
+
Y Si pide factura fiscal, Completo los campos de factura fiscal
|
16
17
|
Y Realizo la compra
|
17
18
|
Entonces Verifico que dirija a la pagina de gracias
|
18
19
|
Entonces Si el checkout me pide mas datos de tarjeta, lleno los datos de tarjeta adicionales
|
@@ -5,17 +5,17 @@ Característica: landing.sort
|
|
5
5
|
|
6
6
|
@sort
|
7
7
|
Esquema del escenario: Ingresar a resultados, filtro por un precio, verificar que se muestre correctamente y sea el fare que se debe aplicar
|
8
|
-
Cuando
|
9
|
-
Entonces Verifico que la pagina no rompa
|
10
|
-
Cuando Espero que termine de cargar la home de landing
|
11
|
-
Cuando Elijo un link para pasar a los resultados de landing
|
12
|
-
Cuando Ingreso a resultados de landing
|
8
|
+
Cuando Genero resultados de landing en "<pais>"
|
13
9
|
Entonces Verifico que la pagina no rompa
|
14
10
|
Entonces Verifico que traiga resultados de landings
|
15
11
|
Cuando Elijo el tipo de vuelo "<tipo>"
|
16
12
|
Entonces Verifico que la pagina no rompa
|
17
13
|
Entonces Verifico que traiga resultados de landings
|
18
14
|
Y Valido el sorting de landing en "<pais>"
|
15
|
+
Y Filtro por un itinerario en la matriz en "<pais>"
|
16
|
+
Cuando Espero que termine de cargar
|
17
|
+
Entonces Valido la base tarifaria en "<pais>"
|
18
|
+
Y Valido el breakdown en "<pais>"
|
19
19
|
|
20
20
|
@ar
|
21
21
|
@roundtrip
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
|
17
17
|
|
18
|
-
gem.version = '2.1.
|
18
|
+
gem.version = '2.1.4' #La version se debe incrementar cada vez que se desea publicar una nueva version del test.
|
19
19
|
|
20
20
|
gem.add_dependency('henry-container', '>= 0.1.39')
|
21
21
|
gem.add_dependency('watir-webdriver')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flights_gui_henry_tests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lgonzalez,lsimean
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|