flights_gui_tests 2.4.13 → 2.4.14
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 +5 -0
- data/features/step_definitions/checkout/upselling_steps.rb +3 -2
- data/features/support/env.rb +0 -1
- data/features/support/modules/checkout/checkout.rb +0 -8
- data/features/support/modules/pages/cookies.rb +18 -10
- data/features/support/pages/checkout/checkout_page.rb +11 -0
- data/features/support/version.rb +1 -1
- data/features/tests/checkout/seguros.feature +124 -1
- data/henry-context.yml +39 -39
- metadata +2 -11
- data/features/support/modules/checkout/old_checkout/datos_de_facturacion.rb +0 -78
- data/features/support/modules/checkout/old_checkout/errores.rb +0 -35
- data/features/support/modules/checkout/old_checkout/fast_checkout.rb +0 -32
- data/features/support/modules/checkout/old_checkout/informacion_de_contacto.rb +0 -30
- data/features/support/modules/checkout/old_checkout/pasajeros.rb +0 -72
- data/features/support/modules/checkout/old_checkout/popup.rb +0 -32
- data/features/support/modules/checkout/old_checkout/reviews.rb +0 -16
- data/features/support/modules/checkout/old_checkout/tarjeta.rb +0 -281
- data/features/support/pages/checkout/checkout_page/old_checkout_page.rb +0 -62
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1c24c65ad29d3c2646ee59336e608747fb2a666
|
4
|
+
data.tar.gz: 5fec3bd5f7522aef2c1762f55ca4a3cff531245b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca825a887bb19e25d1f659876c511c9a118c9194eb8da4ea25fbab70993f5acd52538fe3b64e3a83de4c43431aadecd838483392b68e42624784f627b48ad495
|
7
|
+
data.tar.gz: bbc9d91758a182a06b9329f02a0ba693a44d8892954c5db22916f2331be6baa36fda862fcbb10cdeee3554fd8f370643ac0fedcda8f8b63d449b45043269fe44
|
@@ -17,7 +17,7 @@ end
|
|
17
17
|
|
18
18
|
Entonces(/^(?:verifico|valido) que se muestre correctamente la caja de seguro sin chequear$/) do
|
19
19
|
@page.desprotegido_element.should visible("texto de no estoy protegido en la caja de seguro")
|
20
|
-
@page.desprotegido_element.text.should match("Agregue su asistencia y viaje protegido")
|
20
|
+
@page.desprotegido_element.text.no_accents.should match("Agregue su asistencia y viaje protegido|Contrate sua assistencia e viaje protegido")
|
21
21
|
end
|
22
22
|
|
23
23
|
Entonces(/^(?:verifico|valido) que el precio del seguro no se muestre en el desglose$/) do
|
@@ -25,9 +25,10 @@ Entonces(/^(?:verifico|valido) que el precio del seguro no se muestre en el desg
|
|
25
25
|
end
|
26
26
|
|
27
27
|
Entonces(/^(?:verifico|valido) que se muestre correctamente la caja de seguro chequeada$/) do
|
28
|
+
@page.protegido_element.when_visible(timeout=5)
|
28
29
|
@page.cobertura_element.should visible("link de cobertura en la caja de seguro")
|
29
30
|
@page.protegido_element.should visible("texto de estoy protegido en la caja de seguro")
|
30
|
-
@page.protegido_element.text.should match("¡Listo! Viaja protegido")
|
31
|
+
@page.protegido_element.text.no_accents.should match("¡Listo! Viaja protegido|Pronto! Voce viajara seguro")
|
31
32
|
end
|
32
33
|
|
33
34
|
Entonces(/^(?:verifico|valido) que el precio del seguro se muestre correctamente en el desglose$/) do
|
data/features/support/env.rb
CHANGED
@@ -60,7 +60,6 @@ require_relative 'pages/results/desambiguation_airports_page'
|
|
60
60
|
require_relative 'pages/results/desambiguation_city_page'
|
61
61
|
require_relative 'pages/results/search_page'
|
62
62
|
require_relative 'pages/checkout/checkout_page'
|
63
|
-
require_relative 'pages/checkout/checkout_page/old_checkout_page'
|
64
63
|
require_relative 'pages/checkout/checkout_page/new_checkout_page'
|
65
64
|
require_relative 'pages/checkout/popup_results_page'
|
66
65
|
require_relative 'pages/thanks/thanks_page'
|
@@ -1,12 +1,4 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
require_relative 'old_checkout/pasajeros'
|
3
|
-
require_relative 'old_checkout/tarjeta'
|
4
|
-
require_relative 'old_checkout/reviews'
|
5
|
-
require_relative 'old_checkout/popup'
|
6
|
-
require_relative 'old_checkout/errores'
|
7
|
-
require_relative 'old_checkout/fast_checkout'
|
8
|
-
require_relative 'old_checkout/datos_de_facturacion'
|
9
|
-
require_relative 'old_checkout/informacion_de_contacto'
|
10
2
|
require_relative 'new_checkout/pasajeros'
|
11
3
|
require_relative 'new_checkout/tarjeta'
|
12
4
|
require_relative 'new_checkout/reviews'
|
@@ -3,15 +3,23 @@ module Pages
|
|
3
3
|
module Cookies
|
4
4
|
#modifico el valor del abtesting requerido
|
5
5
|
def modificar_abtesting(nombre,valor)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
unless recuperar_valor_abtesting(nombre)
|
7
|
+
cookie = self.recuperar_cookie("abzTestingId",1)
|
8
|
+
nuevo_valor = cookie[:value].gsub(/#{self.recuperar_valor_abtesting(nombre,1)}/,valor.to_s)
|
9
|
+
self.eliminar_cookie("abzTestingId")
|
10
|
+
self.agregar_cookie("abzTestingId",nuevo_valor,{:expires => cookie[:expires],:domain=>cookie[:domain]})
|
11
|
+
self.recuperar_cookie("abzTestingId")
|
12
|
+
else
|
13
|
+
cookie = self.recuperar_cookie("abzTestingId")
|
14
|
+
nuevo_valor = cookie[:value].gsub(/#{self.recuperar_valor_abtesting(nombre)}/,valor.to_s)
|
15
|
+
self.eliminar_cookie("abzTestingId")
|
16
|
+
self.agregar_cookie("abzTestingId",nuevo_valor,{:expires => cookie[:expires],:domain=>cookie[:domain]})
|
17
|
+
self.recuperar_cookie("abzTestingId")
|
18
|
+
end
|
11
19
|
end
|
12
20
|
#recupero una cookie
|
13
|
-
def recuperar_cookie(nombre)
|
14
|
-
return @browser.cookies.to_a.select{|cookie| cookie[:name]==nombre}
|
21
|
+
def recuperar_cookie(nombre,index=0)
|
22
|
+
return @browser.cookies.to_a.select{|cookie| cookie[:name]==nombre}[index]
|
15
23
|
end
|
16
24
|
#elimino una cookie
|
17
25
|
def eliminar_cookie(nombre)
|
@@ -22,11 +30,11 @@ module Pages
|
|
22
30
|
@browser.cookies.add(nombre,valor,opciones)
|
23
31
|
end
|
24
32
|
#recupero el valor de un abtesting
|
25
|
-
def recuperar_valor_abtesting(nombre)
|
33
|
+
def recuperar_valor_abtesting(nombre,index=0)
|
26
34
|
begin
|
27
|
-
return self.recuperar_cookie("abzTestingId")[:value].split(',').select{|option| option.match(/#{nombre}/)}.first.gsub(/\D/,'').to_i
|
35
|
+
return self.recuperar_cookie("abzTestingId",index)[:value].split(',').select{|option| option.match(/#{nombre}/)}.first.gsub(/\D/,'').to_i
|
28
36
|
rescue NoMethodError
|
29
|
-
return
|
37
|
+
return nil
|
30
38
|
end
|
31
39
|
end
|
32
40
|
def cargar_valores_abtesting
|
@@ -86,6 +86,17 @@ module Checkout
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
def aceptar_y_comprar_con_seguro_incluido
|
90
|
+
unless condiciones_de_compra_checked?
|
91
|
+
@browser.execute_script("javascript:void($('#read-agreement').click());")
|
92
|
+
end
|
93
|
+
begin
|
94
|
+
@browser.execute_script("javascript:void($('#submitWithInsurance').click());")
|
95
|
+
rescue Net::ReadTimeout
|
96
|
+
@browser.send_keys :escape
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
89
100
|
def last_minute?
|
90
101
|
return (manage_data.date_from_1 - Date.today).to_i < 2
|
91
102
|
end
|
data/features/support/version.rb
CHANGED
@@ -15,6 +15,7 @@ Característica: checkout.seguros
|
|
15
15
|
Entonces verifico que la pagina no rompa
|
16
16
|
Y espero que termine de cargar la pagina de checkout
|
17
17
|
Y verifico que ingrese al checkout
|
18
|
+
Entonces ingreso al checkout con cookie "showTwoButtonsInsurance" al "20"
|
18
19
|
Cuando existe la opcion de cobertura
|
19
20
|
Entonces elijo "no_chequear" si quiero cobertura
|
20
21
|
Entonces verifico que se muestre correctamente la caja de seguro sin chequear
|
@@ -46,4 +47,126 @@ Característica: checkout.seguros
|
|
46
47
|
@ar
|
47
48
|
Ejemplos:
|
48
49
|
|pais|prov|tipo|seguro|origen|destino|cabotage|
|
49
|
-
|AR|GDS|roundtrip|chequear|BUE|MIA|nil|
|
50
|
+
|AR|GDS|roundtrip|chequear|BUE|MIA|nil|
|
51
|
+
|
52
|
+
@seguros
|
53
|
+
Esquema del escenario: Se realiza un book con seguro incluido.
|
54
|
+
Dado como un usuario de '<pais>'
|
55
|
+
* ingreso una busqueda '<tipo>' de '<origen>' a '<destino>' de tipo '<cabotage>'
|
56
|
+
Cuando realizo la busqueda
|
57
|
+
Entonces verifico que la pagina no rompa
|
58
|
+
Cuando espero que termine de cargar la pagina de resultados
|
59
|
+
Entonces verifico que traiga resultados
|
60
|
+
Cuando elijo un itinerario y paso a checkout
|
61
|
+
Entonces verifico que la pagina no rompa
|
62
|
+
Y espero que termine de cargar la pagina de checkout
|
63
|
+
Y verifico que ingrese al checkout
|
64
|
+
Entonces ingreso al checkout con cookie "showTwoButtonsInsurance" al "61"
|
65
|
+
Cuando existe la opcion de cobertura
|
66
|
+
Entonces verifico que se muestre correctamente la caja de seguro sin chequear
|
67
|
+
Y verifico que el precio del seguro no se muestre en el desglose
|
68
|
+
Cuando muestro el popup de la cobertura completa
|
69
|
+
Entonces verifico que se muestre correctamente el popup de la cobertura completa para destino "<destino>"
|
70
|
+
Y elijo "<seguro>" si quiero cobertura
|
71
|
+
Entonces cargo los pasajeros
|
72
|
+
Y cargo los datos de la tarjeta
|
73
|
+
Y si el site es "AR|MX|PE|BR", cargo los datos de facturacion
|
74
|
+
Y cargo los datos de contacto
|
75
|
+
Cuando acepto y compro con seguro incluido
|
76
|
+
Entonces espero que termine el pedido de compra
|
77
|
+
Y verifico si no trae errores
|
78
|
+
Entonces si aparece el popup de no disponibilidad, elijo un itinerario del popup de no disponibilidad
|
79
|
+
Entonces espero que termine de cargar la pagina de gracias
|
80
|
+
Y verifico que ingrese a la pagina de gracias
|
81
|
+
Y verifico el popup de asistencia al viajero
|
82
|
+
Y verifico el tag de datalayer
|
83
|
+
#Y cancelo la reserva en el proveedor
|
84
|
+
|
85
|
+
@mx
|
86
|
+
Ejemplos:
|
87
|
+
|pais|prov|tipo|seguro|origen|destino|cabotage|
|
88
|
+
|MX|GDS|roundtrip|chequear|MEX|MIA|nil|
|
89
|
+
@ar
|
90
|
+
Ejemplos:
|
91
|
+
|pais|prov|tipo|seguro|origen|destino|cabotage|
|
92
|
+
|AR|GDS|roundtrip|chequear|BUE|MIA|nil|
|
93
|
+
|
94
|
+
@seguros
|
95
|
+
Esquema del escenario: Se realiza un book con seguro incluido.
|
96
|
+
Dado como un usuario de '<pais>'
|
97
|
+
* ingreso una busqueda '<tipo>' de '<origen>' a '<destino>' de tipo '<cabotage>'
|
98
|
+
Cuando realizo la busqueda
|
99
|
+
Entonces verifico que la pagina no rompa
|
100
|
+
Cuando espero que termine de cargar la pagina de resultados
|
101
|
+
Entonces verifico que traiga resultados
|
102
|
+
Cuando elijo un itinerario y paso a checkout
|
103
|
+
Entonces verifico que la pagina no rompa
|
104
|
+
Y espero que termine de cargar la pagina de checkout
|
105
|
+
Y verifico que ingrese al checkout
|
106
|
+
Entonces ingreso al checkout con cookie "showTwoButtonsInsurance" al "20"
|
107
|
+
Cuando existe la opcion de cobertura
|
108
|
+
Entonces elijo "no_chequear" si quiero cobertura
|
109
|
+
Entonces verifico que se muestre correctamente la caja de seguro sin chequear
|
110
|
+
Y verifico que el precio del seguro no se muestre en el desglose
|
111
|
+
Cuando elijo "chequear" si quiero cobertura
|
112
|
+
Entonces verifico que se muestre correctamente la caja de seguro chequeada
|
113
|
+
Y verifico que el precio del seguro se muestre correctamente en el desglose
|
114
|
+
Cuando muestro el popup de la cobertura completa
|
115
|
+
Entonces verifico que se muestre correctamente el popup de la cobertura completa para destino "<destino>"
|
116
|
+
Y elijo "<seguro>" si quiero cobertura
|
117
|
+
Entonces cargo los pasajeros
|
118
|
+
Y cargo los datos de la tarjeta en el nuevo formulario
|
119
|
+
Y si el site es "AR|MX|PE|BR", cargo los datos de facturacion
|
120
|
+
Y cargo los datos de contacto
|
121
|
+
Cuando acepto y compro
|
122
|
+
Entonces espero que termine el pedido de compra
|
123
|
+
Y verifico si no trae errores
|
124
|
+
Entonces si aparece el popup de no disponibilidad, elijo un itinerario del popup de no disponibilidad
|
125
|
+
Entonces espero que termine de cargar la pagina de gracias
|
126
|
+
Y verifico que ingrese a la pagina de gracias
|
127
|
+
Y verifico el popup de asistencia al viajero
|
128
|
+
Y verifico el tag de datalayer
|
129
|
+
Y cancelo la reserva en el proveedor
|
130
|
+
|
131
|
+
@br
|
132
|
+
Ejemplos:
|
133
|
+
|pais|prov|tipo|seguro|origen|destino|cabotage|
|
134
|
+
|BR|GDS|roundtrip|chequear|SAO|MIA|nil|
|
135
|
+
|
136
|
+
@seguros
|
137
|
+
Esquema del escenario: Se realiza un book con seguro incluido.
|
138
|
+
Dado como un usuario de '<pais>'
|
139
|
+
* ingreso una busqueda '<tipo>' de '<origen>' a '<destino>' de tipo '<cabotage>'
|
140
|
+
Cuando realizo la busqueda
|
141
|
+
Entonces verifico que la pagina no rompa
|
142
|
+
Cuando espero que termine de cargar la pagina de resultados
|
143
|
+
Entonces verifico que traiga resultados
|
144
|
+
Cuando elijo un itinerario y paso a checkout
|
145
|
+
Entonces verifico que la pagina no rompa
|
146
|
+
Y espero que termine de cargar la pagina de checkout
|
147
|
+
Y verifico que ingrese al checkout
|
148
|
+
Entonces ingreso al checkout con cookie "showTwoButtonsInsurance" al "61"
|
149
|
+
Cuando existe la opcion de cobertura
|
150
|
+
Entonces verifico que se muestre correctamente la caja de seguro sin chequear
|
151
|
+
Y verifico que el precio del seguro no se muestre en el desglose
|
152
|
+
Cuando muestro el popup de la cobertura completa
|
153
|
+
Entonces verifico que se muestre correctamente el popup de la cobertura completa para destino "<destino>"
|
154
|
+
Y elijo "<seguro>" si quiero cobertura
|
155
|
+
Entonces cargo los pasajeros
|
156
|
+
Y cargo los datos de la tarjeta en el nuevo formulario
|
157
|
+
Y si el site es "AR|MX|PE|BR", cargo los datos de facturacion
|
158
|
+
Y cargo los datos de contacto
|
159
|
+
Cuando acepto y compro con seguro incluido
|
160
|
+
Entonces espero que termine el pedido de compra
|
161
|
+
Y verifico si no trae errores
|
162
|
+
Entonces si aparece el popup de no disponibilidad, elijo un itinerario del popup de no disponibilidad
|
163
|
+
Entonces espero que termine de cargar la pagina de gracias
|
164
|
+
Y verifico que ingrese a la pagina de gracias
|
165
|
+
Y verifico el popup de asistencia al viajero
|
166
|
+
Y verifico el tag de datalayer
|
167
|
+
#Y cancelo la reserva en el proveedor
|
168
|
+
|
169
|
+
@br
|
170
|
+
Ejemplos:
|
171
|
+
|pais|prov|tipo|seguro|origen|destino|cabotage|
|
172
|
+
|BR|GDS|roundtrip|chequear|SAO|MIA|nil|
|
data/henry-context.yml
CHANGED
@@ -3604,13 +3604,13 @@ tasks:
|
|
3604
3604
|
recipients:
|
3605
3605
|
- estebanldh@gmail.com
|
3606
3606
|
- nsimean@despegar.com
|
3607
|
-
- name: results.itineraries.
|
3607
|
+
- name: results.itineraries.co
|
3608
3608
|
class_name: Henry::Task::CucumberTask
|
3609
3609
|
options:
|
3610
3610
|
tags:
|
3611
3611
|
- results
|
3612
3612
|
- itineraries
|
3613
|
-
-
|
3613
|
+
- co
|
3614
3614
|
expand: true
|
3615
3615
|
no-source: true
|
3616
3616
|
reports:
|
@@ -3619,13 +3619,13 @@ tasks:
|
|
3619
3619
|
recipients:
|
3620
3620
|
- estebanldh@gmail.com
|
3621
3621
|
- nsimean@despegar.com
|
3622
|
-
- name: results.itineraries.
|
3622
|
+
- name: results.itineraries.mx
|
3623
3623
|
class_name: Henry::Task::CucumberTask
|
3624
3624
|
options:
|
3625
3625
|
tags:
|
3626
3626
|
- results
|
3627
3627
|
- itineraries
|
3628
|
-
-
|
3628
|
+
- mx
|
3629
3629
|
expand: true
|
3630
3630
|
no-source: true
|
3631
3631
|
reports:
|
@@ -3634,13 +3634,13 @@ tasks:
|
|
3634
3634
|
recipients:
|
3635
3635
|
- estebanldh@gmail.com
|
3636
3636
|
- nsimean@despegar.com
|
3637
|
-
- name: results.itineraries.
|
3637
|
+
- name: results.itineraries.cl
|
3638
3638
|
class_name: Henry::Task::CucumberTask
|
3639
3639
|
options:
|
3640
3640
|
tags:
|
3641
3641
|
- results
|
3642
3642
|
- itineraries
|
3643
|
-
-
|
3643
|
+
- cl
|
3644
3644
|
expand: true
|
3645
3645
|
no-source: true
|
3646
3646
|
reports:
|
@@ -3649,13 +3649,13 @@ tasks:
|
|
3649
3649
|
recipients:
|
3650
3650
|
- estebanldh@gmail.com
|
3651
3651
|
- nsimean@despegar.com
|
3652
|
-
- name: results.itineraries.
|
3652
|
+
- name: results.itineraries.cr
|
3653
3653
|
class_name: Henry::Task::CucumberTask
|
3654
3654
|
options:
|
3655
3655
|
tags:
|
3656
3656
|
- results
|
3657
3657
|
- itineraries
|
3658
|
-
-
|
3658
|
+
- cr
|
3659
3659
|
expand: true
|
3660
3660
|
no-source: true
|
3661
3661
|
reports:
|
@@ -3664,13 +3664,13 @@ tasks:
|
|
3664
3664
|
recipients:
|
3665
3665
|
- estebanldh@gmail.com
|
3666
3666
|
- nsimean@despegar.com
|
3667
|
-
- name: results.itineraries.
|
3667
|
+
- name: results.itineraries.ec
|
3668
3668
|
class_name: Henry::Task::CucumberTask
|
3669
3669
|
options:
|
3670
3670
|
tags:
|
3671
3671
|
- results
|
3672
3672
|
- itineraries
|
3673
|
-
-
|
3673
|
+
- ec
|
3674
3674
|
expand: true
|
3675
3675
|
no-source: true
|
3676
3676
|
reports:
|
@@ -3679,13 +3679,13 @@ tasks:
|
|
3679
3679
|
recipients:
|
3680
3680
|
- estebanldh@gmail.com
|
3681
3681
|
- nsimean@despegar.com
|
3682
|
-
- name: results.itineraries.
|
3682
|
+
- name: results.itineraries.pa
|
3683
3683
|
class_name: Henry::Task::CucumberTask
|
3684
3684
|
options:
|
3685
3685
|
tags:
|
3686
3686
|
- results
|
3687
3687
|
- itineraries
|
3688
|
-
-
|
3688
|
+
- pa
|
3689
3689
|
expand: true
|
3690
3690
|
no-source: true
|
3691
3691
|
reports:
|
@@ -3694,13 +3694,13 @@ tasks:
|
|
3694
3694
|
recipients:
|
3695
3695
|
- estebanldh@gmail.com
|
3696
3696
|
- nsimean@despegar.com
|
3697
|
-
- name: results.itineraries.
|
3697
|
+
- name: results.itineraries.pe
|
3698
3698
|
class_name: Henry::Task::CucumberTask
|
3699
3699
|
options:
|
3700
3700
|
tags:
|
3701
3701
|
- results
|
3702
3702
|
- itineraries
|
3703
|
-
-
|
3703
|
+
- pe
|
3704
3704
|
expand: true
|
3705
3705
|
no-source: true
|
3706
3706
|
reports:
|
@@ -3709,13 +3709,13 @@ tasks:
|
|
3709
3709
|
recipients:
|
3710
3710
|
- estebanldh@gmail.com
|
3711
3711
|
- nsimean@despegar.com
|
3712
|
-
- name: results.itineraries.
|
3712
|
+
- name: results.itineraries.us
|
3713
3713
|
class_name: Henry::Task::CucumberTask
|
3714
3714
|
options:
|
3715
3715
|
tags:
|
3716
3716
|
- results
|
3717
3717
|
- itineraries
|
3718
|
-
-
|
3718
|
+
- us
|
3719
3719
|
expand: true
|
3720
3720
|
no-source: true
|
3721
3721
|
reports:
|
@@ -3724,13 +3724,13 @@ tasks:
|
|
3724
3724
|
recipients:
|
3725
3725
|
- estebanldh@gmail.com
|
3726
3726
|
- nsimean@despegar.com
|
3727
|
-
- name: results.itineraries.
|
3727
|
+
- name: results.itineraries.uy
|
3728
3728
|
class_name: Henry::Task::CucumberTask
|
3729
3729
|
options:
|
3730
3730
|
tags:
|
3731
3731
|
- results
|
3732
3732
|
- itineraries
|
3733
|
-
-
|
3733
|
+
- uy
|
3734
3734
|
expand: true
|
3735
3735
|
no-source: true
|
3736
3736
|
reports:
|
@@ -3739,13 +3739,13 @@ tasks:
|
|
3739
3739
|
recipients:
|
3740
3740
|
- estebanldh@gmail.com
|
3741
3741
|
- nsimean@despegar.com
|
3742
|
-
- name: results.itineraries.
|
3742
|
+
- name: results.itineraries.pr
|
3743
3743
|
class_name: Henry::Task::CucumberTask
|
3744
3744
|
options:
|
3745
3745
|
tags:
|
3746
3746
|
- results
|
3747
3747
|
- itineraries
|
3748
|
-
-
|
3748
|
+
- pr
|
3749
3749
|
expand: true
|
3750
3750
|
no-source: true
|
3751
3751
|
reports:
|
@@ -3754,13 +3754,13 @@ tasks:
|
|
3754
3754
|
recipients:
|
3755
3755
|
- estebanldh@gmail.com
|
3756
3756
|
- nsimean@despegar.com
|
3757
|
-
- name: results.itineraries.
|
3757
|
+
- name: results.itineraries.br
|
3758
3758
|
class_name: Henry::Task::CucumberTask
|
3759
3759
|
options:
|
3760
3760
|
tags:
|
3761
3761
|
- results
|
3762
3762
|
- itineraries
|
3763
|
-
-
|
3763
|
+
- br
|
3764
3764
|
expand: true
|
3765
3765
|
no-source: true
|
3766
3766
|
reports:
|
@@ -3769,13 +3769,13 @@ tasks:
|
|
3769
3769
|
recipients:
|
3770
3770
|
- estebanldh@gmail.com
|
3771
3771
|
- nsimean@despegar.com
|
3772
|
-
- name: results.itineraries.
|
3772
|
+
- name: results.itineraries.ve
|
3773
3773
|
class_name: Henry::Task::CucumberTask
|
3774
3774
|
options:
|
3775
3775
|
tags:
|
3776
3776
|
- results
|
3777
3777
|
- itineraries
|
3778
|
-
-
|
3778
|
+
- ve
|
3779
3779
|
expand: true
|
3780
3780
|
no-source: true
|
3781
3781
|
reports:
|
@@ -13519,21 +13519,6 @@ tasks:
|
|
13519
13519
|
recipients:
|
13520
13520
|
- estebanldh@gmail.com
|
13521
13521
|
- nsimean@despegar.com
|
13522
|
-
- name: checkout.multipleoneway.co
|
13523
|
-
class_name: Henry::Task::CucumberTask
|
13524
|
-
options:
|
13525
|
-
tags:
|
13526
|
-
- checkout
|
13527
|
-
- multipleoneway
|
13528
|
-
- co
|
13529
|
-
expand: true
|
13530
|
-
no-source: true
|
13531
|
-
reports:
|
13532
|
-
- format: html
|
13533
|
-
name: ${DATE}_${TASK_NAME}.html
|
13534
|
-
recipients:
|
13535
|
-
- estebanldh@gmail.com
|
13536
|
-
- nsimean@despegar.com
|
13537
13522
|
- name: checkout.braspag
|
13538
13523
|
class_name: Henry::Task::CucumberTask
|
13539
13524
|
options:
|
@@ -16505,6 +16490,21 @@ tasks:
|
|
16505
16490
|
recipients:
|
16506
16491
|
- estebanldh@gmail.com
|
16507
16492
|
- nsimean@despegar.com
|
16493
|
+
- name: checkout.seguros.br
|
16494
|
+
class_name: Henry::Task::CucumberTask
|
16495
|
+
options:
|
16496
|
+
tags:
|
16497
|
+
- checkout
|
16498
|
+
- seguros
|
16499
|
+
- br
|
16500
|
+
expand: true
|
16501
|
+
no-source: true
|
16502
|
+
reports:
|
16503
|
+
- format: html
|
16504
|
+
name: ${DATE}_${TASK_NAME}.html
|
16505
|
+
recipients:
|
16506
|
+
- estebanldh@gmail.com
|
16507
|
+
- nsimean@despegar.com
|
16508
16508
|
- name: results
|
16509
16509
|
class_name: Henry::Task::CucumberTask
|
16510
16510
|
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: 2.4.
|
4
|
+
version: 2.4.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lgonzalez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|
@@ -340,14 +340,6 @@ files:
|
|
340
340
|
- features/support/modules/checkout/new_checkout/popup.rb
|
341
341
|
- features/support/modules/checkout/new_checkout/reviews.rb
|
342
342
|
- features/support/modules/checkout/new_checkout/tarjeta.rb
|
343
|
-
- features/support/modules/checkout/old_checkout/datos_de_facturacion.rb
|
344
|
-
- features/support/modules/checkout/old_checkout/errores.rb
|
345
|
-
- features/support/modules/checkout/old_checkout/fast_checkout.rb
|
346
|
-
- features/support/modules/checkout/old_checkout/informacion_de_contacto.rb
|
347
|
-
- features/support/modules/checkout/old_checkout/pasajeros.rb
|
348
|
-
- features/support/modules/checkout/old_checkout/popup.rb
|
349
|
-
- features/support/modules/checkout/old_checkout/reviews.rb
|
350
|
-
- features/support/modules/checkout/old_checkout/tarjeta.rb
|
351
343
|
- features/support/modules/devtools.rb
|
352
344
|
- features/support/modules/element.rb
|
353
345
|
- features/support/modules/helpers.rb
|
@@ -371,7 +363,6 @@ files:
|
|
371
363
|
- features/support/pages/all_pages.rb
|
372
364
|
- features/support/pages/checkout/checkout_page.rb
|
373
365
|
- features/support/pages/checkout/checkout_page/new_checkout_page.rb
|
374
|
-
- features/support/pages/checkout/checkout_page/old_checkout_page.rb
|
375
366
|
- features/support/pages/checkout/popup_results_page.rb
|
376
367
|
- features/support/pages/flights_tracker/search_page.rb
|
377
368
|
- features/support/pages/landing/new_landing_page.rb
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
module OldCheckout
|
3
|
-
module DatosDeFacturacion
|
4
|
-
include PageObject
|
5
|
-
|
6
|
-
select_list(:situacion_fiscal,:id=>"invoice-fiscal-status")
|
7
|
-
select_list(:provincia_facturacion,:id=>"invoice-state")
|
8
|
-
|
9
|
-
element(:formulario_facturacion,:fieldset,:id=>"invoice")
|
10
|
-
|
11
|
-
text_field(:cuil,:id=>"invoice-fiscal-id")
|
12
|
-
text_field(:domicilio_facturacion,:id=>"invoice-address")
|
13
|
-
text_field(:nombre_facturacion,:id=>"invoice-card-holder-name")
|
14
|
-
text_field(:ciudad_facturacion_custom,:id=>"invoice-city-custom")
|
15
|
-
text_field(:ciudad_facturacion,:id=>"invoice-city")
|
16
|
-
text_field(:calle_facturacion,:id=>"invoice-street")
|
17
|
-
text_field(:numero_facturacion,:id=>"invoice-address-number")
|
18
|
-
text_field(:piso_facturacion,:id=>"invoice-address-floor")
|
19
|
-
text_field(:departamento_facturacion,:id=>"invoice-address-deparment")
|
20
|
-
text_field(:codigo_postal_facturacion,:id=>"invoice-postal-code")
|
21
|
-
text_field(:otro_estado_facturacion,:id=>"invoice-other-state")
|
22
|
-
text_field(:mail_facturacion,:id=>"invoice-mail")
|
23
|
-
text_field(:barrio_facturacion,:id=>"invoice-neighbourhood")
|
24
|
-
text_field(:municipal_facturacion,:id=>"invoice-townRegistration")
|
25
|
-
|
26
|
-
checkbox(:invoice_check,:id=>"invoice-check")
|
27
|
-
|
28
|
-
link(:buscar_codigo_postal,:class=>"search-postal-code")
|
29
|
-
|
30
|
-
def cargar_datos_facturacion
|
31
|
-
if AllPages.site=="AR"
|
32
|
-
option = ["FINAL","INSCR","EXENT","MONOTRIBUTO"][rand(4)]
|
33
|
-
situacion_fiscal_element.select_value(option)
|
34
|
-
#lleno los campos requeridos
|
35
|
-
cuil_element.set("30643063936")
|
36
|
-
nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
|
37
|
-
provincia_facturacion_element.select_value("C")
|
38
|
-
set_autocomplete("ciudad_facturacion_custom","buenos ")
|
39
|
-
calle_facturacion_element.set("corrientes")
|
40
|
-
codigo_postal_facturacion_element.set("7111")
|
41
|
-
numero_facturacion_element.set("123")
|
42
|
-
piso_facturacion_element.set("1")
|
43
|
-
departamento_facturacion_element.set("1")
|
44
|
-
elsif AllPages.site=="BR"
|
45
|
-
# option = ["CPF","CNPJ"][rand(2)]
|
46
|
-
# situacion_fiscal_element.select_value(option)
|
47
|
-
# #lleno los campos requeridos
|
48
|
-
# option=="CPF" ? cuil_element.set("22233366638") : cuil_element.set("54651716001150")
|
49
|
-
# nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
|
50
|
-
# provincia_facturacion_element.select_value("AC")
|
51
|
-
# municipal_facturacion_element.set("municipal") if municipal_facturacion_element.present?
|
52
|
-
# set_autocomplete("ciudad_facturacion_custom","rio ")
|
53
|
-
# calle_facturacion_element.set("corrientes")
|
54
|
-
# barrio_facturacion_element.set("san jose")
|
55
|
-
# codigo_postal_facturacion_element.set("7111")
|
56
|
-
# numero_facturacion_element.set("123")
|
57
|
-
# piso_facturacion_element.set("1")
|
58
|
-
# departamento_facturacion_element.set("1")
|
59
|
-
else
|
60
|
-
check_invoice_check if invoice_check?
|
61
|
-
cuil_element.set("33344455561") if cuil_element.present?
|
62
|
-
nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
|
63
|
-
provincia_facturacion_element.select(provincia_facturacion_options[2]) if provincia_facturacion_element.present?
|
64
|
-
ciudad_facturacion_element.set("Rosario") if ciudad_facturacion_element.present?
|
65
|
-
ciudad_facturacion_custom_element.set("Rosario") if ciudad_facturacion_custom_element.present?
|
66
|
-
calle_facturacion_element.set("corrientes") if calle_facturacion_element.present?
|
67
|
-
if AllPages.site=="MX"
|
68
|
-
otro_estado_facturacion_element.set("Chiapas") if otro_estado_facturacion_element.present?
|
69
|
-
codigo_postal_facturacion_element.set("7111") if codigo_postal_facturacion_element.present?
|
70
|
-
numero_facturacion_element.set("123") if numero_facturacion_element.present?
|
71
|
-
piso_facturacion_element.set("1") if piso_facturacion_element.present?
|
72
|
-
departamento_facturacion_element.set("1") if departamento_facturacion_element.present?
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
end
|
78
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
module OldCheckout
|
3
|
-
module Errores
|
4
|
-
include PageObject
|
5
|
-
|
6
|
-
span(:error_nacionalidad_invalida,:id=>"nationality-0-invalid_custom_nationality")
|
7
|
-
span(:error_numero_tarjeta_vacio,:id=>"card-number-missing_field")
|
8
|
-
span(:error_fecha_tarjeta_vacio,:id=>"expiration-date-missing_field")
|
9
|
-
span(:error_codigo_seguridad_vacio,:id=>"security-code-missing_field")
|
10
|
-
span(:error_usuario_tarjeta_vacio,:id=>"owner-name-missing_field")
|
11
|
-
span(:error_mail_vacio,:id=>"contact-email-missing_field")
|
12
|
-
span(:error_repetir_mail_vacio,:id=>"contact-email-repeat-missing_field")
|
13
|
-
span(:error_telefono_vacio,:id=>"phone-0-missing_field")
|
14
|
-
span(:error_cuit_erroneo,:id=>"invoice-fiscal-id-invalid_cuit")
|
15
|
-
|
16
|
-
span(:error_razon_social_vacio,:id=>"invoice-card-holder-name-missing_field")
|
17
|
-
span(:error_mail_facturacion_vacio,:id=>"invoice-email-missing_field")
|
18
|
-
span(:error_ciudad_facturacion_vacio,:id=>"invoice-city-missing_field")
|
19
|
-
span(:error_codigo_postal_facturacion_vacio,:id=>"invoice-postal-code-missing_field")
|
20
|
-
span(:error_direccion_facturacion_vacio,:id=>"invoice-address-missing_field")
|
21
|
-
span(:error_cuit_vacio,:id=>"invoice-fiscal-id-missing_field")
|
22
|
-
|
23
|
-
span(:error_ruc_erroneo,:id=>"invoice-fiscal-id-invalid_ruc")
|
24
|
-
span(:error_mail_facturacion,:id=>"invoice-email-invalid_email")
|
25
|
-
span(:error_codigo_seguridad_invalido,:id=>"security-code-invalid_card_security_code")
|
26
|
-
span(:error_usuario_tarjeta_invalido,:id=>"owner-name-invalid_card_owner_name")
|
27
|
-
span(:error_mail_erroneo,:id=>"contact-email-invalid_email")
|
28
|
-
span(:error_repetir_mail_erroneo,:id=>"contact-email-repeat-invalid_email")
|
29
|
-
|
30
|
-
spans(:error_primer_nombre_vacio,:css=>".passenger-first-name-container .error-missing_field-message")
|
31
|
-
spans(:error_primer_nombre_erroneo,:css=>".passenger-first-name-container .error-invalid_name-message")
|
32
|
-
spans(:error_apellido_erroneo,:css=>".passenger-last-name-container .error-invalid_name-message")
|
33
|
-
|
34
|
-
end
|
35
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
module OldCheckout
|
3
|
-
|
4
|
-
module FastCheckout
|
5
|
-
|
6
|
-
include PageObject
|
7
|
-
|
8
|
-
div(:checkout_login,:id=>"checkout-login")
|
9
|
-
div(:tarjetas_guardadas,:id=>"stored-cards")
|
10
|
-
div(:nueva_tarjeta,:class=>"new-card-container")
|
11
|
-
div(:datos_tarjeta_guardada,:id=>"paymentDefinition.billingAddressDefinition")
|
12
|
-
div(:login_usuario_nibbler,:class=>"box-main-account")
|
13
|
-
|
14
|
-
link(:log_out_checkout,:css=>"#checkout-login .log-out")
|
15
|
-
link(:log_in_checkout,:css=>"#checkout-login .log-in")
|
16
|
-
link(:mostrar_cartas_guardadas,:class=>"display-cards")
|
17
|
-
|
18
|
-
elements(:container_tarjetas,:ul,:class=>"card-container")
|
19
|
-
|
20
|
-
p(:usuario_logueado_checkout,:css=>"#checkout-login .logged-in")
|
21
|
-
|
22
|
-
radio_button(:opcion_tarjeta_guardada,:css=>"#stored-cards .radio")
|
23
|
-
|
24
|
-
text_field(:codigo_seguridad_tarjeta_guardada,:id=>"stored-card-0-security-code")
|
25
|
-
|
26
|
-
text_field(:mail_usuario_nibbler,:id=>"signin-email")
|
27
|
-
text_field(:pass_usuario_nibbler,:id=>"signin-pass")
|
28
|
-
|
29
|
-
button(:boton_usuario_nibbler,:class=>"social-comp-common-button social-comp-common-button-primary social-comp-common-button-medium")
|
30
|
-
|
31
|
-
end
|
32
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
module OldCheckout
|
3
|
-
module InformacionDeContacto
|
4
|
-
include PageObject
|
5
|
-
|
6
|
-
text_field(:mail_contacto,:id=>"contact-email")
|
7
|
-
text_field(:mail_contacto_confimacion,:id=>"contact-email-repeat")
|
8
|
-
text_field(:pais_contacto,:id=>"country-code-0")
|
9
|
-
text_field(:area_contacto,:id=>"area-code-0")
|
10
|
-
text_field(:numero_contacto,:id=>"phone-number-0")
|
11
|
-
|
12
|
-
select_list(:telefono_contacto,:id=>"phone-type-0")
|
13
|
-
|
14
|
-
checkbox(:opcion_ofertas,:id=>"offers")
|
15
|
-
|
16
|
-
elements(:bandera_argentina,:span,:class=>"flagIcon flag-ar")
|
17
|
-
|
18
|
-
def cargar_datos_de_contacto
|
19
|
-
uncheck_opcion_ofertas
|
20
|
-
mail_contacto_element.set "bookingvuelos@despegar.com"
|
21
|
-
mail_contacto_confimacion_element.set "bookingvuelos@despegar.com"
|
22
|
-
telefono_contacto_element.select_value("HOME")
|
23
|
-
pais_contacto_element.set "Argentina (54)"
|
24
|
-
sleep 0.5
|
25
|
-
area_contacto_element.set "055"
|
26
|
-
numero_contacto_element.set "123456"
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
end
|
@@ -1,72 +0,0 @@
|
|
1
|
-
#encoding: utf-8
|
2
|
-
module OldCheckout
|
3
|
-
module Pasajeros
|
4
|
-
include PageObject
|
5
|
-
|
6
|
-
elements(:nombre,:text_field,:css=>"#passengers .input-passenger-first-name")
|
7
|
-
elements(:apellido,:text_field,:css=>"#passengers .input-passenger-last-name")
|
8
|
-
elements(:documento,:text_field,:css=>"#passengers .input-document-number")
|
9
|
-
elements(:nacionalidad,:select_list,:css=>"#passengers .select-nationality")
|
10
|
-
elements(:tipo_documento,:select_list,:css=>"#passengers .select-document-type")
|
11
|
-
elements(:sexo,:select_list,:css=>"#passengers .select-passenger-gender")
|
12
|
-
elements(:dia_nacimiento,:select_list,:css=>"#passengers .select-day")
|
13
|
-
elements(:mes_nacimiento,:select_list,:css=>"#passengers .select-month")
|
14
|
-
elements(:ano_nacimiento,:select_list,:css=>"#passengers .select-year")
|
15
|
-
elements(:campos_pasajeros,:fieldset,:id=>"passengers")
|
16
|
-
|
17
|
-
div(:edades_adultos,:id=>"birthday-group-0")
|
18
|
-
|
19
|
-
PLUS_NAME = ["A","B","C","D","E","F","G","H","I","J","k"]
|
20
|
-
|
21
|
-
def cargar_adultos
|
22
|
-
@index = 0
|
23
|
-
@index_menores = 0
|
24
|
-
self.manage_data.adt.times do |adulto|
|
25
|
-
nombre_elements[@index].set "Diego QA#{PLUS_NAME[@index]}"
|
26
|
-
apellido_elements[@index].set "Romero#{PLUS_NAME[@index]}"
|
27
|
-
documento_elements[@index].set "3245673#{@index}" if documento_elements[@index]
|
28
|
-
nacionalidad_elements[@index].select_value(AllPages.site) if nacionalidad_elements[@index]
|
29
|
-
tipo_documento_elements[@index].select_value(AllPages.site.match("AR|BR") ? "LOCAL" : "PASSPORT") if tipo_documento_elements[@index]
|
30
|
-
sexo_elements[@index].select_value("MALE") if sexo_elements[@index]
|
31
|
-
if edades_adultos?
|
32
|
-
dia_nacimiento_elements[@index_menores].select(@index+1)
|
33
|
-
mes_nacimiento_elements[@index_menores].select(3)
|
34
|
-
ano_nacimiento_elements[@index_menores].select_value("197#{@index}")
|
35
|
-
@index_menores += 1
|
36
|
-
end
|
37
|
-
@index += 1
|
38
|
-
end
|
39
|
-
end
|
40
|
-
def cargar_ninos
|
41
|
-
self.manage_data.cnn.times do |nino|
|
42
|
-
nombre_elements[@index].set "Martin QA#{PLUS_NAME[@index]}"
|
43
|
-
apellido_elements[@index].set "Diez jr#{PLUS_NAME[@index]}"
|
44
|
-
documento_elements[@index].set "4245663#{@index}" if documento_elements[@index]
|
45
|
-
nacionalidad_elements[@index].select_value(AllPages.site) if nacionalidad_elements[@index]
|
46
|
-
tipo_documento_elements[@index].select_value(AllPages.site.match("AR|BR") ? "LOCAL" : "PASSPORT") if tipo_documento_elements[@index]
|
47
|
-
sexo_elements[@index].select_value("MALE") if sexo_elements[@index]
|
48
|
-
dia_nacimiento_elements[@index_menores].select(@index+1)
|
49
|
-
mes_nacimiento_elements[@index_menores].select(3)
|
50
|
-
ano_nacimiento_elements[@index_menores].select_value("2009")
|
51
|
-
@index += 1
|
52
|
-
@index_menores += 1
|
53
|
-
end
|
54
|
-
end
|
55
|
-
def cargar_bebes
|
56
|
-
self.manage_data.inf.times do |bebe|
|
57
|
-
nombre_elements[@index].set "Maribel QA#{PLUS_NAME[@index]}"
|
58
|
-
apellido_elements[@index].set "Dias Herr jrb#{PLUS_NAME[@index]}"
|
59
|
-
documento_elements[@index].set "4249966#{@index}" if documento_elements[@index]
|
60
|
-
nacionalidad_elements[@index].select_value(AllPages.site) if nacionalidad_elements[@index]
|
61
|
-
tipo_documento_elements[@index].select_value(AllPages.site.match("AR|BR") ? "LOCAL" : "PASSPORT") if tipo_documento_elements[@index]
|
62
|
-
sexo_elements[@index].select_value("MALE") if sexo_elements[@index]
|
63
|
-
dia_nacimiento_elements[@index_menores].select(@index+1)
|
64
|
-
mes_nacimiento_elements[@index_menores].select(3)
|
65
|
-
ano_nacimiento_elements[@index_menores].select_value("2014")
|
66
|
-
@index += 1
|
67
|
-
@index_menores += 1
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|
72
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
#encoding: utf-8
|
2
|
-
module OldCheckout
|
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
|
-
div(:cerrar_popup_chat,:css=>"#dtalk-container .ux-header-close")
|
19
|
-
span(:cerrar_popup_cobertura,:css=>".popup-upselling-coverage .popup-close-button")
|
20
|
-
span(:cerrar_popup_cantidad_visitantes,:css=>"#searches-count-alert-popup .popup-close-button")
|
21
|
-
|
22
|
-
def cerrar_popups
|
23
|
-
begin
|
24
|
-
cerrar_popup_cantidad_visitantes_element.click if cerrar_popup_cantidad_visitantes_element.present?
|
25
|
-
cerrar_popup_chat_element.click if popup_chat_element.present?
|
26
|
-
rescue Selenium::WebDriver::Error::UnknownError
|
27
|
-
puts "Error al cerrar chat"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|
32
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
#encoding: utf-8
|
2
|
-
module OldCheckout
|
3
|
-
module Reviews
|
4
|
-
include PageObject
|
5
|
-
|
6
|
-
div(:popup_reviews_aerolineas,:id=>"popup-reviews")
|
7
|
-
span(:close_popup_reviews_aerolineas,:css=>"#popup-reviews .popup-close-button")
|
8
|
-
elements(:reviews_aerolineas,:link,:css=>"#itinerary .segments .airline")
|
9
|
-
elements(:logos_aerolineas,:image,:css=>"#itinerary .segments .airline-logo img")
|
10
|
-
|
11
|
-
def logo_aerolinea_en_matriz(index)
|
12
|
-
self.logos_aerolineas_elements[index].attribute("src").strip.downcase
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
@@ -1,281 +0,0 @@
|
|
1
|
-
#encoding: utf-8
|
2
|
-
module OldCheckout
|
3
|
-
module Tarjeta
|
4
|
-
include PageObject
|
5
|
-
|
6
|
-
select_list(:tarjeta,:id=>"card-installment-select")
|
7
|
-
select_list(:cuotas,:id=>"card-installment-select")
|
8
|
-
select_list(:mes_vencimiento_tarjeta,:id=>"card-expiration-month")
|
9
|
-
select_list(:ano_vencimiento_tarjeta,:id=>"card-expiration-year")
|
10
|
-
select_list(:tipo_titular_tarjeta,:id=>"owner-type")
|
11
|
-
select_list(:sexo_titular_tarjeta,:id=>"owner-gender")
|
12
|
-
select_list(:estado_entrega_tarjeta,:id=>"billing-address-state")
|
13
|
-
select_list(:sexo_offline,:id=>"offline-owner-gender")
|
14
|
-
|
15
|
-
text_field(:cp_entrega_tarjeta,:id=>"billing-address-postal-code")
|
16
|
-
text_field(:piso_entrega_tarjeta,:id=>"billing-address-floor")
|
17
|
-
text_field(:depto_entrega_tarjeta,:id=>"billing-address-deparment")
|
18
|
-
text_field(:numero_entrega_tarjeta,:id=>"billing-address-number")
|
19
|
-
text_field(:ciudad_entrega_tarjeta,:id=>"billing-address-city")
|
20
|
-
text_field(:calle_entrega_tarjeta,:id=>"billing-address-street")
|
21
|
-
text_field(:numero_tarjeta,:id=>"card-number")
|
22
|
-
text_field(:codigo_seguridad_tarjeta,:id=>"security-code")
|
23
|
-
text_field(:nombre_titular_tarjeta,:id=>"owner-name")
|
24
|
-
text_field(:documento_titular_tarjeta,:id=>"owner-document-number")
|
25
|
-
text_field(:banco_emisor,:id=>"other-bank-name")
|
26
|
-
text_field(:documento_offline,:id=>"offline-owner-document-number")
|
27
|
-
text_field(:nombre_completo_contacto,:id=>"contact-contact-full-name")
|
28
|
-
text_field(:cuit_empresa,:id=>"owner-fiscal-document-number")
|
29
|
-
|
30
|
-
div(:debito,:class=>"installment-info")
|
31
|
-
div(:warning_deposito,:css=>"#cash-installment .ux-common-message-warning")
|
32
|
-
div(:con_intereses,:class=>"installments-with-interest")
|
33
|
-
|
34
|
-
radio_button(:un_pago,:id=>"installment-0")
|
35
|
-
radio_button(:un_pago_visa,:value=>"_VI")
|
36
|
-
radio_button(:un_pago_argentina,:class=>"radio main-radio ")
|
37
|
-
radio_button(:un_pago_debito,:id=>"installment-1")
|
38
|
-
radio_button(:un_pago_peru,:id=>"installment-3")
|
39
|
-
radio_button(:deposito_ar,:css=>"#cash-installment .main-radio")
|
40
|
-
radio_button(:deposito_pe,:css=>"#multiple-card-cash-installment .main-radio")
|
41
|
-
radio_button(:pago_online_ar,:css=>"#homebanking-installment .main-radio")
|
42
|
-
radio_button(:pago_online_pe,:css=>"#multiple-card-homebanking-installment .main-radio")
|
43
|
-
radio_button(:opcion_cac,:css=>"#cac-installment .main-radio")
|
44
|
-
radio_button(:pago_con_intereses,:class=>"radio main-radio radio-with-interest")
|
45
|
-
|
46
|
-
|
47
|
-
elements(:tipos_de_pago,:radio,:css=>"#paymentDefinition input.radio")
|
48
|
-
|
49
|
-
span(:desc_fecha_deposito,:css=>"#cash-installment .installment-description-info")
|
50
|
-
span(:desc_pasos_deposito,:css=>"#cash-installment .installment-detail-text")
|
51
|
-
span(:precio_final,:id=>"total-price")
|
52
|
-
span(:precio_final_combo,:css=>"#installments-price .total")
|
53
|
-
span(:desglose_de_cuotas,:css=>"#installments-price .installments-detail")
|
54
|
-
|
55
|
-
li(:medio_de_pago_seleccionado,:css=>"#paymentDefinition .selected")
|
56
|
-
li(:medio_de_subpago_seleccionado,:css=>".list .sub-selected")
|
57
|
-
|
58
|
-
def cargar_datos_tarjeta
|
59
|
-
data = self.get_results_search_service
|
60
|
-
provider = data["result"]["data"]["items"][0]["provider"]
|
61
|
-
@provider = provider
|
62
|
-
if AllPages.site=="AR"
|
63
|
-
select_un_pago_argentina
|
64
|
-
elsif AllPages.site=="PE"
|
65
|
-
select_un_pago_peru
|
66
|
-
else
|
67
|
-
if debito.downcase.no_accents.match(/debito/)
|
68
|
-
select_un_pago_debito
|
69
|
-
else
|
70
|
-
select_un_pago
|
71
|
-
end
|
72
|
-
end
|
73
|
-
if provider == "VOL"
|
74
|
-
tarjeta_element.select("American Express")
|
75
|
-
numero_tarjeta_element.set("345678000000007")
|
76
|
-
codigo_seguridad_tarjeta_element.set("1234")
|
77
|
-
mes_vencimiento_tarjeta_element.select('10')
|
78
|
-
ano_vencimiento_tarjeta_element.select(Date.today.year+1)
|
79
|
-
elsif provider == "AIJ"
|
80
|
-
tarjeta_element.select("Visa")
|
81
|
-
numero_tarjeta_element.set("4012001021000605")
|
82
|
-
codigo_seguridad_tarjeta_element.set("989")
|
83
|
-
mes_vencimiento_tarjeta_element.select('12')
|
84
|
-
ano_vencimiento_tarjeta_element.select('2015')
|
85
|
-
else
|
86
|
-
tarjeta_element.select "Visa"
|
87
|
-
numero_tarjeta_element.set "4242424242424242"
|
88
|
-
mes_vencimiento_tarjeta_element.select 5
|
89
|
-
ano_vencimiento_tarjeta_element.select(Date.today.year+1)
|
90
|
-
codigo_seguridad_tarjeta_element.set "123"
|
91
|
-
end
|
92
|
-
banco_emisor_element.set "galicia" if banco_emisor_element.present?
|
93
|
-
self.elegir_tipo_titular_tarjeta if tipo_titular_tarjeta_element.present?
|
94
|
-
nombre_titular_tarjeta_element.set "Martin qa diez"
|
95
|
-
if documento_titular_tarjeta_element.present?
|
96
|
-
number = case AllPages.site
|
97
|
-
when "CL" then "7028168-6"
|
98
|
-
when "BR" then "22233366638"
|
99
|
-
else "32456324"
|
100
|
-
end
|
101
|
-
documento_titular_tarjeta_element.set number
|
102
|
-
end
|
103
|
-
sexo_titular_tarjeta_element.select_value "MALE" if sexo_titular_tarjeta_element.present?
|
104
|
-
#datos extras de tarjeta
|
105
|
-
self.cargar_datos_extras_de_tarjeta
|
106
|
-
end
|
107
|
-
|
108
|
-
def cargar_datos_tarjeta_nuevo_formulario
|
109
|
-
data = self.get_results_search_service
|
110
|
-
provider = data["result"]["data"]["items"][0]["provider"]
|
111
|
-
@provider = provider
|
112
|
-
un_pago_visa_element.click
|
113
|
-
sleep(1)
|
114
|
-
cuotas_element.select_value("1_CREDIT_VI_null")
|
115
|
-
numero_tarjeta_element.set "4242424242424242"
|
116
|
-
mes_vencimiento_tarjeta_element.select 5
|
117
|
-
ano_vencimiento_tarjeta_element.select(Date.today.year+1)
|
118
|
-
codigo_seguridad_tarjeta_element.set "123"
|
119
|
-
banco_emisor_element.set "galicia" if banco_emisor_element.present?
|
120
|
-
tipo_titular_tarjeta_value = "PERSON" if tipo_titular_tarjeta_element.present?
|
121
|
-
nombre_titular_tarjeta_element.set "Martin qa diez"
|
122
|
-
if documento_titular_tarjeta_element.present?
|
123
|
-
number = case AllPages.site
|
124
|
-
when "CL" then "7028168-6"
|
125
|
-
when "BR" then "22233366638"
|
126
|
-
else "32456324"
|
127
|
-
end
|
128
|
-
documento_titular_tarjeta_element.set number
|
129
|
-
end
|
130
|
-
sexo_titular_tarjeta_element.select_value "MALE" if sexo_titular_tarjeta_element.present?
|
131
|
-
self.cargar_datos_extras_de_tarjeta
|
132
|
-
end
|
133
|
-
|
134
|
-
def cargar_datos_tarjeta_guardada
|
135
|
-
@browser.execute_script("javascript:void($('#stored-cards .display-cards').click())") if mostrar_cartas_guardadas_element.text.no_accents.downcase.match("mas|mais|more")
|
136
|
-
if AllPages.site=="BR"
|
137
|
-
ul = container_tarjetas_elements.to_a.select{|ul| ul.li(:class,'item owner-name').text.match(/BR/)}.first
|
138
|
-
pending("no se encontro usuario de tarjeta para brasil") unless ul
|
139
|
-
ul.radio(:class,'radio').click
|
140
|
-
ul.text_fields[0].set("123")
|
141
|
-
else
|
142
|
-
ul = container_tarjetas_elements.to_a.select{|ul| ul.li(:class,'item owner-name').text.match(/Diego QA Romero/)}.first
|
143
|
-
ul.radio(:class,'radio').click
|
144
|
-
ul.text_fields[0].set("123")
|
145
|
-
end
|
146
|
-
if datos_tarjeta_guardada_element.present?
|
147
|
-
self.cargar_datos_extras_de_tarjeta
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
def cargar_datos_extras_de_tarjeta
|
152
|
-
data = self.get_results_search_service
|
153
|
-
provider = data["result"]["data"]["items"][0]["provider"]
|
154
|
-
@provider = provider
|
155
|
-
if provider == "VOL"
|
156
|
-
ciudad_entrega_tarjeta_element.set "Y Ciudad" if ciudad_entrega_tarjeta_element.present?
|
157
|
-
calle_entrega_tarjeta_element.set "Y Calle" if calle_entrega_tarjeta_element.present?
|
158
|
-
elsif provider == "AIJ"
|
159
|
-
ciudad_entrega_tarjeta_element.set "ciudad" if ciudad_entrega_tarjeta_element.present?
|
160
|
-
calle_entrega_tarjeta_element.set "calle" if calle_entrega_tarjeta_element.present?
|
161
|
-
else
|
162
|
-
ciudad_entrega_tarjeta_element.set "capital" if ciudad_entrega_tarjeta_element.present?
|
163
|
-
calle_entrega_tarjeta_element.set "corrientes" if calle_entrega_tarjeta_element.present?
|
164
|
-
end
|
165
|
-
estado_entrega_tarjeta_element.select(estado_entrega_tarjeta_options[3]) if estado_entrega_tarjeta_element.present?
|
166
|
-
numero_entrega_tarjeta_element.set "1234" if numero_entrega_tarjeta_element.present?
|
167
|
-
piso_entrega_tarjeta_element.set "3" if piso_entrega_tarjeta_element.present?
|
168
|
-
depto_entrega_tarjeta_element.set "A" if depto_entrega_tarjeta_element.present?
|
169
|
-
if AllPages.site=~/US|MX/
|
170
|
-
cp_entrega_tarjeta_element.set "11823" if cp_entrega_tarjeta_element.present?
|
171
|
-
else
|
172
|
-
cp_entrega_tarjeta_element.set "1182" if cp_entrega_tarjeta_element.present?
|
173
|
-
end
|
174
|
-
end
|
175
|
-
|
176
|
-
def verificar_tipos_de_pago
|
177
|
-
interes = nil
|
178
|
-
doc=Hpricot.parse(precio_final_element.html)
|
179
|
-
total_1 = doc.inner_text.gsub(/\D/,'').to_i
|
180
|
-
radios = tipos_de_pago_elements
|
181
|
-
i=0
|
182
|
-
radios.each do |radio|
|
183
|
-
if radio.present? and !radio.disabled?
|
184
|
-
radio.click
|
185
|
-
sleep(0.5)
|
186
|
-
doc=Hpricot.parse(precio_final_element.html)
|
187
|
-
total_2 = doc.inner_text.gsub(/\D/,'').to_i
|
188
|
-
unless radio.attribute_value("data-regular-expressions").nil?
|
189
|
-
keys = JSON.parse(radio.attribute_value("data-regular-expressions")).keys
|
190
|
-
if interes or radio.attribute_value("class").match(/radio-with-interest/)
|
191
|
-
validar_cuota_con_intereses(total_1,total_2)
|
192
|
-
else
|
193
|
-
case keys.first
|
194
|
-
when /1(.*)CREDIT(.*)null$/ then validar_cuota_un_pago()
|
195
|
-
when /(.*)CREDIT(.*)null$/ then validar_cuota_con_intereses(total_1,total_2)
|
196
|
-
when /(.*)CREDIT(.*)$/ then validar_cuota_sin_intereses(total_1,total_2)
|
197
|
-
end
|
198
|
-
keys.uniq.length.should equal(keys.length)
|
199
|
-
end
|
200
|
-
else
|
201
|
-
interes = true
|
202
|
-
end
|
203
|
-
end
|
204
|
-
if i > 17
|
205
|
-
break
|
206
|
-
end
|
207
|
-
i = i + 1
|
208
|
-
end
|
209
|
-
end
|
210
|
-
|
211
|
-
def validar_cuota_un_pago()
|
212
|
-
|
213
|
-
end
|
214
|
-
|
215
|
-
def validar_cuota_sin_intereses(total_1,total_2)
|
216
|
-
if medio_de_pago_seleccionado_element.div(:class,"installments-price").present?
|
217
|
-
doc = Hpricot.parse(medio_de_pago_seleccionado_element.div(:class,"installments-price").html)
|
218
|
-
inicial = (doc/"span.first-installment").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
|
219
|
-
valor_restantes = (doc/"span.all-installments/span.currency/span.amount").inner_text.gsub(/\./,'').to_i
|
220
|
-
cant_restantes = (doc/"span.all-installments").inner_text.gsub(/\./,'').match(/\+ (\d+)/)[1].to_i
|
221
|
-
(inicial + (cant_restantes * valor_restantes)).should be_within(3).of(total_2)
|
222
|
-
total_1.should equal(total_2)
|
223
|
-
else
|
224
|
-
total_1.should equal(total_2)
|
225
|
-
end
|
226
|
-
end
|
227
|
-
|
228
|
-
def validar_cuota_con_intereses(total_1,total_2)
|
229
|
-
if medio_de_subpago_seleccionado_element.present?
|
230
|
-
doc = Hpricot.parse(medio_de_subpago_seleccionado_element.html)
|
231
|
-
unless (doc/"span.interest").inner_text.empty?
|
232
|
-
costo_financiero = (doc/"span.interest").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
|
233
|
-
inicial = (doc/"span.first-installment").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
|
234
|
-
cant_restantes = (doc/"span.all-installments").inner_text.downstrip.gsub(/\./,'').match(/\+ (\d{1,2})/)[1].to_i
|
235
|
-
valor_restantes = (doc/"span.all-installments/span.price/span.currency/span.amount").inner_text.gsub(/\./,'').to_i
|
236
|
-
((total_2 - (inicial + (cant_restantes * valor_restantes))).abs <= 2).should be_true
|
237
|
-
costo_financiero.should equal(total_2 - total_1)
|
238
|
-
end
|
239
|
-
end
|
240
|
-
end
|
241
|
-
|
242
|
-
def verificar_nuevos_tipos_de_pago
|
243
|
-
doc = Hpricot.parse(@browser.html)
|
244
|
-
(doc/"ul.new-installments li.purchase-installment").each do |li|
|
245
|
-
@browser.radio(:id,(li/"input").first.attributes['id']).click
|
246
|
-
sleep(1)
|
247
|
-
doc = Hpricot.parse(@browser.html)
|
248
|
-
(doc/"select#card-installment-select option").each do |option|
|
249
|
-
@browser.select_list(:id,'card-installment-select').select_value(option.attributes['value'])
|
250
|
-
total_desglose = Hpricot.parse(precio_final_element.html).inner_text.gsub(/\D/,'').to_i
|
251
|
-
if desglose_de_cuotas_element.present?
|
252
|
-
doc = Hpricot.parse(desglose_de_cuotas_element.html)
|
253
|
-
inicial = (doc/"span.first-price").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
|
254
|
-
valor_restantes = (doc/"span.others-price").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
|
255
|
-
cant_restantes = (doc/"span.others-quantity").inner_text.to_i
|
256
|
-
(inicial + (cant_restantes * valor_restantes)).should be_within(3).of(total_desglose)
|
257
|
-
end
|
258
|
-
end
|
259
|
-
end
|
260
|
-
end
|
261
|
-
|
262
|
-
def elegir_tipo_titular_tarjeta
|
263
|
-
tipo = ["PERSON","COMPANY"][rand(2)]
|
264
|
-
tipo_titular_tarjeta_element.select_value tipo
|
265
|
-
if tipo=="COMPANY"
|
266
|
-
puts tipo
|
267
|
-
sleep(0.5)
|
268
|
-
cuit_empresa_element.set "20-32454321-0"
|
269
|
-
end
|
270
|
-
end
|
271
|
-
|
272
|
-
def deposito()
|
273
|
-
eval "deposito_#{AllPages.site.downcase}_element"
|
274
|
-
end
|
275
|
-
|
276
|
-
def pago_online()
|
277
|
-
eval "pago_online_#{AllPages.site.downcase}_element"
|
278
|
-
end
|
279
|
-
|
280
|
-
end
|
281
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
module Checkout
|
3
|
-
class OldCheckoutPage < CheckoutPage
|
4
|
-
|
5
|
-
include OldCheckout::Pasajeros
|
6
|
-
include OldCheckout::PopUp
|
7
|
-
include OldCheckout::Tarjeta
|
8
|
-
include OldCheckout::Reviews
|
9
|
-
include OldCheckout::Errores
|
10
|
-
include OldCheckout::FastCheckout
|
11
|
-
include OldCheckout::DatosDeFacturacion
|
12
|
-
include OldCheckout::InformacionDeContacto
|
13
|
-
|
14
|
-
div(:seccion_preguntas_riesgo,:css=>"#form .radio-group")
|
15
|
-
div(:opcion_no_deposito,:css=>"#confirm-payment-popup .flights-button-no")
|
16
|
-
div(:opcion_si_deposito,:css=>"#confirm-payment-popup .flights-button-yes")
|
17
|
-
div(:notificacion_error,:class=>"notification-box error-box")
|
18
|
-
div(:notificacion_warning,:class=>"notification-box warn-box")
|
19
|
-
div(:notificacion_warning_ux,:class=>"ux-common-message ux-common-message-warning ")
|
20
|
-
div(:mensaje_error_ux,:class=>"ux-common-message ux-common-message-error ")
|
21
|
-
div(:notificacion_error_ux,:class=>"ux-common-error")
|
22
|
-
div(:boton_si_cambio_precio,:class=>"button-yes")
|
23
|
-
div(:agencia_afiliada,:id=>"agency")
|
24
|
-
div(:cobertura,:id=>'upselling')
|
25
|
-
div(:cobertura_deshabilitada,:class=>"upselling upselling-disabled")
|
26
|
-
div(:itinerario,:id=>"detail")
|
27
|
-
div(:cupon_error,:id=>"coupon-error")
|
28
|
-
div(:cupon_exito,:id=>"voucher-success")
|
29
|
-
div(:clientes_felices,:id=>"happy-clients")
|
30
|
-
div(:link_price_jump,:css=>"#popup-price-difference .popup-link")
|
31
|
-
div(:mensaje_cancelacion,:id=>"cancellation-advice")
|
32
|
-
div(:mensaje_cancelacion_en_el_dia,:id=>"last-minute-advice")
|
33
|
-
div(:mensaje_error_emision_last_minute,:class=>"ux-common-message ux-common-message-error ")
|
34
|
-
link(:link_mensaje_error_emision_last_minute,:css=>".ux-common-message-error a")
|
35
|
-
|
36
|
-
checkbox(:opcion_seguros,:id=>"upselling-checkbox")
|
37
|
-
checkbox(:condiciones_de_compra,:id=>"read-agreement")
|
38
|
-
checkbox(:cupones,:id=>"vouchers")
|
39
|
-
|
40
|
-
span(:elegir_otro_vuelo,:class=>"choose-another")
|
41
|
-
span(:error_datos,:class=>"error-message")
|
42
|
-
span(:carga,:css=>".loading .img")
|
43
|
-
span(:protegido,:css=>".protected")
|
44
|
-
span(:desprotegido,:css=>".unprotected")
|
45
|
-
span(:precio_seguro,:css=>"#upselling .description .bold")
|
46
|
-
|
47
|
-
text_field(:cupon_email,:id=>"voucher-email")
|
48
|
-
text_field(:cupon_voucher,:id=>"voucher-code-0")
|
49
|
-
|
50
|
-
li(:precio_seguro_desglose,:class=>"item destination_service_insurance")
|
51
|
-
|
52
|
-
p(:id_reserva_compra_duplicada,:css=>"#popup-duplicated-transaction .paragraph")
|
53
|
-
|
54
|
-
def datos_itinerario()
|
55
|
-
return OldCheckout::Cluster.new(tipo_de_busqueda,Hpricot.parse(itinerario_element.html))
|
56
|
-
end
|
57
|
-
|
58
|
-
def opcion_seguros(opcion)
|
59
|
-
opcion_seguros_element.set(opcion)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|