flights_gui_tests 0.0.14 → 0.0.15
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/checkout_steps.rb +2 -13
- data/features/step_definitions/checkout/fast_checkout_steps.rb +2 -21
- data/features/step_definitions/checkout/load_steps.rb +1 -1
- data/features/step_definitions/results/wish_list_steps.rb +1 -0
- data/features/support/env.rb +1 -0
- data/features/support/modules/checkout/datos_de_facturacion.rb +1 -1
- data/features/support/modules/checkout/fast_checkout.rb +1 -0
- data/features/support/modules/checkout/popup.rb +21 -0
- data/features/support/modules/checkout/tarjeta.rb +23 -0
- data/features/support/pages/all_pages.rb +1 -1
- data/features/support/pages/checkout/checkout_page.rb +16 -13
- data/features/tests/checkout/agency.feature +1 -0
- data/flights_gui_tests.gemspec +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d8a7f7959f20db3d50b3b8d2b8bcf2e7092cf84
|
4
|
+
data.tar.gz: d876e79e4ec518b2ccedf249c73b6612d4a74dcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb28ea334c93bfd7522310d99f2761c3abc408511d0cc45fc927a6e2f03cff3102f849ebb4c73e3a102df808e123f906458cd83df9e3a5e16f03d61c38f2e3e8
|
7
|
+
data.tar.gz: 070fb27a757a3aa8a5391ba5720a3addc0818776d7ce53fd61d4f0e6b78258d42908959700855d73d39c1330386fd87adb1e9ad6771feb2b83b8ce031ed2ed35
|
@@ -6,7 +6,7 @@ Cuando(/^aparece el popup de no disponibilidad$/) do
|
|
6
6
|
begin
|
7
7
|
@popup_no_disponibilidad_page.itinerario_element.when_visible(timeout=60)
|
8
8
|
rescue Watir::Wait::TimeoutError
|
9
|
-
|
9
|
+
pending("No se pudo realizar la compra. #{@page.url}")
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -69,18 +69,7 @@ Entonces(/^verifico los datos de agencia afiliada$/) do
|
|
69
69
|
end
|
70
70
|
|
71
71
|
Entonces(/^completo los datos para reservas CAC$/) do
|
72
|
-
@page.
|
73
|
-
@page.opcion_cac_element.set
|
74
|
-
if @page.documento_offline_element.present?
|
75
|
-
number = case AllPages.site
|
76
|
-
when "CL" then "7028168-6"
|
77
|
-
when "BR" then "22233366638"
|
78
|
-
else "32456734"
|
79
|
-
end
|
80
|
-
@page.documento_offline_element.set(number)
|
81
|
-
end
|
82
|
-
@page.sexo_offline_element.select_value("MALE") if @page.sexo_offline_element.present?
|
83
|
-
@page.nombre_completo_contacto_element.set("Diego Qa Romero") if @page.nombre_completo_contacto_element.present?
|
72
|
+
@page.cargar_datos_CAC
|
84
73
|
end
|
85
74
|
|
86
75
|
Entonces(/^el checkout me pide mas datos de tarjeta$/) do
|
@@ -3,8 +3,8 @@ Cuando(/^me logueo como usuario "(.*?)" y pass "(.*?)"$/) do |arg1, arg2|
|
|
3
3
|
@page.checkout_login_element.should visible("login de usuario")
|
4
4
|
if @page.log_out_checkout_element.present?
|
5
5
|
@page.log_out_checkout_element.click
|
6
|
+
step "espero que termine de cargar la pagina de checkout"
|
6
7
|
step "verifico que ingrese al checkout"
|
7
|
-
sleep(1)
|
8
8
|
end
|
9
9
|
@page.log_in_checkout_element.click
|
10
10
|
step "me logueo con usuario \"#{arg1}\" y pass \"#{arg2}\""
|
@@ -30,24 +30,5 @@ Entonces(/^verifico que se muestren las tarjetas guardadas$/) do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
Entonces(/^elijo una tarjeta ya guardada$/) do
|
33
|
-
@page.
|
34
|
-
if AllPages.site=="BR"
|
35
|
-
ul = @page.container_tarjetas_elements.to_a.select{|ul| ul.li(:class,'item owner-name').text.match(/BR/)}.first
|
36
|
-
pending("no se encontro usuario de tarjeta para brasil") unless ul
|
37
|
-
ul.radio(:class,'radio').click
|
38
|
-
ul.text_fields[0].set("123")
|
39
|
-
else
|
40
|
-
ul = @page.container_tarjetas_elements.to_a.select{|ul| ul.li(:class,'item owner-name').text.match(/Diego QA Romero/)}.first
|
41
|
-
ul.radio(:class,'radio').click
|
42
|
-
ul.text_fields[0].set("123")
|
43
|
-
end
|
44
|
-
if @page.datos_tarjeta_guardada_element.present?
|
45
|
-
@page.ciudad_entrega_tarjeta_element.set("Ciudad") if @page.ciudad_entrega_tarjeta_element.present?
|
46
|
-
@page.calle_entrega_tarjeta_element.set("Calle") if @page.calle_entrega_tarjeta_element.present?
|
47
|
-
@page.estado_entrega_tarjeta_element.select(@page.estado_entrega_tarjeta_options[3]) if @page.estado_entrega_tarjeta_element.present?
|
48
|
-
@page.cp_entrega_tarjeta_element.set "1182" if @page.cp_entrega_tarjeta_element.present?
|
49
|
-
@page.numero_entrega_tarjeta_element.set "1234" if @page.numero_entrega_tarjeta_element.present?
|
50
|
-
@page.piso_entrega_tarjeta_element.set "3" if @page.piso_entrega_tarjeta_element.present?
|
51
|
-
@page.depto_entrega_tarjeta_element.set "A" if @page.depto_entrega_tarjeta_element.present?
|
52
|
-
end
|
33
|
+
@page.cargar_datos_tarjeta_guardada
|
53
34
|
end
|
@@ -10,11 +10,11 @@ Cuando(/^ingreso a la pagina de checkout de agencia en "(.*?)" para una busqueda
|
|
10
10
|
puts " URL: #{@page.manage_data.generate_url_checkout + "?agency=AG14073"}"
|
11
11
|
@page.set_cookies
|
12
12
|
@page.elegir_idioma
|
13
|
-
@page.pasajeros_element.when_visible(timeout=120)
|
14
13
|
end
|
15
14
|
|
16
15
|
Cuando(/^espero que termine de cargar la pagina de checkout$/) do
|
17
16
|
@page = Checkout::CheckoutPage.new($browser)
|
17
|
+
@page.popup_transicion_inicial_element.when_not_visible(timeout=120)
|
18
18
|
@page.pasajeros_element.when_visible(timeout=120)
|
19
19
|
end
|
20
20
|
|
@@ -37,6 +37,7 @@ Entonces(/^verifico links y textos del popup de registro$/) do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
Cuando(/^me logueo con usuario "(.*?)" y pass "(.*?)"$/) do |arg1, arg2|
|
40
|
+
@page.login_usuario_nibbler_element.when_visible
|
40
41
|
@page.mail_usuario_nibbler_element.set(arg1)
|
41
42
|
@page.pass_usuario_nibbler_element.set(arg2)
|
42
43
|
@page.boton_usuario_nibbler_element.click
|
data/features/support/env.rb
CHANGED
@@ -48,6 +48,7 @@ require_relative 'modules/results/itineraries/data'
|
|
48
48
|
|
49
49
|
require_relative 'modules/checkout/pasajeros'
|
50
50
|
require_relative 'modules/checkout/tarjeta'
|
51
|
+
require_relative 'modules/checkout/popup'
|
51
52
|
require_relative 'modules/checkout/errores'
|
52
53
|
require_relative 'modules/checkout/fast_checkout'
|
53
54
|
require_relative 'modules/checkout/datos_de_facturacion'
|
@@ -33,7 +33,7 @@ module Checkout
|
|
33
33
|
cuil_element.set("30643063936")
|
34
34
|
nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
|
35
35
|
provincia_facturacion_element.select_value("C")
|
36
|
-
set_autocomplete("ciudad_facturacion_custom","buenos
|
36
|
+
set_autocomplete("ciudad_facturacion_custom","buenos ")
|
37
37
|
calle_facturacion_element.set("corrientes")
|
38
38
|
codigo_postal_facturacion_element.set("7111")
|
39
39
|
numero_facturacion_element.set("123")
|
@@ -9,6 +9,7 @@ module Checkout
|
|
9
9
|
div(:tarjetas_guardadas,:id=>"stored-cards")
|
10
10
|
div(:nueva_tarjeta,:class=>"new-card-container")
|
11
11
|
div(:datos_tarjeta_guardada,:id=>"paymentDefinition.billingAddressDefinition")
|
12
|
+
div(:login_usuario_nibbler,:id=>"nibbler-selfservice-login-overlay")
|
12
13
|
|
13
14
|
link(:log_out_checkout,:css=>"#checkout-login .log-out")
|
14
15
|
link(:log_in_checkout,:css=>"#checkout-login .log-in")
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
module Checkout
|
3
|
+
module PopUp
|
4
|
+
include PageObject
|
5
|
+
|
6
|
+
div(:popup_transicion_inicial,:id=>"popup-initial-transition")
|
7
|
+
div(:popup_transicion_compra,:id=>"popup-checkout-transition-template")
|
8
|
+
div(:popup_nuevo_precio,:id=>"popup-price-difference-template")
|
9
|
+
div(:popup_nuevo_vuelo,:id=>"popup-new-flight")
|
10
|
+
div(:popup_confirmacion_pago,:id=>"confirm-payment-popup")
|
11
|
+
div(:popup_chat,:id=>"dtalk-container")
|
12
|
+
div(:popup_cobertura,:id=>"popup-upselling-coverage-template")
|
13
|
+
div(:popup_compra_duplicada,:id=>"popup-duplicated-transaction")
|
14
|
+
div(:opcion_no_compra_duplicada,:css=>"#popup-duplicated-transaction .button-no")
|
15
|
+
div(:opcion_si_compra_duplicada,:css=>"#popup-duplicated-transaction .button-yes")
|
16
|
+
div(:popup_price_jump,:id=>"popup-price-difference")
|
17
|
+
div(:opcion_si_price_jump,:css=>"#popup-price-difference .button-yes")
|
18
|
+
span(:cerrar_popup_chat,:css=>"#dtalk-container .close-round-section")
|
19
|
+
span(:cerrar_popup_cobertura,:css=>".popup-upselling-coverage .popup-close-button")
|
20
|
+
end
|
21
|
+
end
|
@@ -88,6 +88,29 @@ module Checkout
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
+
def cargar_datos_tarjeta_guardada
|
92
|
+
@browser.execute_script("javascript:void($('#stored-cards .display-cards').click())") if mostrar_cartas_guardadas_element.text.no_accents.downcase.match("mas|mais|more")
|
93
|
+
if AllPages.site=="BR"
|
94
|
+
ul = container_tarjetas_elements.to_a.select{|ul| ul.li(:class,'item owner-name').text.match(/BR/)}.first
|
95
|
+
pending("no se encontro usuario de tarjeta para brasil") unless ul
|
96
|
+
ul.radio(:class,'radio').click
|
97
|
+
ul.text_fields[0].set("123")
|
98
|
+
else
|
99
|
+
ul = container_tarjetas_elements.to_a.select{|ul| ul.li(:class,'item owner-name').text.match(/Diego QA Romero/)}.first
|
100
|
+
ul.radio(:class,'radio').click
|
101
|
+
ul.text_fields[0].set("123")
|
102
|
+
end
|
103
|
+
if datos_tarjeta_guardada_element.present?
|
104
|
+
ciudad_entrega_tarjeta_element.set("Ciudad") if ciudad_entrega_tarjeta_element.present?
|
105
|
+
calle_entrega_tarjeta_element.set("Calle") if calle_entrega_tarjeta_element.present?
|
106
|
+
estado_entrega_tarjeta_element.select(estado_entrega_tarjeta_options[3]) if estado_entrega_tarjeta_element.present?
|
107
|
+
cp_entrega_tarjeta_element.set "1182" if cp_entrega_tarjeta_element.present?
|
108
|
+
numero_entrega_tarjeta_element.set "1234" if numero_entrega_tarjeta_element.present?
|
109
|
+
piso_entrega_tarjeta_element.set "3" if piso_entrega_tarjeta_element.present?
|
110
|
+
depto_entrega_tarjeta_element.set "A" if depto_entrega_tarjeta_element.present?
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
91
114
|
def verificar_tipos_de_pago
|
92
115
|
interes = nil
|
93
116
|
doc=Hpricot.parse(precio_final_element.html)
|
@@ -5,6 +5,7 @@ module Checkout
|
|
5
5
|
include Pages::Tags
|
6
6
|
include Pages::Cookies
|
7
7
|
include Checkout::Pasajeros
|
8
|
+
include Checkout::PopUp
|
8
9
|
include Checkout::Tarjeta
|
9
10
|
include Checkout::Errores
|
10
11
|
include Checkout::FastCheckout
|
@@ -23,10 +24,6 @@ module Checkout
|
|
23
24
|
divs(:secciones_preguntas_riesgo,:class=>"item section radio-group group")
|
24
25
|
|
25
26
|
div(:seccion_preguntas_riesgo,:css=>"#form .radio-group")
|
26
|
-
div(:popup_transicion_compra,:id=>"popup-checkout-transition-template")
|
27
|
-
div(:popup_nuevo_precio,:id=>"popup-price-difference-template")
|
28
|
-
div(:popup_nuevo_vuelo,:id=>"popup-new-flight")
|
29
|
-
div(:popup_confirmacion_pago,:id=>"confirm-payment-popup")
|
30
27
|
div(:opcion_no_deposito,:css=>"#confirm-payment-popup .flights-button-no")
|
31
28
|
div(:opcion_si_deposito,:css=>"#confirm-payment-popup .flights-button-yes")
|
32
29
|
div(:notificacion_error,:class=>"notification-box error-box")
|
@@ -37,16 +34,9 @@ module Checkout
|
|
37
34
|
div(:cobertura,:id=>'upselling')
|
38
35
|
div(:cobertura_deshabilitada,:class=>"upselling upselling-disabled")
|
39
36
|
div(:itinerario,:id=>"detail")
|
40
|
-
div(:popup_chat,:id=>"dtalk-container")
|
41
37
|
div(:cupon_error,:id=>"coupon-error")
|
42
38
|
div(:cupon_exito,:id=>"voucher-success")
|
43
|
-
div(:popup_cobertura,:id=>"popup-upselling-coverage-template")
|
44
|
-
div(:popup_compra_duplicada,:id=>"popup-duplicated-transaction")
|
45
|
-
div(:opcion_no_compra_duplicada,:css=>"#popup-duplicated-transaction .button-no")
|
46
|
-
div(:opcion_si_compra_duplicada,:css=>"#popup-duplicated-transaction .button-yes")
|
47
39
|
div(:clientes_felices,:id=>"happy-clients")
|
48
|
-
div(:popup_price_jump,:id=>"popup-price-difference")
|
49
|
-
div(:opcion_si_price_jump,:css=>"#popup-price-difference .button-yes")
|
50
40
|
div(:link_price_jump,:css=>"#popup-price-difference .popup-link")
|
51
41
|
|
52
42
|
checkbox(:opcion_seguros,:id=>"upselling-checkbox")
|
@@ -56,8 +46,6 @@ module Checkout
|
|
56
46
|
span(:elegir_otro_vuelo,:class=>"choose-another")
|
57
47
|
span(:error_datos,:class=>"error-message")
|
58
48
|
span(:carga,:css=>".loading .img")
|
59
|
-
span(:cerrar_popup_chat,:css=>"#dtalk-container .close-round-section")
|
60
|
-
span(:cerrar_popup_cobertura,:css=>".popup-upselling-coverage .popup-close-button")
|
61
49
|
span(:protegido,:css=>".protected")
|
62
50
|
span(:desprotegido,:css=>".unprotected")
|
63
51
|
span(:precio_seguro,:css=>"#upselling .description .bold")
|
@@ -81,6 +69,21 @@ module Checkout
|
|
81
69
|
self.cargar_bebes
|
82
70
|
end
|
83
71
|
|
72
|
+
def cargar_datos_CAC
|
73
|
+
@browser.execute_script("javascript:void(function(){ShowButtonCAC();})();")
|
74
|
+
opcion_cac_element.set
|
75
|
+
if documento_offline_element.present?
|
76
|
+
number = case @@site
|
77
|
+
when "CL" then "7028168-6"
|
78
|
+
when "BR" then "22233366638"
|
79
|
+
else "32456734"
|
80
|
+
end
|
81
|
+
documento_offline_element.set(number)
|
82
|
+
end
|
83
|
+
sexo_offline_element.select_value("MALE") if sexo_offline_element.present?
|
84
|
+
nombre_completo_contacto_element.set("Diego Qa Romero") if nombre_completo_contacto_element.present?
|
85
|
+
end
|
86
|
+
|
84
87
|
def aceptar_y_comprar
|
85
88
|
unless condiciones_de_compra_checked?
|
86
89
|
@browser.execute_script("javascript:void($('#read-agreement').click());")
|
@@ -6,6 +6,7 @@ Característica: checkout.agency
|
|
6
6
|
@agency
|
7
7
|
Esquema del escenario: Se ingresa a la pagina de checkout para una agencia afiliada.
|
8
8
|
Cuando ingreso a la pagina de checkout de agencia en "<pais>" para una busqueda "<tipo>" del tipo "<cabotage>"
|
9
|
+
Cuando espero que termine de cargar la pagina de checkout
|
9
10
|
Entonces verifico que ingrese al checkout
|
10
11
|
Y verifico que la pagina no rompa
|
11
12
|
Y si existe la opcion de cobertura, elijo "no_chequear" si quiero cobertura
|
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.15' #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,7 +1,7 @@
|
|
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lgonzalez,lsimean
|
@@ -246,6 +246,7 @@ files:
|
|
246
246
|
- features/support/modules/checkout/fast_checkout.rb
|
247
247
|
- features/support/modules/checkout/informacion_de_contacto.rb
|
248
248
|
- features/support/modules/checkout/pasajeros.rb
|
249
|
+
- features/support/modules/checkout/popup.rb
|
249
250
|
- features/support/modules/checkout/tarjeta.rb
|
250
251
|
- features/support/modules/element.rb
|
251
252
|
- features/support/modules/helpers.rb
|