flights_gui_tests 2.4.89 → 2.4.91
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/data/host.yml +32 -16
- data/features/step_definitions/landing/landing_steps.rb +24 -4
- data/features/step_definitions/results/basefare_steps.rb +1 -1
- data/features/step_definitions/results/filters_steps.rb +1 -1
- data/features/step_definitions/results/order_steps.rb +4 -4
- data/features/step_definitions/thanks/thanks_steps.rb +6 -0
- data/features/support/modules/checkout/checkout.rb +1 -0
- data/features/support/modules/checkout/new_checkout/2tc/tarjeta.rb +111 -0
- data/features/support/modules/checkout/new_checkout/2tc.rb +2 -103
- data/features/support/pages/all_pages.rb +26 -24
- data/features/support/pages/landing/search_page.rb +5 -1
- data/features/support/pages/results/search_page.rb +1 -0
- data/features/support/pages/thanks/thanks_page.rb +2 -0
- data/features/support/version.rb +1 -1
- data/features/tests/checkout/2_tc.feature +8 -8
- data/features/tests/checkout/seguros.feature +3 -3
- data/features/tests/landing/negative.feature +1 -0
- data/features/tests/landing/search.feature +1 -0
- data/features/tests/results/orders.feature +24 -24
- 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: e567d0ba5e6b7bc2b2dccb93251ead30352af30f
|
4
|
+
data.tar.gz: 9fdd079ad55f4659a76a91c799dbf90ec27846b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a13231cae5a5531508d52274c2083bb8db2a478c745f9173920a1e32ded30c847946b2a36af0e07bf7386b5da1c9c7761e6d1a0fce0d0ed9d89b307db6b65cf
|
7
|
+
data.tar.gz: f8b04fe40dc234b28e647a53b26cee6bc4774c3b0600b8b31041fc6c39d67b05808054816f9259e84a32adee527864a2149fe9961662c0a8f54617a47dd07c5d
|
data/features/data/host.yml
CHANGED
@@ -3,94 +3,110 @@ PT:
|
|
3
3
|
beta: http://www.despegar.com
|
4
4
|
rc: http://rc.despegar.it
|
5
5
|
ic: http://ic.despegar.it
|
6
|
-
desa: http://
|
6
|
+
desa: http://n.despegar.it
|
7
7
|
IN:
|
8
8
|
produccion: http://www.despegar.com
|
9
9
|
beta: http://www.despegar.com
|
10
10
|
rc: http://rc.despegar.it
|
11
11
|
ic: http://ic.despegar.it
|
12
|
-
desa: http://
|
12
|
+
desa: http://n.despegar.it
|
13
13
|
CN:
|
14
14
|
produccion: http://www.despegar.com
|
15
15
|
beta: http://www.despegar.com
|
16
16
|
rc: http://rc.despegar.it
|
17
17
|
ic: http://ic.despegar.it
|
18
|
-
desa: http://
|
18
|
+
desa: http://n.despegar.it
|
19
19
|
AR:
|
20
20
|
produccion: http://www.despegar.com.ar
|
21
21
|
beta: http://www.despegar.com.ar
|
22
22
|
rc: http://rc.despegar.it.ar
|
23
23
|
ic: http://ic.despegar.it.ar
|
24
|
-
desa: http://
|
24
|
+
desa: http://n.despegar.it.ar
|
25
25
|
BR:
|
26
26
|
produccion: http://www.decolar.com
|
27
27
|
beta: http://www.decolar.com
|
28
28
|
rc: http://rc.decolar.it
|
29
29
|
ic: http://ic.decolar.it
|
30
|
-
desa: http://
|
30
|
+
desa: http://n.decolar.it
|
31
31
|
CL:
|
32
32
|
produccion: http://www.despegar.cl
|
33
33
|
beta: http://www.despegar.cl
|
34
34
|
rc: http://rc.despegar.it.cl
|
35
35
|
ic: http://ic.despegar.it.cl
|
36
|
-
desa: http://
|
36
|
+
desa: http://n.despegar.it.cl
|
37
37
|
CO:
|
38
38
|
produccion: http://www.despegar.com.co
|
39
39
|
beta: http://www.despegar.com.co
|
40
40
|
rc: http://rc.despegar.it.co
|
41
41
|
ic: http://ic.despegar.it.co
|
42
|
-
desa: http://
|
42
|
+
desa: http://n.despegar.it.co
|
43
43
|
CR:
|
44
44
|
produccion: http://www.despegar.co.cr
|
45
45
|
beta: http://www.despegar.co.cr
|
46
46
|
rc: http://rc.despegar.it.cr
|
47
47
|
ic: http://ic.despegar.it.cr
|
48
|
-
desa: http://
|
48
|
+
desa: http://n.despegar.it.cr
|
49
49
|
EC:
|
50
50
|
produccion: http://www.despegar.com.ec
|
51
51
|
beta: http://www.despegar.com.ec
|
52
52
|
rc: http://rc.despegar.it.ec
|
53
53
|
ic: http://ic.despegar.it.ec
|
54
|
-
desa: http://
|
54
|
+
desa: http://n.despegar.it.ec
|
55
55
|
MX:
|
56
56
|
produccion: http://www.despegar.com.mx
|
57
57
|
beta: http://www.despegar.com.mx
|
58
58
|
rc: http://rc.despegar.it.mx
|
59
59
|
ic: http://ic.despegar.it.mx
|
60
|
-
desa: http://
|
60
|
+
desa: http://n.despegar.it.mx
|
61
61
|
PA:
|
62
62
|
produccion: http://www.despegar.com.pa
|
63
63
|
beta: http://www.despegar.com.pa
|
64
64
|
rc: http://rc.despegar.it.pa
|
65
65
|
ic: http://ic.despegar.it.pa
|
66
|
-
desa: http://
|
66
|
+
desa: http://n.despegar.it.pa
|
67
67
|
PE:
|
68
68
|
produccion: http://www.despegar.com.pe
|
69
69
|
beta: http://www.despegar.com.pe
|
70
70
|
rc: http://rc.despegar.it.pe
|
71
71
|
ic: http://ic.despegar.it.pe
|
72
|
-
desa: http://
|
72
|
+
desa: http://n.despegar.it.pe
|
73
73
|
US:
|
74
74
|
produccion: http://www.us.despegar.com
|
75
75
|
beta: http://www.us.despegar.com
|
76
76
|
rc: http://rc.us.despegar.it
|
77
77
|
ic: http://ic.us.despegar.it
|
78
|
-
desa: http://
|
78
|
+
desa: http://n.us.despegar.it
|
79
79
|
UY:
|
80
80
|
produccion: http://www.despegar.com.uy
|
81
81
|
beta: http://www.despegar.com.uy
|
82
82
|
rc: http://rc.despegar.it.uy
|
83
83
|
ic: http://ic.despegar.it.uy
|
84
|
-
desa: http://
|
84
|
+
desa: http://n.despegar.it.uy
|
85
85
|
VE:
|
86
86
|
produccion: http://www.despegar.com.ve
|
87
87
|
beta: http://www.despegar.com.ve
|
88
88
|
rc: http://rc.despegar.it.ve
|
89
89
|
ic: http://ic.despegar.it.ve
|
90
|
-
desa: http://
|
90
|
+
desa: http://n.despegar.it.ve
|
91
91
|
PR:
|
92
92
|
produccion: http://www.despegar.com.pr
|
93
93
|
beta: http://www.despegar.com.pr
|
94
94
|
rc: http://rc.despegar.it.pr
|
95
95
|
ic: http://ic.despegar.it.pr
|
96
|
-
desa: http://
|
96
|
+
desa: http://n.despegar.it.pr
|
97
|
+
|
98
|
+
|
99
|
+
#10.254.210.62 n.despegar.it.pr
|
100
|
+
#10.254.210.62 n.despegar.it.ar
|
101
|
+
#10.254.210.62 n.decolar.it
|
102
|
+
#10.254.210.62 n.despegar.it.co
|
103
|
+
#10.254.210.62 n.despegar.it.mx
|
104
|
+
#10.254.210.62 n.despegar.it.ec
|
105
|
+
#10.254.210.62 n.despegar.it.cr
|
106
|
+
#10.254.210.62 n.despegar.it
|
107
|
+
#10.254.210.62 n.despegar.it.pa
|
108
|
+
#10.254.210.62 n.despegar.it.uy
|
109
|
+
#10.254.210.62 n.despegar.it.cl
|
110
|
+
#10.254.210.62 n.despegar.it.ve
|
111
|
+
#10.254.210.62 n.us.despegar.it
|
112
|
+
#10.254.210.62 n.despegar.it.pe
|
@@ -29,10 +29,10 @@ end
|
|
29
29
|
Entonces(/^valido el sorting de landing$/) do
|
30
30
|
doc = Hpricot.parse(@page.orden_element.html)
|
31
31
|
options = (doc/"option").collect{|option| option.attributes['value']}
|
32
|
-
@page.orden_element.value.should match("
|
33
|
-
options.should include?("
|
34
|
-
options.should include?("
|
35
|
-
options.should include?("
|
32
|
+
@page.orden_element.value.should match("FARE__ASCENDING")
|
33
|
+
options.should include?("FARE__ASCENDING")
|
34
|
+
options.should include?("STOPSCOUNT__ASCENDING")
|
35
|
+
options.should include?("TOTALFARE__ASCENDING")
|
36
36
|
options.should_not include?("PERSONAL_ASCENDING")
|
37
37
|
options.should_not include?("DURATION_ASCENDING")
|
38
38
|
options.should_not include?("FARE_DESCENDING")
|
@@ -108,4 +108,24 @@ Entonces(/^(?:verifico|valido) que se muestre correctamente la review de pasajer
|
|
108
108
|
@page.reviews_pasajeros_element.should visible
|
109
109
|
@page.reviews_pasajeros_title_element.text.no_accents.should match("Puntuacion general de vuelos a #{@ciudad_elegida}|Pontuacao geral de voos #{@ciudad_elegida}|Overall rating for flights to #{@ciudad_elegida}")
|
110
110
|
@page.reviews_pasajeros_title_element.text.no_accents.should match("Ya compraron vuelos a #{@ciudad_elegida}|Ja compraram voos a #{@ciudad_elegida}|")
|
111
|
+
end
|
112
|
+
|
113
|
+
|
114
|
+
Entonces(/^pruebo angular en landing$/) do
|
115
|
+
if $HENRY_PARAMS['angular']
|
116
|
+
step "ingreso a landing con cookie \"useAngular\" al \"1\""
|
117
|
+
else
|
118
|
+
step "ingreso a landing con cookie \"useAngular\" al \"61\""
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
Cuando(/^ingreso a landing con cookie "(.+)" al "(.+)"$/) do |key,value|
|
123
|
+
step "fuerzo el abztesting de \"#{key}\" al \"#{value}\""
|
124
|
+
@page = Landing::SearchPage.new($browser)
|
125
|
+
@page.iniciar_itinerarios
|
126
|
+
step "realizo la busqueda"
|
127
|
+
step "verifico que la pagina no rompa"
|
128
|
+
step "verifico que traiga resultados de landing"
|
129
|
+
@page.cargar_valores_abtesting
|
130
|
+
puts @page.abtesting
|
111
131
|
end
|
@@ -4,7 +4,7 @@ Entonces(/^(?:verifico|valido) los textos de las opciones del combo$/) do
|
|
4
4
|
when 'US' then 'Recommended'
|
5
5
|
when 'IN' then 'Recommended'
|
6
6
|
when 'CN' then 'Recommended'
|
7
|
-
when 'PT' then '
|
7
|
+
when 'PT' then 'Recommended'
|
8
8
|
when 'BR' then 'Mais Escolhidos'
|
9
9
|
else 'Mas Elegidos'
|
10
10
|
end
|
@@ -32,7 +32,7 @@ Entonces(/^(?:verifico|valido) que los contadores respecto a las aerolineas sean
|
|
32
32
|
end
|
33
33
|
|
34
34
|
Entonces(/^(?:verifico|valido) que la primer pagina muestre correctamente los filtros de aerolineas$/) do
|
35
|
-
group_airlines = [['UA', 'CM', 'AM', 'US', 'AA', 'DL'], ['LA', '4M', 'XL', '4C', 'JJ', 'PZ','LP'], ['AV', 'TA', 'LR', 'T0']]
|
35
|
+
group_airlines = [['UA', 'CM', 'AM', 'US', 'AA', 'DL'], ['LA', '4M', 'XL', '4C', 'JJ', 'PZ','LP','L0'], ['AV', 'TA', 'LR', 'T0']]
|
36
36
|
doc = Hpricot.parse(@page.html)
|
37
37
|
airlines = []
|
38
38
|
@code_airline = @code_airline ? @code_airline : @airline.images.first.src.match(/\/(.{1,7})\.png/)[1].strip
|
@@ -28,7 +28,7 @@ Entonces(/^levanto los datos de los clusters "(.*?)"$/) do |arg1|
|
|
28
28
|
@page.cargar_itinerarios
|
29
29
|
end
|
30
30
|
|
31
|
-
Entonces(/^(?:verifico|valido) ordenamiento
|
31
|
+
Entonces(/^(?:verifico|valido) ordenamiento STOPSCOUNT__ASCENDING$/) do
|
32
32
|
after = @page.datos_de_itinerarios.first
|
33
33
|
@page.datos_de_itinerarios.each do |cluster|
|
34
34
|
after.total_escalas.last.should_not es_mayor_que(cluster.total_escalas.last.to_i)
|
@@ -36,7 +36,7 @@ Entonces(/^(?:verifico|valido) ordenamiento STOPSCOUNT_ASCENDING$/) do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
Entonces(/^(?:verifico|valido) ordenamiento
|
39
|
+
Entonces(/^(?:verifico|valido) ordenamiento TOTALFARE__ASCENDING$/) do
|
40
40
|
after = @page.datos_de_itinerarios.first.tarifas['total']
|
41
41
|
@page.datos_de_itinerarios.each do |cluster|
|
42
42
|
after.value.should_not es_mayor_que(cluster.tarifas['total'].value.to_i)
|
@@ -44,7 +44,7 @@ Entonces(/^(?:verifico|valido) ordenamiento TOTALFARE_ASCENDING$/) do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
Entonces(/^(?:verifico|valido) ordenamiento
|
47
|
+
Entonces(/^(?:verifico|valido) ordenamiento DURATION__ASCENDING$/) do
|
48
48
|
unless $HENRY_PARAMS['angular']
|
49
49
|
after = @page.datos_de_itinerarios.first.duracion
|
50
50
|
@page.datos_de_itinerarios.each do |cluster|
|
@@ -54,7 +54,7 @@ Entonces(/^(?:verifico|valido) ordenamiento DURATION_ASCENDING$/) do
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
Entonces(/^(?:verifico|valido) ordenamiento
|
57
|
+
Entonces(/^(?:verifico|valido) ordenamiento FARE__ASCENDING$/) do
|
58
58
|
after = @page.datos_de_itinerarios.first.tarifas['tarifa_adulto']
|
59
59
|
@page.datos_de_itinerarios.each do |cluster|
|
60
60
|
after.value.should_not es_mayor_que(cluster.tarifas['tarifa_adulto'].value.to_i)
|
@@ -149,4 +149,10 @@ end
|
|
149
149
|
|
150
150
|
Entonces(/^verifico que se muestra la encuesta de satisfaccion$/) do
|
151
151
|
@page.encuesta_element.should visible("encuesta de satisfaccion")
|
152
|
+
end
|
153
|
+
|
154
|
+
Y(/^verifico los precios mostrados para cada tarjeta en gracias$/) do
|
155
|
+
primer_precio = @page.precios_tarjetas_elements[0].text.match(/(.+) (.+) \|(.+)/)[2]
|
156
|
+
segundo_precio = @page.precios_tarjetas_elements[1].text.match(/(.+) (.+) \|(.+)/)[2]
|
157
|
+
(primer_precio.gsub(/\D/,'').to_i + segundo_precio.gsub(/\D/,'').to_i).should be_within(2).of(@itinerario_gracias.tarifas["total"].value)
|
152
158
|
end
|
@@ -10,4 +10,5 @@ require_relative 'new_checkout/informacion_de_contacto'
|
|
10
10
|
require_relative 'new_checkout/multipleoneway'
|
11
11
|
require_relative 'new_checkout/3dsecure'
|
12
12
|
require_relative 'new_checkout/2tc/datos_de_facturacion'
|
13
|
+
require_relative 'new_checkout/2tc/tarjeta'
|
13
14
|
require_relative 'new_checkout/2tc'
|
@@ -0,0 +1,111 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module NewCheckout
|
3
|
+
module TwoTc
|
4
|
+
module Tarjeta
|
5
|
+
include PageObject
|
6
|
+
radio_button(:una_tarjeta,:id=>"payment-type-radios-0")
|
7
|
+
radio_button(:dos_tarjetas,:id=>"payment-type-radios-1")
|
8
|
+
radio_button(:efectivo,:id=>"payment-type-radios-2")
|
9
|
+
|
10
|
+
div(:modulo_primer_tarjeta,:id=>"paymentContainerDefinition.multipleCardPaymentDefinitions[0].paymentDefinition.cardDefinition")
|
11
|
+
div(:modulo_segunda_tarjeta,:id=>"paymentContainerDefinition.multipleCardPaymentDefinitions[1].paymentDefinition.cardDefinition")
|
12
|
+
|
13
|
+
div(:modulo_primer_tarjeta_nf,:id=>"paymentContainerDefinition.multipleCardPaymentDefinitions[0].paymentDefinition")
|
14
|
+
div(:modulo_segunda_tarjeta_nf,:id=>"paymentContainerDefinition.multipleCardPaymentDefinitions[1].paymentDefinition")
|
15
|
+
|
16
|
+
span(:precio_primer_tarjeta,:id=>"payment-price_0")
|
17
|
+
span(:precio_segunda_tarjeta,:id=>"payment-price_1")
|
18
|
+
|
19
|
+
def cargar_datos_pago(modulo)
|
20
|
+
@provider = self.provider
|
21
|
+
if provider == "VOL"
|
22
|
+
cargar_valores_tarjeta(modulo,"American Express","345678000000007","1234","10",Date.today.year+1)
|
23
|
+
elsif provider == "AIJ"
|
24
|
+
cargar_valores_tarjeta(modulo,"Visa","4012001021000605","989","12","2016")
|
25
|
+
else
|
26
|
+
if modulo.select_list.include? "Visa"
|
27
|
+
cargar_valores_tarjeta(modulo,"Visa","4242424242424242","123",5,Date.today.year+1)
|
28
|
+
elsif modulo.select_list.include? "American Express"
|
29
|
+
cargar_valores_tarjeta(modulo,"American Express","348783429078480","1234","10",Date.today.year+1)
|
30
|
+
elsif modulo.select_list.include? "MasterCard"
|
31
|
+
cargar_valores_tarjeta(modulo,"MasterCard","5390700823285988","124","10",Date.today.year+1)
|
32
|
+
else
|
33
|
+
return "No se encuentran tarjetas validas."
|
34
|
+
end
|
35
|
+
end
|
36
|
+
modulo.text_field(:class,/input-other-bank-name/).set "galicia" if modulo.text_field(:class,/input-other-bank-name/).present?
|
37
|
+
modulo.text_field(:class,/input-owner-name/).set "Martin qa diez"
|
38
|
+
if modulo.text_field(:class,/input-owner-document-number/).present?
|
39
|
+
number = case AllPages.site
|
40
|
+
when "CL" then "70281686"
|
41
|
+
when "BR" then "48629049391"
|
42
|
+
else "32456324"
|
43
|
+
end
|
44
|
+
modulo.text_field(:class,/input-owner-document-number/).set number
|
45
|
+
end
|
46
|
+
modulo.select_list(:class,/select-owner-gender/).select_value "MALE" if modulo.select_list(:class,/select-owner-gender/).present?
|
47
|
+
#datos extras de tarjeta
|
48
|
+
cargar_billing_address(modulo)
|
49
|
+
return nil
|
50
|
+
end
|
51
|
+
|
52
|
+
def cargar_datos_pago_nuevo_formulario(modulo)
|
53
|
+
@provider = self.provider
|
54
|
+
modulo.radio(:value,'_VI').set
|
55
|
+
sleep(1)
|
56
|
+
modulo.select_list(:class,/select-card-brand/).select_value("1_CREDIT_VI_null")
|
57
|
+
modulo.text_field(:class,/input-card-number/).set("4012001021000605")
|
58
|
+
modulo.text_field(:class,/input-security-code/).set("989")
|
59
|
+
modulo.select_list(:class,/select-month/).select("12")
|
60
|
+
modulo.select_list(:class,/select-year/).select("2016")
|
61
|
+
modulo.text_field(:class,/input-other-bank-name/).set "galicia" if modulo.text_field(:class,/input-other-bank-name/).present?
|
62
|
+
modulo.text_field(:class,/input-owner-name/).set "Martin qa diez"
|
63
|
+
if modulo.text_field(:class,/input-owner-document-number/).present?
|
64
|
+
number = case AllPages.site
|
65
|
+
when "CL" then "70281686"
|
66
|
+
when "BR" then "48629049391"
|
67
|
+
else "32456324"
|
68
|
+
end
|
69
|
+
modulo.text_field(:class,/input-owner-document-number/).set number
|
70
|
+
end
|
71
|
+
modulo.select_list(:class,/select-owner-gender/).select_value "MALE" if modulo.select_list(:class,/select-owner-gender/).present?
|
72
|
+
#datos extras de tarjeta
|
73
|
+
cargar_billing_address(modulo)
|
74
|
+
return nil
|
75
|
+
end
|
76
|
+
|
77
|
+
def cargar_valores_tarjeta(modulo,tarjeta,numero,codigo,mes,ano)
|
78
|
+
modulo.select_list.select(tarjeta)
|
79
|
+
modulo.text_field(:class,/input-card-number/).set(numero)
|
80
|
+
modulo.text_field(:class,/input-security-code/).set(codigo)
|
81
|
+
modulo.select_list(:class,/select-month/).select(mes)
|
82
|
+
modulo.select_list(:class,/select-year/).select(ano)
|
83
|
+
end
|
84
|
+
|
85
|
+
def cargar_billing_address(modulo)
|
86
|
+
@provider = self.provider
|
87
|
+
if provider == "VOL"
|
88
|
+
modulo.text_field(:class,/input-city/).set "Y Ciudad" if modulo.text_field(:class,/input-city/).present?
|
89
|
+
modulo.text_field(:class,/input-street/).set "Y Calle" if modulo.text_field(:class,/input-street/).present?
|
90
|
+
elsif provider == "AIJ"
|
91
|
+
modulo.text_field(:class,/input-city/).set "ciudad" if modulo.text_field(:class,/input-city/).present?
|
92
|
+
modulo.text_field(:class,/input-street/).set "calle" if modulo.text_field(:class,/input-street/).present?
|
93
|
+
else
|
94
|
+
modulo.text_field(:class,/input-city/).set "capital" if modulo.text_field(:class,/input-city/).present?
|
95
|
+
modulo.text_field(:class,/input-street/).set "corrientes" if modulo.text_field(:class,/input-street/).present?
|
96
|
+
end
|
97
|
+
modulo.text_field(:class,/input-state/).set("algunEstado") if modulo.text_field(:class,/input-state/).present?
|
98
|
+
modulo.select_list(:class,/select-state/).select(modulo.select_list(:class,/select-state/).options[3].text) if modulo.select_list(:class,/select-state/).present?
|
99
|
+
modulo.text_field(:class,/input-address-number/).set "1234" if modulo.text_field(:class,/input-address-number/).present?
|
100
|
+
modulo.text_field(:class,/input-floor/).set "3" if modulo.text_field(:class,/input-floor/).present?
|
101
|
+
modulo.text_field(:class,/input-deparment/).set "A" if modulo.text_field(:class,/input-deparment/).present?
|
102
|
+
if AllPages.site=~/US|MX/
|
103
|
+
modulo.text_field(:class,/input-postal-code/).set "11823" if modulo.text_field(:class,/input-postal-code/).present?
|
104
|
+
else
|
105
|
+
modulo.text_field(:class,/input-postal-code/).set "1182" if modulo.text_field(:class,/input-postal-code/).present?
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -3,108 +3,7 @@ module NewCheckout
|
|
3
3
|
module TwoTc
|
4
4
|
include PageObject
|
5
5
|
include NewCheckout::TwoTc::DatosDeFacturacion
|
6
|
-
|
7
|
-
|
8
|
-
radio_button(:dos_tarjetas,:id=>"payment-type-radios-1")
|
9
|
-
radio_button(:efectivo,:id=>"payment-type-radios-2")
|
10
|
-
|
11
|
-
div(:modulo_primer_tarjeta,:id=>"paymentContainerDefinition.multipleCardPaymentDefinitions[0].paymentDefinition.cardDefinition")
|
12
|
-
div(:modulo_segunda_tarjeta,:id=>"paymentContainerDefinition.multipleCardPaymentDefinitions[1].paymentDefinition.cardDefinition")
|
13
|
-
|
14
|
-
div(:modulo_primer_tarjeta_nf,:id=>"paymentContainerDefinition.multipleCardPaymentDefinitions[0].paymentDefinition")
|
15
|
-
div(:modulo_segunda_tarjeta_nf,:id=>"paymentContainerDefinition.multipleCardPaymentDefinitions[1].paymentDefinition")
|
16
|
-
|
17
|
-
span(:precio_primer_tarjeta,:id=>"payment-price_0")
|
18
|
-
span(:precio_segunda_tarjeta,:id=>"payment-price_1")
|
19
|
-
|
20
|
-
def cargar_datos_pago(modulo)
|
21
|
-
@provider = self.provider
|
22
|
-
if provider == "VOL"
|
23
|
-
cargar_valores_tarjeta(modulo,"American Express","345678000000007","1234","10",Date.today.year+1)
|
24
|
-
elsif provider == "AIJ"
|
25
|
-
cargar_valores_tarjeta(modulo,"Visa","4012001021000605","989","12","2016")
|
26
|
-
else
|
27
|
-
if modulo.select_list.include? "Visa"
|
28
|
-
cargar_valores_tarjeta(modulo,"Visa","4242424242424242","123",5,Date.today.year+1)
|
29
|
-
elsif modulo.select_list.include? "American Express"
|
30
|
-
cargar_valores_tarjeta(modulo,"American Express","348783429078480","1234","10",Date.today.year+1)
|
31
|
-
elsif modulo.select_list.include? "MasterCard"
|
32
|
-
cargar_valores_tarjeta(modulo,"MasterCard","5390700823285988","124","10",Date.today.year+1)
|
33
|
-
else
|
34
|
-
return "No se encuentran tarjetas validas."
|
35
|
-
end
|
36
|
-
end
|
37
|
-
modulo.text_field(:class,/input-other-bank-name/).set "galicia" if modulo.text_field(:class,/input-other-bank-name/).present?
|
38
|
-
modulo.text_field(:class,/input-owner-name/).set "Martin qa diez"
|
39
|
-
if modulo.text_field(:class,/input-owner-document-number/).present?
|
40
|
-
number = case AllPages.site
|
41
|
-
when "CL" then "70281686"
|
42
|
-
when "BR" then "48629049391"
|
43
|
-
else "32456324"
|
44
|
-
end
|
45
|
-
modulo.text_field(:class,/input-owner-document-number/).set number
|
46
|
-
end
|
47
|
-
modulo.select_list(:class,/select-owner-gender/).select_value "MALE" if modulo.select_list(:class,/select-owner-gender/).present?
|
48
|
-
#datos extras de tarjeta
|
49
|
-
cargar_billing_address(modulo)
|
50
|
-
return nil
|
51
|
-
end
|
52
|
-
|
53
|
-
def cargar_datos_pago_nuevo_formulario(modulo)
|
54
|
-
@provider = self.provider
|
55
|
-
modulo.radio(:value,'_VI').set
|
56
|
-
sleep(1)
|
57
|
-
modulo.select_list(:class,/select-card-brand/).select_value("1_CREDIT_VI_null")
|
58
|
-
modulo.text_field(:class,/input-card-number/).set("4012001021000605")
|
59
|
-
modulo.text_field(:class,/input-security-code/).set("989")
|
60
|
-
modulo.select_list(:class,/select-month/).select("12")
|
61
|
-
modulo.select_list(:class,/select-year/).select("2016")
|
62
|
-
modulo.text_field(:class,/input-other-bank-name/).set "galicia" if modulo.text_field(:class,/input-other-bank-name/).present?
|
63
|
-
modulo.text_field(:class,/input-owner-name/).set "Martin qa diez"
|
64
|
-
if modulo.text_field(:class,/input-owner-document-number/).present?
|
65
|
-
number = case AllPages.site
|
66
|
-
when "CL" then "70281686"
|
67
|
-
when "BR" then "48629049391"
|
68
|
-
else "32456324"
|
69
|
-
end
|
70
|
-
modulo.text_field(:class,/input-owner-document-number/).set number
|
71
|
-
end
|
72
|
-
modulo.select_list(:class,/select-owner-gender/).select_value "MALE" if modulo.select_list(:class,/select-owner-gender/).present?
|
73
|
-
#datos extras de tarjeta
|
74
|
-
cargar_billing_address(modulo)
|
75
|
-
return nil
|
76
|
-
end
|
77
|
-
|
78
|
-
def cargar_valores_tarjeta(modulo,tarjeta,numero,codigo,mes,ano)
|
79
|
-
modulo.select_list.select(tarjeta)
|
80
|
-
modulo.text_field(:class,/input-card-number/).set(numero)
|
81
|
-
modulo.text_field(:class,/input-security-code/).set(codigo)
|
82
|
-
modulo.select_list(:class,/select-month/).select(mes)
|
83
|
-
modulo.select_list(:class,/select-year/).select(ano)
|
84
|
-
end
|
85
|
-
|
86
|
-
def cargar_billing_address(modulo)
|
87
|
-
@provider = self.provider
|
88
|
-
if provider == "VOL"
|
89
|
-
modulo.text_field(:class,/input-city/).set "Y Ciudad" if modulo.text_field(:class,/input-city/).present?
|
90
|
-
modulo.text_field(:class,/input-street/).set "Y Calle" if modulo.text_field(:class,/input-street/).present?
|
91
|
-
elsif provider == "AIJ"
|
92
|
-
modulo.text_field(:class,/input-city/).set "ciudad" if modulo.text_field(:class,/input-city/).present?
|
93
|
-
modulo.text_field(:class,/input-street/).set "calle" if modulo.text_field(:class,/input-street/).present?
|
94
|
-
else
|
95
|
-
modulo.text_field(:class,/input-city/).set "capital" if modulo.text_field(:class,/input-city/).present?
|
96
|
-
modulo.text_field(:class,/input-street/).set "corrientes" if modulo.text_field(:class,/input-street/).present?
|
97
|
-
end
|
98
|
-
modulo.text_field(:class,/input-state/).set("algunEstado") if modulo.text_field(:class,/input-state/).present?
|
99
|
-
modulo.select_list(:class,/select-state/).select(modulo.select_list(:class,/select-state/).options[3].text) if modulo.select_list(:class,/select-state/).present?
|
100
|
-
modulo.text_field(:class,/input-address-number/).set "1234" if modulo.text_field(:class,/input-address-number/).present?
|
101
|
-
modulo.text_field(:class,/input-floor/).set "3" if modulo.text_field(:class,/input-floor/).present?
|
102
|
-
modulo.text_field(:class,/input-deparment/).set "A" if modulo.text_field(:class,/input-deparment/).present?
|
103
|
-
if AllPages.site=~/US|MX/
|
104
|
-
modulo.text_field(:class,/input-postal-code/).set "11823" if modulo.text_field(:class,/input-postal-code/).present?
|
105
|
-
else
|
106
|
-
modulo.text_field(:class,/input-postal-code/).set "1182" if modulo.text_field(:class,/input-postal-code/).present?
|
107
|
-
end
|
108
|
-
end
|
6
|
+
include NewCheckout::TwoTc::Tarjeta
|
7
|
+
|
109
8
|
end
|
110
9
|
end
|
@@ -88,22 +88,23 @@ class AllPages
|
|
88
88
|
@browser.execute_script(script)
|
89
89
|
end
|
90
90
|
|
91
|
+
def get_host
|
92
|
+
YAML.load(File.open("features/data/host.yml"))
|
93
|
+
end
|
94
|
+
|
95
|
+
def get_dominio
|
96
|
+
host = self.get_host[@@site][$ENV]
|
97
|
+
return host.gsub(/http:\/\/www\.|http:\/\/rc\.|http:\/\/ic\.|http:\/\/n\./,'')
|
98
|
+
end
|
99
|
+
|
91
100
|
def elegir_idioma()
|
92
101
|
if @@site=="US"
|
93
102
|
begin
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
if @browser.span(:class,'nibbler-header-user-menu-icon-flag nibbler--flag-US nibbler--lang-es').present?
|
100
|
-
@browser.span(:class,'nibbler-header-user-menu-icon-flag nibbler--flag-US nibbler--lang-es').click
|
101
|
-
@browser.li(:class,'nibbler-header-popup-selector-item').links[0].click
|
102
|
-
end
|
103
|
-
rescue Net::ReadTimeout
|
104
|
-
puts "Romṕio Net::ReadTimeout"
|
105
|
-
end
|
106
|
-
sleep(1)
|
103
|
+
@browser.execute_script("javascript:void(document.cookie = 'x-locale=en-US; domain=#{get_dominio}; Path=/')")
|
104
|
+
rescue
|
105
|
+
puts "No se pudo cargar el x-locale"
|
106
|
+
end
|
107
|
+
@browser.refresh
|
107
108
|
@browser.alert.ok if @browser.alert.exists?
|
108
109
|
end
|
109
110
|
end
|
@@ -113,7 +114,7 @@ class AllPages
|
|
113
114
|
when 'RESULTS' then "results-f-gui=beta"
|
114
115
|
when 'CHECKOUT' then "chkf-app=beta"
|
115
116
|
when 'LANDING' then "landing-f-gui=beta"
|
116
|
-
when 'FSM' then "fsm-search
|
117
|
+
when 'FSM' then "fsm-search-cond=beta|fsm-cheapest-cond=beta|fsm-retrieve-cond=beta"
|
117
118
|
when 'VITO' then "vito-search=beta|vito-no-search=beta"
|
118
119
|
when 'CHAS' then "chas-flight=beta"
|
119
120
|
when 'CHASCOND' then "chas-cond=beta"
|
@@ -134,16 +135,15 @@ class AllPages
|
|
134
135
|
|
135
136
|
def set_cookies(uow)
|
136
137
|
@browser.alert.ok if @browser.alert.exists?
|
137
|
-
dominio =
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
end
|
138
|
+
dominio = self.get_dominio
|
139
|
+
if $HENRY_PARAMS['hugo_viajes']
|
140
|
+
begin
|
141
|
+
@browser.execute_script("javascript:void(document.cookie = 'XDESP-HV-ENABLED=true; Path=/')")
|
142
|
+
@browser.execute_script("javascript:void(document.cookie = 'XDESP-ENABLE-PROVIDERSEARCH=true; Path=/')")
|
143
|
+
rescue
|
144
|
+
puts "No se pudo cargar los headers de hugo viaje"
|
145
|
+
end
|
146
|
+
end
|
147
147
|
begin
|
148
148
|
@browser.execute_script("javascript:void(document.cookie = 'XDESP-TEST=true; Path=/')")
|
149
149
|
rescue
|
@@ -170,6 +170,8 @@ class AllPages
|
|
170
170
|
rescue Net::ReadTimeout
|
171
171
|
@browser.send_keys :escape
|
172
172
|
end
|
173
|
+
else
|
174
|
+
@browser.refresh
|
173
175
|
end
|
174
176
|
|
175
177
|
sleep(2)
|
@@ -62,13 +62,17 @@ module Landing
|
|
62
62
|
|
63
63
|
def cargar_url(tipo,ambiente,cabotaje="nil",params={})
|
64
64
|
super(tipo,ambiente,cabotaje,params)
|
65
|
-
|
65
|
+
iniciar_itinerarios
|
66
66
|
end
|
67
67
|
|
68
68
|
def url_busqueda
|
69
69
|
self.manage_data.generate_url_landing_search(self.manage_data.city_from_1.code,self.manage_data.city_to_1.code)
|
70
70
|
end
|
71
71
|
|
72
|
+
def iniciar_itinerarios
|
73
|
+
@datos_de_itinerarios = []
|
74
|
+
end
|
75
|
+
|
72
76
|
def cargar_itinerarios
|
73
77
|
itinerarios_elements.each do |itinerario|
|
74
78
|
@datos_de_itinerarios << LandingCluster.new(tipo_de_busqueda,Hpricot.parse(itinerario.html))
|
@@ -43,6 +43,7 @@ module Results
|
|
43
43
|
element(:precio_itinerario, :span, :css=>".cluster .fare .price-currency")
|
44
44
|
element(:precio_itinerario_mx, :span, :css=>".cluster .total-price-only .price-currency")
|
45
45
|
element(:precio_itinerario_pe, :span, :css=>".cluster .fare .PEN")
|
46
|
+
element(:precio_itinerario_dolar, :span, :css=>".cluster .fare .USD")
|
46
47
|
|
47
48
|
select_list(:orden,:id=>"orderby")
|
48
49
|
select_list(:moneda,:id=>"currency")
|
@@ -10,6 +10,8 @@ module Thanks
|
|
10
10
|
p(:mensaje_eticket,:class=>"ticket-detail")
|
11
11
|
link(:descargar_eticket,:class=>"download download-button eva-button-primary-large")
|
12
12
|
|
13
|
+
spans(:precios_tarjetas,:css=>".payment-info .info .card-details")
|
14
|
+
|
13
15
|
def get_results_search_service(type="TOTALFARE")
|
14
16
|
if $HENRY_PARAMS["streaming"]
|
15
17
|
self.get_results_search_service_streaming(type)
|
data/features/support/version.rb
CHANGED
@@ -33,7 +33,7 @@ Característica: checkout.2_tc
|
|
33
33
|
Y verifico que los datos cargados sean mostrados correctamente al lado del boton comprar
|
34
34
|
Cuando acepto y compro
|
35
35
|
Entonces espero que termine el pedido de compra
|
36
|
-
Entonces espero el popup de error de tarjeta
|
36
|
+
#Entonces espero el popup de error de tarjeta
|
37
37
|
Y verifico si no trae errores
|
38
38
|
Entonces si aparece el popup de no disponibilidad, elijo un itinerario del popup de no disponibilidad
|
39
39
|
Entonces espero que termine de cargar la pagina de gracias
|
@@ -45,20 +45,20 @@ Característica: checkout.2_tc
|
|
45
45
|
Y verifico el tag de datalayer
|
46
46
|
Y verifico el pixel de trackeame en gracias
|
47
47
|
Y verifico los datos de la reserva enviados a fenix
|
48
|
-
Y
|
48
|
+
Y verifico los precios mostrados para cada tarjeta en gracias
|
49
49
|
|
50
|
-
@
|
50
|
+
@ar
|
51
51
|
@roundtrip
|
52
52
|
Ejemplos:
|
53
53
|
|pais|tipo|cabotage|
|
54
|
-
|
|
55
|
-
@
|
54
|
+
|AR |roundtrip|true|
|
55
|
+
@ar
|
56
56
|
@oneway
|
57
57
|
Ejemplos:
|
58
58
|
|pais|tipo|cabotage|
|
59
|
-
|
|
60
|
-
@
|
59
|
+
|AR |oneway|true|
|
60
|
+
@ar
|
61
61
|
@multipledestinations
|
62
62
|
Ejemplos:
|
63
63
|
|pais|tipo|cabotage|
|
64
|
-
|
|
64
|
+
|AR |multipledestinations|nil|
|
@@ -41,12 +41,12 @@ Característica: checkout.seguros
|
|
41
41
|
Ejemplos:
|
42
42
|
|pais|prov|tipo|seguro|origen|destino|cabotage|
|
43
43
|
|MX|GDS|roundtrip|chequear|MEX|MIA|nil|
|
44
|
-
|
44
|
+
#|MX|GDS|oneway|chequear|MEX|MIA|nil|
|
45
45
|
@ar
|
46
46
|
Ejemplos:
|
47
47
|
|pais|prov|tipo|seguro|origen|destino|cabotage|
|
48
48
|
|AR|GDS|roundtrip|chequear|BUE|SCL|nil|
|
49
|
-
|
49
|
+
#|AR|GDS|oneway|chequear|BUE|MIA|nil|
|
50
50
|
|
51
51
|
@seguros
|
52
52
|
Esquema del escenario: Se realiza un book con seguro incluido.
|
@@ -86,4 +86,4 @@ Característica: checkout.seguros
|
|
86
86
|
Ejemplos:
|
87
87
|
|pais|prov|tipo|seguro|origen|destino|cabotage|
|
88
88
|
|BR|GDS|roundtrip|chequear|SAO|MIA|nil|
|
89
|
-
|
89
|
+
#|BR|GDS|oneway|chequear|SAO|MIA|nil|
|
@@ -10,6 +10,7 @@ Característica: landing.negative
|
|
10
10
|
Cuando realizo la busqueda
|
11
11
|
Entonces verifico que la pagina no rompa
|
12
12
|
Y verifico que traiga resultados de landing
|
13
|
+
Cuando pruebo angular en landing
|
13
14
|
Cuando elijo el tipo de vuelo "<tipo>"
|
14
15
|
Entonces verifico que la pagina no rompa
|
15
16
|
Entonces verifico que traiga resultados de landing
|
@@ -10,6 +10,7 @@ Característica: landing.search
|
|
10
10
|
Cuando realizo la busqueda
|
11
11
|
Entonces verifico que la pagina no rompa
|
12
12
|
Y verifico que traiga resultados de landing
|
13
|
+
Cuando pruebo angular en landing
|
13
14
|
Cuando elijo el tipo de vuelo "<tipo>"
|
14
15
|
Entonces verifico que la pagina no rompa
|
15
16
|
Entonces verifico que traiga resultados de landing
|
@@ -21,60 +21,60 @@ Característica: results.orders
|
|
21
21
|
@ar
|
22
22
|
Ejemplos:
|
23
23
|
|pais|tipo|order|
|
24
|
-
|AR |oneway|
|
25
|
-
|AR |roundtrip|
|
24
|
+
|AR |oneway|TOTALFARE__ASCENDING|
|
25
|
+
|AR |roundtrip|DURATION__ASCENDING|
|
26
26
|
@br
|
27
27
|
Ejemplos:
|
28
28
|
|pais|tipo|order|
|
29
|
-
|BR |roundtrip|
|
30
|
-
|BR |oneway|
|
29
|
+
|BR |roundtrip|TOTALFARE__ASCENDING|
|
30
|
+
|BR |oneway|DURATION__ASCENDING|
|
31
31
|
@cl
|
32
32
|
Ejemplos:
|
33
33
|
|pais|tipo|order|
|
34
|
-
|CL |oneway|
|
35
|
-
|CL |roundtrip|
|
34
|
+
|CL |oneway|TOTALFARE__ASCENDING|
|
35
|
+
|CL |roundtrip|DURATION__ASCENDING|
|
36
36
|
@co
|
37
37
|
Ejemplos:
|
38
38
|
|pais|tipo|order|
|
39
|
-
|CO |roundtrip|
|
40
|
-
|CO |oneway|
|
39
|
+
|CO |roundtrip|TOTALFARE__ASCENDING|
|
40
|
+
|CO |oneway|DURATION__ASCENDING|
|
41
41
|
@cr
|
42
42
|
Ejemplos:
|
43
43
|
|pais|tipo|order|
|
44
|
-
|CR |oneway|
|
45
|
-
|CR |roundtrip|
|
44
|
+
|CR |oneway|TOTALFARE__ASCENDING|
|
45
|
+
|CR |roundtrip|DURATION__ASCENDING|
|
46
46
|
@pa
|
47
47
|
Ejemplos:
|
48
48
|
|pais|tipo|order|
|
49
|
-
|PA |oneway|
|
50
|
-
|PA |oneway|
|
49
|
+
|PA |oneway|TOTALFARE__ASCENDING|
|
50
|
+
|PA |oneway|DURATION__ASCENDING|
|
51
51
|
@ec
|
52
52
|
Ejemplos:
|
53
53
|
|pais|tipo|order|
|
54
|
-
|EC |oneway|
|
55
|
-
|EC |roundtrip|
|
54
|
+
|EC |oneway|TOTALFARE__ASCENDING|
|
55
|
+
|EC |roundtrip|DURATION__ASCENDING|
|
56
56
|
@mx
|
57
57
|
Ejemplos:
|
58
58
|
|pais|tipo|order|
|
59
|
-
|MX |oneway|
|
60
|
-
|MX |oneway|
|
59
|
+
|MX |oneway|TOTALFARE__ASCENDING|
|
60
|
+
|MX |oneway|DURATION__ASCENDING|
|
61
61
|
@pe
|
62
62
|
Ejemplos:
|
63
63
|
|pais|tipo|order|
|
64
|
-
|PE |oneway|
|
65
|
-
|PE |roundtrip|
|
64
|
+
|PE |oneway|TOTALFARE__ASCENDING|
|
65
|
+
|PE |roundtrip|DURATION__ASCENDING|
|
66
66
|
@uy
|
67
67
|
Ejemplos:
|
68
68
|
|pais|tipo|order|
|
69
|
-
|UY |oneway|
|
70
|
-
|UY |oneway|
|
69
|
+
|UY |oneway|TOTALFARE__ASCENDING|
|
70
|
+
|UY |oneway|DURATION__ASCENDING|
|
71
71
|
@us
|
72
72
|
Ejemplos:
|
73
73
|
|pais|tipo|order|
|
74
|
-
|US |oneway|
|
75
|
-
|US |roundtrip|
|
74
|
+
|US |oneway|TOTALFARE__ASCENDING|
|
75
|
+
|US |roundtrip|DURATION__ASCENDING|
|
76
76
|
@ve
|
77
77
|
Ejemplos:
|
78
78
|
|pais|tipo|order|
|
79
|
-
|VE |oneway|
|
80
|
-
|VE |oneway|
|
79
|
+
|VE |oneway|TOTALFARE__ASCENDING|
|
80
|
+
|VE |oneway|DURATION__ASCENDING|
|
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.91
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lgonzalez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|
@@ -364,6 +364,7 @@ files:
|
|
364
364
|
- features/support/modules/checkout/checkout.rb
|
365
365
|
- features/support/modules/checkout/new_checkout/2tc.rb
|
366
366
|
- features/support/modules/checkout/new_checkout/2tc/datos_de_facturacion.rb
|
367
|
+
- features/support/modules/checkout/new_checkout/2tc/tarjeta.rb
|
367
368
|
- features/support/modules/checkout/new_checkout/3dsecure.rb
|
368
369
|
- features/support/modules/checkout/new_checkout/datos_de_facturacion.rb
|
369
370
|
- features/support/modules/checkout/new_checkout/errores.rb
|