flights_gui_tests 0.0.34 → 0.0.35
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/form_steps.rb +3 -0
- data/features/step_definitions/checkout/load_steps.rb +1 -0
- data/features/step_definitions/checkout/verifications_steps.rb +4 -0
- data/features/step_definitions/landing/landing_steps.rb +1 -1
- data/features/step_definitions/landing/load_steps.rb +5 -2
- data/features/support/modules/checkout/tarjeta.rb +49 -0
- data/features/support/pages/results/search_page.rb +1 -0
- data/features/tests/checkout/book_ok_br.feature +59 -0
- data/flights_gui_tests.gemspec +1 -1
- data/henry-context.yml +77 -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: 411abf6e08f7dbbe0cceaeebfaa575724e062c5d
|
4
|
+
data.tar.gz: 6d33b027ec83c25d81f6afccc23bdc4d85ab339d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 712a50b3da6e30ffb9466518dad3b96388fbfbcb609f953af5957483dd1bdf10b706972605287414d4e6290bfc3bb0d97d7faadea07ac5f76b287bcf15228620
|
7
|
+
data.tar.gz: 49df5f0afd487b7b2103e0d6668ae30224fd1dbfabe3571b142ab4a274c21533c2fb620acd61aaed460dc7fa18fc393ba6344b03a785fbcf1a9d2674dbd5ff4d
|
@@ -5,6 +5,9 @@ end
|
|
5
5
|
Y(/^cargo los datos de la tarjeta$/) do
|
6
6
|
@page.cargar_datos_tarjeta
|
7
7
|
end
|
8
|
+
Y(/^cargo los datos de la tarjeta en el nuevo formulario$/) do
|
9
|
+
@page.cargar_datos_tarjeta_nuevo_formulario
|
10
|
+
end
|
8
11
|
Y(/^cargo los datos de facturacion$/) do
|
9
12
|
if AllPages.site.upcase.match("AR")
|
10
13
|
@page.formulario_facturacion_element.should visible("formulario de factura")
|
@@ -17,6 +17,7 @@ Cuando(/^espero que termine de cargar la pagina de checkout$/) do
|
|
17
17
|
@page = Checkout::CheckoutPage.new($browser)
|
18
18
|
@page.popup_transicion_inicial_element.when_not_visible(timeout=120)
|
19
19
|
@page.pasajeros_element.when_visible(timeout=120)
|
20
|
+
puts "URL: #{@page.browser.url}"
|
20
21
|
end
|
21
22
|
|
22
23
|
Entonces(/^verifico que ingrese al checkout$/) do
|
@@ -35,6 +35,10 @@ Cuando(/^verifico que los precios de las cuotas se muestran correctamente$/) do
|
|
35
35
|
@page.verificar_tipos_de_pago
|
36
36
|
end
|
37
37
|
|
38
|
+
Cuando(/^verifico que los precios de las formas de pago nueva se muestren correctamente$/) do
|
39
|
+
@page.verificar_nuevos_tipos_de_pago
|
40
|
+
end
|
41
|
+
|
38
42
|
Y(/^verifico que no se muestre la opcion de reserva CAC en BR$/) do
|
39
43
|
@page.browser.execute_script("javascript:void(function(){ShowButtonCAC();})();")
|
40
44
|
begin
|
@@ -12,7 +12,7 @@ Y(/^verifico que la ciudad destino sea la que se eligio$/) do
|
|
12
12
|
doc = Hpricot.parse(@page.html)
|
13
13
|
ciudades = (doc/"div.mainTitle/h1").inner_text.strip.no_accents
|
14
14
|
ciudad_destino = ciudades.match(/ (para|a|to) ([^,]+)/)[2].strip
|
15
|
-
@page.ciudad_elegida.should equal(ciudad_destino) unless @page.ciudad_elegida.match(/Guarullos/)
|
15
|
+
@page.ciudad_elegida.should equal(ciudad_destino) unless @page.ciudad_elegida.match(/Guarullos|Panama|Santiago|Mexico/)
|
16
16
|
end
|
17
17
|
|
18
18
|
Entonces(/^valido el sorting de landing$/) do
|
@@ -30,14 +30,17 @@ Y(/^verifico que traiga resultados de landing$/) do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
Y(/^verifico la pagina donde ingresa$/) do
|
33
|
-
@page_results
|
33
|
+
@page_results = Results::SearchPage.new($browser)
|
34
34
|
@page_checkout = Checkout::CheckoutPage.new($browser)
|
35
35
|
puts " URL: #{@page.url}"
|
36
|
-
|
36
|
+
byebug
|
37
|
+
Watir::Wait.until(timeout = 300){@page_results.carga_element.present? or @page_results.itinerario_element.present? or @page_checkout.pasajeros_element.present? or @page_checkout.notificacion_warning_element.present?}
|
37
38
|
if @page_checkout.pasajeros_element.present? or @page_checkout.notificacion_warning_element.present?
|
38
39
|
@page_in = "checkout"
|
40
|
+
@page = @page_checkout
|
39
41
|
else
|
40
42
|
@page_in = "results"
|
43
|
+
@page = @page_results
|
41
44
|
end
|
42
45
|
sleep(1)
|
43
46
|
end
|
@@ -4,6 +4,7 @@ module Checkout
|
|
4
4
|
include PageObject
|
5
5
|
|
6
6
|
select_list(:tarjeta,:id=>"card-brand")
|
7
|
+
select_list(:cuotas,:id=>"card-installment-select")
|
7
8
|
select_list(:mes_vencimiento_tarjeta,:id=>"card-expiration-month")
|
8
9
|
select_list(:ano_vencimiento_tarjeta,:id=>"card-expiration-year")
|
9
10
|
select_list(:tipo_titular_tarjeta,:id=>"owner-type")
|
@@ -43,6 +44,8 @@ module Checkout
|
|
43
44
|
span(:desc_fecha_deposito,:css=>"#cash-installment .installment-description-info")
|
44
45
|
span(:desc_pasos_deposito,:css=>"#cash-installment .installment-detail-text")
|
45
46
|
span(:precio_final,:id=>"total-price")
|
47
|
+
span(:precio_final_combo,:css=>"#installments-price .total")
|
48
|
+
span(:desglose_de_cuotas,:css=>"#installments-price .installments-detail")
|
46
49
|
|
47
50
|
li(:medio_de_pago_seleccionado,:css=>"#paymentDefinition .selected")
|
48
51
|
li(:medio_de_subpago_seleccionado,:css=>".list .sub-selected")
|
@@ -94,6 +97,30 @@ module Checkout
|
|
94
97
|
self.cargar_datos_extras_de_tarjeta
|
95
98
|
end
|
96
99
|
|
100
|
+
def cargar_datos_tarjeta_nuevo_formulario
|
101
|
+
data = self.manage_data.get_results_search_service
|
102
|
+
provider = data["result"]["data"]["items"][0]["provider"]
|
103
|
+
select_un_pago
|
104
|
+
cuotas_element.select_value("1_CREDIT_VI_null")
|
105
|
+
numero_tarjeta_element.set "4242424242424242"
|
106
|
+
mes_vencimiento_tarjeta_element.select 5
|
107
|
+
ano_vencimiento_tarjeta_element.select(Date.today.year+1)
|
108
|
+
codigo_seguridad_tarjeta_element.set "123"
|
109
|
+
banco_emisor_element.set "galicia" if banco_emisor_element.present?
|
110
|
+
tipo_titular_tarjeta_value = "PERSON" if tipo_titular_tarjeta_element.present?
|
111
|
+
nombre_titular_tarjeta_element.set "Martin qa diez"
|
112
|
+
if documento_titular_tarjeta_element.present?
|
113
|
+
number = case AllPages.site
|
114
|
+
when "CL" then "7028168-6"
|
115
|
+
when "BR" then "22233366638"
|
116
|
+
else "32456324"
|
117
|
+
end
|
118
|
+
documento_titular_tarjeta_element.set number
|
119
|
+
end
|
120
|
+
sexo_titular_tarjeta_element.select_value "MALE" if sexo_titular_tarjeta_element.present?
|
121
|
+
self.cargar_datos_extras_de_tarjeta
|
122
|
+
end
|
123
|
+
|
97
124
|
def cargar_datos_tarjeta_guardada
|
98
125
|
@browser.execute_script("javascript:void($('#stored-cards .display-cards').click())") if mostrar_cartas_guardadas_element.text.no_accents.downcase.match("mas|mais|more")
|
99
126
|
if AllPages.site=="BR"
|
@@ -201,5 +228,27 @@ module Checkout
|
|
201
228
|
end
|
202
229
|
end
|
203
230
|
|
231
|
+
def verificar_nuevos_tipos_de_pago
|
232
|
+
doc = Hpricot.parse(@browser.html)
|
233
|
+
(doc/"ul.new-installments li.purchase-installment").each do |li|
|
234
|
+
@browser.radio(:id,(li/"input").first.attributes['id']).click
|
235
|
+
sleep(1)
|
236
|
+
doc = Hpricot.parse(@browser.html)
|
237
|
+
(doc/"select#card-installment-select option").each do |option|
|
238
|
+
@browser.select_list(:id,'card-installment-select').select_value(option.attributes['value'])
|
239
|
+
total_desglose = Hpricot.parse(precio_final_element.html).inner_text.gsub(/\D/,'').to_i
|
240
|
+
total_combo = Hpricot.parse(precio_final_combo_element.html).inner_text.gsub(/\D/,'').to_i
|
241
|
+
total_desglose.should be_within(2).of(total_combo)
|
242
|
+
if desglose_de_cuotas_element.present?
|
243
|
+
doc = Hpricot.parse(desglose_de_cuotas_element.html)
|
244
|
+
inicial = (doc/"span.first-price").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
|
245
|
+
valor_restantes = (doc/"span.others-price").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
|
246
|
+
cant_restantes = (doc/"span.others-quantity").inner_text.to_i
|
247
|
+
(inicial + (cant_restantes * valor_restantes)).should be_within(3).of(total_combo)
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
204
253
|
end
|
205
254
|
end
|
@@ -36,6 +36,7 @@ module Results
|
|
36
36
|
elements(:opciones_ida,:radio,:css=>"div.outbound input")
|
37
37
|
elements(:opciones_vuelta,:radio,:css=>"div.inbound input")
|
38
38
|
elements(:itinerarios, :div, :css=>"#clusters .cluster")
|
39
|
+
element(:itinerario, :div, :css=>"#clusters .cluster")
|
39
40
|
|
40
41
|
elements(:detalle_precio_itinerario, :li, :css=>"#clusters .cluster .fare-detail li")
|
41
42
|
element(:precio_itinerario, :span, :css=>".cluster .fare .price-currency")
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#language: es
|
2
|
+
@checkout
|
3
|
+
Característica: checkout.book_ok_br
|
4
|
+
Se verifica la correcta carga y funcionamiento de la pagina de checkout, se cargan los datos correctos y se realiza la compra
|
5
|
+
|
6
|
+
@book_ok_br
|
7
|
+
Esquema del escenario: Se verifica que se pueda realizar una compra correctamente, validando que los valores a travez del flujo sean correctos y se mantengan a travez del mismo [REGRESION].
|
8
|
+
Dado una pagina de resultados en "<pais>" para una busqueda "<tipo>" del tipo "<cabotage>"
|
9
|
+
Entonces verifico que la pagina no rompa
|
10
|
+
Cuando espero que termine de cargar la pagina de resultados
|
11
|
+
Entonces verifico que traiga resultados
|
12
|
+
Cuando elijo un itinerario y paso a checkout
|
13
|
+
Cuando espero que termine de cargar la pagina de checkout
|
14
|
+
Entonces verifico que ingrese al checkout
|
15
|
+
Y verifico que la pagina no rompa
|
16
|
+
Cuando fuerzo el abztesting de "showNewPaymentType" al "45"
|
17
|
+
Y refresco la pagina
|
18
|
+
Entonces verifico que ingrese al checkout
|
19
|
+
Y verifico que la pagina no rompa
|
20
|
+
Y valido los valores del desglose del checkout
|
21
|
+
Y verifico el pixel de Efrontier
|
22
|
+
Y verifico el pixel de trackeame en checkout
|
23
|
+
Y si el site es "AR", verifico el tag de remarketing de facebook
|
24
|
+
Entonces verifico que los precios de las formas de pago nueva se muestren correctamente
|
25
|
+
Y verifico que se muestren la caja de clientes felices
|
26
|
+
Entonces cargo los pasajeros
|
27
|
+
Y cargo los datos de la tarjeta en el nuevo formulario
|
28
|
+
Y si el site es "AR|MX|PE|BR", cargo los datos de facturacion
|
29
|
+
Y cargo los datos de contacto
|
30
|
+
Y verifico que los datos cargados sean mostrados correctamente al lado del boton comprar
|
31
|
+
Cuando acepto y compro
|
32
|
+
Entonces espero que termine el pedido de compra
|
33
|
+
Y verifico si no trae errores
|
34
|
+
Entonces si aparece el popup de no disponibilidad, elijo un itinerario del popup de no disponibilidad
|
35
|
+
Entonces espero que termine de cargar la pagina de gracias
|
36
|
+
Y verifico que ingrese a la pagina de gracias
|
37
|
+
Y verifico el link de mi despegar
|
38
|
+
Y verifico el popup de asistencia al viajero
|
39
|
+
Y verifico los datos del vuelo comprado
|
40
|
+
Y verifico los valores del desglose en gracias contra los del checkout
|
41
|
+
Y verifico el tag de datalayer
|
42
|
+
Y verifico el pixel de Efrontier
|
43
|
+
Y si el site es "BR", verifico el pixel de doubleclick
|
44
|
+
|
45
|
+
@br
|
46
|
+
@roundtrip
|
47
|
+
Ejemplos:
|
48
|
+
|pais|tipo|cabotage|
|
49
|
+
|BR |roundtrip|nil|
|
50
|
+
@br
|
51
|
+
@oneway
|
52
|
+
Ejemplos:
|
53
|
+
|pais|tipo|cabotage|
|
54
|
+
|BR |oneway|true|
|
55
|
+
@br
|
56
|
+
@multipledestinations
|
57
|
+
Ejemplos:
|
58
|
+
|pais|tipo|cabotage|
|
59
|
+
|BR |multipledestinations|nil|
|
data/flights_gui_tests.gemspec
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
|
17
17
|
|
18
|
-
gem.version = '0.0.
|
18
|
+
gem.version = '0.0.35' #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('page-object')
|
data/henry-context.yml
CHANGED
@@ -10367,6 +10367,83 @@ tasks:
|
|
10367
10367
|
recipients:
|
10368
10368
|
- estebanldh@gmail.com
|
10369
10369
|
- nsimean@despegar.com
|
10370
|
+
- name: checkout.book_ok_br
|
10371
|
+
class_name: Henry::Task::CucumberTask
|
10372
|
+
options:
|
10373
|
+
tags:
|
10374
|
+
- checkout
|
10375
|
+
- book_ok_br
|
10376
|
+
expand: true
|
10377
|
+
no-source: true
|
10378
|
+
reports:
|
10379
|
+
- format: html
|
10380
|
+
name: ${DATE}_${TASK_NAME}.html
|
10381
|
+
recipients:
|
10382
|
+
- estebanldh@gmail.com
|
10383
|
+
- nsimean@despegar.com
|
10384
|
+
- name: checkout.book_ok_br.br
|
10385
|
+
class_name: Henry::Task::CucumberTask
|
10386
|
+
options:
|
10387
|
+
tags:
|
10388
|
+
- checkout
|
10389
|
+
- book_ok_br
|
10390
|
+
- br
|
10391
|
+
expand: true
|
10392
|
+
no-source: true
|
10393
|
+
reports:
|
10394
|
+
- format: html
|
10395
|
+
name: ${DATE}_${TASK_NAME}.html
|
10396
|
+
recipients:
|
10397
|
+
- estebanldh@gmail.com
|
10398
|
+
- nsimean@despegar.com
|
10399
|
+
- name: checkout.book_ok_br.br.roundtrip
|
10400
|
+
class_name: Henry::Task::CucumberTask
|
10401
|
+
options:
|
10402
|
+
tags:
|
10403
|
+
- checkout
|
10404
|
+
- book_ok_br
|
10405
|
+
- br
|
10406
|
+
- roundtrip
|
10407
|
+
expand: true
|
10408
|
+
no-source: true
|
10409
|
+
reports:
|
10410
|
+
- format: html
|
10411
|
+
name: ${DATE}_${TASK_NAME}.html
|
10412
|
+
recipients:
|
10413
|
+
- estebanldh@gmail.com
|
10414
|
+
- nsimean@despegar.com
|
10415
|
+
- name: checkout.book_ok_br.br.oneway
|
10416
|
+
class_name: Henry::Task::CucumberTask
|
10417
|
+
options:
|
10418
|
+
tags:
|
10419
|
+
- checkout
|
10420
|
+
- book_ok_br
|
10421
|
+
- br
|
10422
|
+
- oneway
|
10423
|
+
expand: true
|
10424
|
+
no-source: true
|
10425
|
+
reports:
|
10426
|
+
- format: html
|
10427
|
+
name: ${DATE}_${TASK_NAME}.html
|
10428
|
+
recipients:
|
10429
|
+
- estebanldh@gmail.com
|
10430
|
+
- nsimean@despegar.com
|
10431
|
+
- name: checkout.book_ok_br.br.multipledestinations
|
10432
|
+
class_name: Henry::Task::CucumberTask
|
10433
|
+
options:
|
10434
|
+
tags:
|
10435
|
+
- checkout
|
10436
|
+
- book_ok_br
|
10437
|
+
- br
|
10438
|
+
- multipledestinations
|
10439
|
+
expand: true
|
10440
|
+
no-source: true
|
10441
|
+
reports:
|
10442
|
+
- format: html
|
10443
|
+
name: ${DATE}_${TASK_NAME}.html
|
10444
|
+
recipients:
|
10445
|
+
- estebanldh@gmail.com
|
10446
|
+
- nsimean@despegar.com
|
10370
10447
|
- name: checkout.online_payment
|
10371
10448
|
class_name: Henry::Task::CucumberTask
|
10372
10449
|
options:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flights_gui_tests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.35
|
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-09-
|
11
|
+
date: 2014-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|
@@ -278,6 +278,7 @@ files:
|
|
278
278
|
- features/support/pages/thanks/thanks_page.rb
|
279
279
|
- features/tests/checkout/agency.feature
|
280
280
|
- features/tests/checkout/book_ok.feature
|
281
|
+
- features/tests/checkout/book_ok_br.feature
|
281
282
|
- features/tests/checkout/cac.feature
|
282
283
|
- features/tests/checkout/cash_payment.feature
|
283
284
|
- features/tests/checkout/compras_duplicadas.feature
|