flights_gui_tests 0.0.36 → 0.0.37
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/step_definitions/checkout/checkout_steps.rb +18 -0
- data/features/step_definitions/devtools_steps.rb +25 -0
- data/features/step_definitions/page_steps.rb +4 -0
- data/features/support/env.rb +1 -0
- data/features/support/modules/checkout/tarjeta.rb +4 -5
- data/features/support/modules/devtools.rb +21 -0
- data/features/support/pages/all_pages.rb +1 -0
- data/features/tests/checkout/book_ok.feature +3 -0
- data/features/tests/checkout/book_ok_br.feature +3 -3
- data/features/tests/checkout/low_cost.feature +6 -2
- data/flights_gui_tests.gemspec +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f582e78f27ea27d27cd4680d088f1bce48f8bdcc
|
4
|
+
data.tar.gz: 2b59e5134dd0ab50039009c36771008ec8bd053f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0add7bc0a45212451e5d84ab99d13ee48aa9e076fb12298390780b854238f95a0862a148f660cfe4bc1fca07dcbbcbac11cdbaf5830c51e24fe94f9a0232b536
|
7
|
+
data.tar.gz: 4405f7de6ff4563360d77862b4be39b57f172cb4d54d4e03ea323b4c55020aa192f52ffc74920ba776cb10a9b83bafe12ceea0138014cba4595544681092b565
|
@@ -63,6 +63,24 @@ Entonces(/^elijo un itinerario para fast checkout del popup de no disponibilidad
|
|
63
63
|
step "si aparece el popup de no disponibilidad, elijo un itinerario para fast checkout del popup de no disponibilidad"
|
64
64
|
end
|
65
65
|
|
66
|
+
Entonces(/^elijo un itinerario para checkout de nuevas formas de pago del popup de no disponibilidad$/) do
|
67
|
+
@popup_no_disponibilidad_page.sumar_aparicion
|
68
|
+
pending("La cantidad de compras supero las #{@popup_no_disponibilidad_page.apariciones} apariciones") if @popup_no_disponibilidad_page.apariciones > 4
|
69
|
+
@popup_no_disponibilidad_page.itinerario_element.when_visible(timeout=60)
|
70
|
+
@popup_no_disponibilidad_page.cargar_itinerarios
|
71
|
+
@itinerario_checkout = @popup_no_disponibilidad_page.elegir_itinerario(0)
|
72
|
+
step "verifico que ingrese al checkout"
|
73
|
+
step "verifico que la pagina no rompa"
|
74
|
+
step "cargo los pasajeros"
|
75
|
+
step "cargo los datos de la tarjeta en el nuevo formulario"
|
76
|
+
step "si el site es \"AR|MX|PE|BR\", cargo los datos de facturacion"
|
77
|
+
step "cargo los datos de contacto"
|
78
|
+
step "acepto y compro"
|
79
|
+
step "espero que termine el pedido de compra"
|
80
|
+
step "verifico si no trae errores"
|
81
|
+
step "si aparece el popup de no disponibilidad, elijo un itinerario para checkout de nuevas formas de pago del popup de no disponibilidad"
|
82
|
+
end
|
83
|
+
|
66
84
|
Entonces(/^elijo un itinerario para pago online del popup de no disponibilidad$/) do
|
67
85
|
@popup_no_disponibilidad_page.sumar_aparicion
|
68
86
|
pending("La cantidad de compras supero las #{@popup_no_disponibilidad_page.apariciones} apariciones") if @popup_no_disponibilidad_page.apariciones > 4
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
Cuando(/^mostrar devtools$/) do
|
3
|
+
unless @page.tab_devtools_element.present?
|
4
|
+
@page.browser.execute_script("javascript:(function(){mcReqJs.load({'projectId': 'flights','modules': ['core-flights/devtools'],'callback':function(devtools){devtools.init();}});})();")
|
5
|
+
else
|
6
|
+
sleep(0.5)
|
7
|
+
@page.tab_devtools_element.click
|
8
|
+
sleep(0.5)
|
9
|
+
end
|
10
|
+
@page.devtools_element.when_visible(timeout=10)
|
11
|
+
end
|
12
|
+
|
13
|
+
Entonces(/^elijo opcion "(.*)" para dry run$/) do |value|
|
14
|
+
@page.seleccionar_dry_run_element.select_value(value)
|
15
|
+
@page.enviar_dryrun_element.click
|
16
|
+
end
|
17
|
+
|
18
|
+
Cuando(/^fuerzo el abztesting por devtool de "(.*?)" al "(.*?)"$/) do |arg1,arg2|
|
19
|
+
@page.abztesting_element.click
|
20
|
+
sleep(0.5)
|
21
|
+
@page.setear_abztesting(arg1,arg2)
|
22
|
+
@page.enviar_abztesting_element.click
|
23
|
+
sleep(1)
|
24
|
+
@page.refresh
|
25
|
+
end
|
@@ -11,6 +11,10 @@ Entonces(/^el site no es "(.*)"$/) do |sites|
|
|
11
11
|
AllPages.site.should_not match(sites)
|
12
12
|
end
|
13
13
|
|
14
|
+
Entonces(/^el checkout tiene las nuevas formas de pago en BR$/) do
|
15
|
+
@page.cuotas_element.should visible
|
16
|
+
end
|
17
|
+
|
14
18
|
Entonces(/^seteo el proveedor "(.*)"$/) do |provider|
|
15
19
|
@page.browser.execute_script("javascript:void(document.cookie='XDESP-FDBS-PROVIDER=#{provider};path=/');")
|
16
20
|
@page.manage_data.set_header_json({"XDESP-FDBS-PROVIDER"=>provider})
|
data/features/support/env.rb
CHANGED
@@ -3,7 +3,7 @@ module Checkout
|
|
3
3
|
module Tarjeta
|
4
4
|
include PageObject
|
5
5
|
|
6
|
-
select_list(:tarjeta,:id=>"card-
|
6
|
+
select_list(:tarjeta,:id=>"card-installment-select")
|
7
7
|
select_list(:cuotas,:id=>"card-installment-select")
|
8
8
|
select_list(:mes_vencimiento_tarjeta,:id=>"card-expiration-month")
|
9
9
|
select_list(:ano_vencimiento_tarjeta,:id=>"card-expiration-year")
|
@@ -31,6 +31,7 @@ module Checkout
|
|
31
31
|
div(:con_intereses,:class=>"installments-with-interest")
|
32
32
|
|
33
33
|
radio_button(:un_pago,:id=>"installment-0")
|
34
|
+
radio_button(:un_pago_visa,:value=>"_VI")
|
34
35
|
radio_button(:un_pago_argentina,:class=>"radio main-radio ")
|
35
36
|
radio_button(:un_pago_debito,:id=>"installment-1")
|
36
37
|
radio_button(:deposito,:css=>"#cash-installment .main-radio")
|
@@ -100,7 +101,7 @@ module Checkout
|
|
100
101
|
def cargar_datos_tarjeta_nuevo_formulario
|
101
102
|
data = self.manage_data.get_results_search_service
|
102
103
|
provider = data["result"]["data"]["items"][0]["provider"]
|
103
|
-
|
104
|
+
select_un_pago_visa
|
104
105
|
cuotas_element.select_value("1_CREDIT_VI_null")
|
105
106
|
numero_tarjeta_element.set "4242424242424242"
|
106
107
|
mes_vencimiento_tarjeta_element.select 5
|
@@ -237,14 +238,12 @@ module Checkout
|
|
237
238
|
(doc/"select#card-installment-select option").each do |option|
|
238
239
|
@browser.select_list(:id,'card-installment-select').select_value(option.attributes['value'])
|
239
240
|
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
241
|
if desglose_de_cuotas_element.present?
|
243
242
|
doc = Hpricot.parse(desglose_de_cuotas_element.html)
|
244
243
|
inicial = (doc/"span.first-price").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
|
245
244
|
valor_restantes = (doc/"span.others-price").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
|
246
245
|
cant_restantes = (doc/"span.others-quantity").inner_text.to_i
|
247
|
-
(inicial + (cant_restantes * valor_restantes)).should be_within(3).of(
|
246
|
+
(inicial + (cant_restantes * valor_restantes)).should be_within(3).of(total_desglose)
|
248
247
|
end
|
249
248
|
end
|
250
249
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module DevTools
|
3
|
+
|
4
|
+
include PageObject
|
5
|
+
|
6
|
+
span(:tab_devtools,:text=>'DevTools')
|
7
|
+
span(:enviar_dryrun,:css=>"#devtools #dryrun-go")
|
8
|
+
span(:enviar_abztesting,:css=>"#abztesting-popup #abztesting-go")
|
9
|
+
span(:abztesting,:css=>'#devtools #abztesting')
|
10
|
+
span(:enviar_ambiente,:css=>'#devtools #environment-go')
|
11
|
+
|
12
|
+
div(:devtools,:id=>"devtools")
|
13
|
+
div(:popup_abztesting,:id=>"abztesting-popup")
|
14
|
+
|
15
|
+
select_list(:seleccionar_dry_run,:css=>"#devtools #dryrun-select")
|
16
|
+
|
17
|
+
def setear_abztesting(arg1,arg2)
|
18
|
+
self.popup_abztesting_element.text_field(:id,arg1).set(arg2)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -13,6 +13,9 @@ Característica: checkout.book_ok
|
|
13
13
|
Cuando espero que termine de cargar la pagina de checkout
|
14
14
|
Entonces verifico que ingrese al checkout
|
15
15
|
Y verifico que la pagina no rompa
|
16
|
+
Cuando si el site es "BR", fuerzo el abztesting de "showNewPaymentType" al "85"
|
17
|
+
Y si el site es "BR", refresco la pagina
|
18
|
+
Entonces si el site es "BR", verifico que ingrese al checkout
|
16
19
|
Y valido los valores del desglose del checkout
|
17
20
|
Y verifico el pixel de Efrontier
|
18
21
|
Y verifico el pixel de trackeame en checkout
|
@@ -13,8 +13,8 @@ Característica: checkout.book_ok_br
|
|
13
13
|
Cuando espero que termine de cargar la pagina de checkout
|
14
14
|
Entonces verifico que ingrese al checkout
|
15
15
|
Y verifico que la pagina no rompa
|
16
|
-
Cuando
|
17
|
-
|
16
|
+
Cuando mostrar devtools
|
17
|
+
Cuando fuerzo el abztesting por devtool de "showNewPaymentType" al "45"
|
18
18
|
Entonces verifico que ingrese al checkout
|
19
19
|
Y verifico que la pagina no rompa
|
20
20
|
Y valido los valores del desglose del checkout
|
@@ -31,7 +31,7 @@ Característica: checkout.book_ok_br
|
|
31
31
|
Cuando acepto y compro
|
32
32
|
Entonces espero que termine el pedido de compra
|
33
33
|
Y verifico si no trae errores
|
34
|
-
Entonces si aparece el popup de no disponibilidad, elijo un itinerario del popup de no disponibilidad
|
34
|
+
Entonces si aparece el popup de no disponibilidad, elijo un itinerario para checkout de nuevas formas de pago del popup de no disponibilidad
|
35
35
|
Entonces espero que termine de cargar la pagina de gracias
|
36
36
|
Y verifico que ingrese a la pagina de gracias
|
37
37
|
Y verifico el link de mi despegar
|
@@ -17,14 +17,18 @@ Característica: checkout.low_cost
|
|
17
17
|
Cuando espero que termine de cargar la pagina de checkout
|
18
18
|
Entonces verifico que ingrese al checkout
|
19
19
|
Y verifico que la pagina no rompa
|
20
|
+
Cuando mostrar devtools
|
21
|
+
Cuando fuerzo el abztesting por devtool de "showNewPaymentType" al "45"
|
22
|
+
Entonces verifico que ingrese al checkout
|
23
|
+
Y verifico que la pagina no rompa
|
20
24
|
Y valido los valores del desglose del checkout
|
21
25
|
Y verifico el pixel de Efrontier
|
22
26
|
Y verifico el pixel de trackeame en checkout
|
23
27
|
Y si el site es "AR", verifico el tag de remarketing de facebook
|
24
|
-
Entonces verifico que los precios de las
|
28
|
+
Entonces verifico que los precios de las formas de pago nueva se muestren correctamente
|
25
29
|
Y verifico que se muestren la caja de clientes felices
|
26
30
|
Entonces cargo los pasajeros
|
27
|
-
Y cargo los datos de la tarjeta
|
31
|
+
Y cargo los datos de la tarjeta en el nuevo formulario
|
28
32
|
Y si el site es "AR|MX|PE|BR", cargo los datos de facturacion
|
29
33
|
Y cargo los datos de contacto
|
30
34
|
Cuando acepto y compro
|
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.37' #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')
|
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.37
|
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-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|
@@ -204,6 +204,7 @@ files:
|
|
204
204
|
- features/step_definitions/conditional_steps.rb
|
205
205
|
- features/step_definitions/cookies_steps.rb
|
206
206
|
- features/step_definitions/desambiguation_steps.rb
|
207
|
+
- features/step_definitions/devtools_steps.rb
|
207
208
|
- features/step_definitions/flights_tracker/flights_tracker_steps.rb
|
208
209
|
- features/step_definitions/landing/itineraries_steps.rb
|
209
210
|
- features/step_definitions/landing/landing_steps.rb
|
@@ -250,6 +251,7 @@ files:
|
|
250
251
|
- features/support/modules/checkout/pasajeros.rb
|
251
252
|
- features/support/modules/checkout/popup.rb
|
252
253
|
- features/support/modules/checkout/tarjeta.rb
|
254
|
+
- features/support/modules/devtools.rb
|
253
255
|
- features/support/modules/element.rb
|
254
256
|
- features/support/modules/helpers.rb
|
255
257
|
- features/support/modules/pages/cookies.rb
|