flights_gui_tests 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/features/step_definitions/checkout/checkout_steps.rb +0 -4
- data/features/step_definitions/checkout/form_steps.rb +3 -0
- data/features/step_definitions/checkout/load_steps.rb +1 -1
- data/features/step_definitions/checkout/verifications_steps.rb +45 -0
- data/features/step_definitions/results/results_steps.rb +1 -1
- data/features/step_definitions/tags_steps.rb +6 -0
- data/features/support/modules/checkout/tarjeta.rb +33 -7
- data/features/support/modules/pages/tags.rb +5 -0
- data/features/support/pages/all_pages.rb +2 -0
- data/features/support/pages/results/search_page.rb +1 -1
- data/features/tests/checkout/book_ok.feature +2 -1
- data/features/tests/checkout/cac.feature +14 -1
- data/features/tests/checkout/providers.feature +0 -2
- data/flights_gui_tests.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d5ce688e70c5df4e709ce5d228aa69157ad87f0
|
|
4
|
+
data.tar.gz: a7da20c2afa545fae8821a0b27c142a9fb8c521b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce12b370aa37a31e4bbdc1a0fd2ab3757063f0aebcaa6aeaff738d718fe3dac66bf739f72250a193b001d34f7cba4c15158aa52458d3653b96c54ba484fbf1ce
|
|
7
|
+
data.tar.gz: 2c098d1b41ee3a160fb1513ab7de60e1ed06a8522c9c07677c6b0321f5eeec7013763e158fae04b8b42d58471a9cbb7dcd92d13db205c58ba4cc8a75ad741ca4
|
|
@@ -68,10 +68,6 @@ Entonces(/^verifico los datos de agencia afiliada$/) do
|
|
|
68
68
|
@page.elegir_otro_vuelo_element.should_not visible
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
Entonces(/^completo los datos para reservas CAC$/) do
|
|
72
|
-
@page.cargar_datos_CAC
|
|
73
|
-
end
|
|
74
|
-
|
|
75
71
|
Entonces(/^el checkout me pide mas datos de tarjeta$/) do
|
|
76
72
|
text = @page.notificacion_warning_element.text if @page.notificacion_warning_element.present?
|
|
77
73
|
@page.notificacion_warning_element.should visible(text)
|
|
@@ -12,6 +12,9 @@ Y(/^cargo los datos de facturacion$/) do
|
|
|
12
12
|
end
|
|
13
13
|
@page.cargar_datos_facturacion
|
|
14
14
|
end
|
|
15
|
+
Entonces(/^completo los datos para reservas CAC$/) do
|
|
16
|
+
@page.cargar_datos_CAC
|
|
17
|
+
end
|
|
15
18
|
Y(/^cargo los datos de contacto$/) do
|
|
16
19
|
@page.cargar_datos_de_contacto
|
|
17
20
|
end
|
|
@@ -30,7 +30,7 @@ end
|
|
|
30
30
|
|
|
31
31
|
Y(/^verifico si no trae errores$/) do
|
|
32
32
|
if @page.notificacion_warning_ux_element.present?
|
|
33
|
-
pending(@page.notificacion_warning_ux_element.text)
|
|
33
|
+
pending(@page.notificacion_warning_ux_element.text) unless @popup_no_disponibilidad_page or @page.checkout_id_element.present? or @page.checkout_id_cash_element.present?
|
|
34
34
|
end
|
|
35
35
|
if @page.notificacion_error_element.present?
|
|
36
36
|
pending(@page.notificacion_error_element.text)
|
|
@@ -34,3 +34,48 @@ end
|
|
|
34
34
|
Cuando(/^verifico que los precios de las cuotas se muestran correctamente$/) do
|
|
35
35
|
@page.verificar_tipos_de_pago
|
|
36
36
|
end
|
|
37
|
+
|
|
38
|
+
Y(/^verifico que no se muestre la opcion de reserva CAC en BR$/) do
|
|
39
|
+
@page.browser.execute_script("javascript:void(function(){ShowButtonCAC();})();")
|
|
40
|
+
begin
|
|
41
|
+
Watir::Wait.until(timeout=10){@page.browser.alert.exists?}
|
|
42
|
+
rescue Watir::Wait::TimeoutError
|
|
43
|
+
@page.browser.alert.exists?.should be_true
|
|
44
|
+
end
|
|
45
|
+
@page.browser.alert.text.no_accents.should match("Esta operacao nao pode ser realizado com a linha aerea seleccionada")
|
|
46
|
+
@page.browser.alert.ok
|
|
47
|
+
step "verifico que ingrese al checkout"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
Y(/^verifico que los datos cargados sean mostrados correctamente al lado del boton comprar$/) do
|
|
51
|
+
doc = Hpricot.parse(@page.html)
|
|
52
|
+
data = ["A","B","C","D","E","F","G","H","I","J","k"]
|
|
53
|
+
index = 0
|
|
54
|
+
@page.manage_data.adt.times do |adulto|
|
|
55
|
+
(doc/"div.ticket-left li.passenger span.names span.first-name")[index].inner_text.should equal("Diego QA#{data[index]}")
|
|
56
|
+
(doc/"div.ticket-left li.passenger span.names span.last-name")[index].inner_text.should equal("Romero#{data[index]}")
|
|
57
|
+
(doc/"div.ticket-left li.passenger span.document span.document-number")[index].inner_text.should equal("3245673#{index}") if (doc/"div.ticket-left li.passenger span.document span.document-number")[index]
|
|
58
|
+
index += 1
|
|
59
|
+
end
|
|
60
|
+
@page.manage_data.cnn.times do |nino|
|
|
61
|
+
(doc/"div.ticket-left li.passenger span.names span.first-name")[index].inner_text.should equal("Martin QA#{data[index]}")
|
|
62
|
+
(doc/"div.ticket-left li.passenger span.names span.last-name")[index].inner_text.should equal("Diez jr#{data[index]}")
|
|
63
|
+
(doc/"div.ticket-left li.passenger span.document span.document-number")[index].inner_text.should equal("4245663#{index}") if (doc/"div.ticket-left li.passenger span.document span.document-number")[index]
|
|
64
|
+
index += 1
|
|
65
|
+
end
|
|
66
|
+
@page.manage_data.inf.times do |bebe|
|
|
67
|
+
(doc/"div.ticket-left li.passenger span.names span.first-name")[index].inner_text.should equal("Maribel QA#{data[index]}")
|
|
68
|
+
(doc/"div.ticket-left li.passenger span.names span.last-name")[index].inner_text.should equal("Dias Herr jrb#{data[index]}")
|
|
69
|
+
(doc/"div.ticket-left li.passenger span.document span.document-number")[index].inner_text.should equal("4249966#{index}") if (doc/"div.ticket-left li.passenger span.document span.document-number")[index]
|
|
70
|
+
index += 1
|
|
71
|
+
end
|
|
72
|
+
if @page.tipo_de_busqueda!="multipledestinations"
|
|
73
|
+
Date.parse_new_result((doc/"div.ticket-right div.dates li.outbound-route span.date").inner_text).should equal(@itinerario_checkout.ida.fecha)
|
|
74
|
+
Date.parse_new_result((doc/"div.ticket-right div.dates li.inbound-route span.date").inner_text).should equal(@itinerario_checkout.vuelta.fecha) if @page.tipo_de_busqueda=="roundtrip"
|
|
75
|
+
else
|
|
76
|
+
fechas=@itinerario_checkout.idas.collect{|ida| ida.fecha}.uniq
|
|
77
|
+
(doc/"div.ticket-right div.dates li.outbound-route span.date").each do |fecha|
|
|
78
|
+
fechas.should include?(Date.parse_new_result(fecha.inner_text))
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -19,7 +19,7 @@ end
|
|
|
19
19
|
|
|
20
20
|
Cuando(/^elijo un itinerario y paso a checkout$/) do
|
|
21
21
|
@page.cargar_itinerarios
|
|
22
|
-
@index, permitida = @page.sanear_itinerarios(["DL"
|
|
22
|
+
@index, permitida = @page.sanear_itinerarios(["DL"])
|
|
23
23
|
pending("No se encontraron vuelos de aerolineas permitidas") unless permitida
|
|
24
24
|
@itinerario_resultados = @page.elegir_itinerario(@index)
|
|
25
25
|
end
|
|
@@ -191,4 +191,10 @@ Y(/^verifico el segundo tag de google en resultado de gracias$/) do
|
|
|
191
191
|
elsif @page.tipo_de_busqueda.downcase == "roundtrip"
|
|
192
192
|
tmp['google_custom_params'].should match("{ CustomA: '#{AllPages.site}',CustomB: 'D',CustomC: '5',CustomD: '1',CustomCD: '5-1',CustomE: '#{@page.manage_data.city_from_1.code}',CustomF: '#{@page.manage_data.city_to_1.code}',CustomG: '.',CustomH: '.',CustomI: '.',CustomJ: '#{@page.manage_data.date_from_1}',CustomK: '....\-..\-..',CustomO: '..'}")
|
|
193
193
|
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
Y(/^verifico el pixel de doubleclick/) do
|
|
197
|
+
pixel_doubleclick = @page.buscar_elemento_por_atributo("iframe","src","fls.doubleclick").first
|
|
198
|
+
pixel_doubleclick.should be_true
|
|
199
|
+
pixel_doubleclick.attributes['src'].should equal("https://4487021.fls.doubleclick.net/activityi;src=4487021;type=sales;cat=MEmL6cH6;qty=#{@page.manage_data.get_childrens+@page.manage_data.adt};cost=0;u1=BRL;u3=[PRODUCT];ord=#{@id_reserva}?")
|
|
194
200
|
end
|
|
@@ -48,6 +48,8 @@ module Checkout
|
|
|
48
48
|
li(:medio_de_subpago_seleccionado,:css=>".list .sub-selected")
|
|
49
49
|
|
|
50
50
|
def cargar_datos_tarjeta
|
|
51
|
+
data = self.manage_data.get_results_search_service
|
|
52
|
+
provider = data["result"]["data"]["items"][0]["provider"]
|
|
51
53
|
if AllPages.site=="AR"
|
|
52
54
|
select_un_pago_argentina
|
|
53
55
|
else
|
|
@@ -57,12 +59,26 @@ module Checkout
|
|
|
57
59
|
select_un_pago
|
|
58
60
|
end
|
|
59
61
|
end
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
if provider == "VOL"
|
|
63
|
+
tarjeta_element.select("American Express")
|
|
64
|
+
numero_tarjeta_element.set("345678000000007")
|
|
65
|
+
codigo_seguridad_tarjeta_element.set("1234")
|
|
66
|
+
mes_vencimiento_tarjeta_element.select('10')
|
|
67
|
+
ano_vencimiento_tarjeta_element.select(Date.today.year+1)
|
|
68
|
+
elsif provider == "AIJ"
|
|
69
|
+
tarjeta_element.select("Visa")
|
|
70
|
+
numero_tarjeta_element.set("4012001021000605")
|
|
71
|
+
codigo_seguridad_tarjeta_element.set("989")
|
|
72
|
+
mes_vencimiento_tarjeta_element.select('12')
|
|
73
|
+
ano_vencimiento_tarjeta_element.select('2014')
|
|
74
|
+
else
|
|
75
|
+
tarjeta_element.select "Visa"
|
|
76
|
+
numero_tarjeta_element.set "4242424242424242"
|
|
77
|
+
mes_vencimiento_tarjeta_element.select 5
|
|
78
|
+
ano_vencimiento_tarjeta_element.select(Date.today.year+1)
|
|
79
|
+
codigo_seguridad_tarjeta_element.set "123"
|
|
80
|
+
end
|
|
63
81
|
banco_emisor_element.set "galicia" if banco_emisor_element.present?
|
|
64
|
-
ano_vencimiento_tarjeta_element.select 2017
|
|
65
|
-
codigo_seguridad_tarjeta_element.set "123"
|
|
66
82
|
tipo_titular_tarjeta_value = "PERSON" if tipo_titular_tarjeta_element.present?
|
|
67
83
|
nombre_titular_tarjeta_element.set "Martin qa diez"
|
|
68
84
|
if documento_titular_tarjeta_element.present?
|
|
@@ -96,9 +112,19 @@ module Checkout
|
|
|
96
112
|
end
|
|
97
113
|
|
|
98
114
|
def cargar_datos_extras_de_tarjeta
|
|
115
|
+
data = self.manage_data.get_results_search_service
|
|
116
|
+
provider = data["result"]["data"]["items"][0]["provider"]
|
|
117
|
+
if provider == "VOL"
|
|
118
|
+
ciudad_entrega_tarjeta_element.set "Y Ciudad" if ciudad_entrega_tarjeta_element.present?
|
|
119
|
+
calle_entrega_tarjeta_element.set "Y Calle" if calle_entrega_tarjeta_element.present?
|
|
120
|
+
elsif provider == "AIJ"
|
|
121
|
+
ciudad_entrega_tarjeta_element.set "ciudad" if ciudad_entrega_tarjeta_element.present?
|
|
122
|
+
calle_entrega_tarjeta_element.set "calle" if calle_entrega_tarjeta_element.present?
|
|
123
|
+
else
|
|
124
|
+
ciudad_entrega_tarjeta_element.set "capital" if ciudad_entrega_tarjeta_element.present?
|
|
125
|
+
calle_entrega_tarjeta_element.set "corrientes" if calle_entrega_tarjeta_element.present?
|
|
126
|
+
end
|
|
99
127
|
estado_entrega_tarjeta_element.select(estado_entrega_tarjeta_options[3]) if estado_entrega_tarjeta_element.present?
|
|
100
|
-
ciudad_entrega_tarjeta_element.set "capital" if ciudad_entrega_tarjeta_element.present?
|
|
101
|
-
calle_entrega_tarjeta_element.set "corrientes" if calle_entrega_tarjeta_element.present?
|
|
102
128
|
numero_entrega_tarjeta_element.set "1234" if numero_entrega_tarjeta_element.present?
|
|
103
129
|
piso_entrega_tarjeta_element.set "3" if piso_entrega_tarjeta_element.present?
|
|
104
130
|
depto_entrega_tarjeta_element.set "A" if depto_entrega_tarjeta_element.present?
|
|
@@ -23,6 +23,7 @@ Característica: checkout.book_ok
|
|
|
23
23
|
Y cargo los datos de la tarjeta
|
|
24
24
|
Y si el site es "AR|MX|PE", cargo los datos de facturacion
|
|
25
25
|
Y cargo los datos de contacto
|
|
26
|
+
Y verifico que los datos cargados sean mostrados correctamente al lado del boton comprar
|
|
26
27
|
Cuando acepto y compro
|
|
27
28
|
Entonces espero que termine el pedido de compra
|
|
28
29
|
Y verifico si no trae errores
|
|
@@ -34,7 +35,7 @@ Característica: checkout.book_ok
|
|
|
34
35
|
Y verifico los valores del desglose en gracias contra los del checkout
|
|
35
36
|
Y verifico el tag de datalayer
|
|
36
37
|
Y verifico el pixel de Efrontier
|
|
37
|
-
|
|
38
|
+
Y si el site es "BR", verifico el pixel de doubleclick
|
|
38
39
|
@ar
|
|
39
40
|
@roundtrip
|
|
40
41
|
Ejemplos:
|
|
@@ -39,11 +39,24 @@ Característica: checkout.cac
|
|
|
39
39
|
Ejemplos:
|
|
40
40
|
|pais|tipo|cabotage|
|
|
41
41
|
|AR |multipledestinations|nil|
|
|
42
|
+
|
|
43
|
+
@cac
|
|
44
|
+
Esquema del escenario: Se realiza un book con reserva CAC. Verificando que no haya errores.
|
|
45
|
+
Dado una pagina de resultados en "<pais>" para una busqueda "<tipo>" del tipo "<cabotage>"
|
|
46
|
+
Entonces verifico que la pagina no rompa
|
|
47
|
+
Cuando espero que termine de cargar la pagina de resultados
|
|
48
|
+
Entonces verifico que traiga resultados
|
|
49
|
+
Cuando elijo un itinerario y paso a checkout
|
|
50
|
+
Cuando espero que termine de cargar la pagina de checkout
|
|
51
|
+
Entonces verifico que ingrese al checkout
|
|
52
|
+
Y verifico que la pagina no rompa
|
|
53
|
+
Y verifico que no se muestre la opcion de reserva CAC en BR
|
|
54
|
+
|
|
42
55
|
@br
|
|
43
56
|
@roundtrip
|
|
44
57
|
Ejemplos:
|
|
45
58
|
|pais|tipo|cabotage|
|
|
46
|
-
|BR |roundtrip|
|
|
59
|
+
|BR |roundtrip|nil|
|
|
47
60
|
@br
|
|
48
61
|
@oneway
|
|
49
62
|
Ejemplos:
|
|
@@ -44,10 +44,8 @@ Característica: checkout.providers
|
|
|
44
44
|
|US|roundtrip|true|VOL|MEX|CUN|2014-06-28|2014-06-17|
|
|
45
45
|
|US|oneway|true|VOL|LAX|CUN|2014-06-28|2014-07-17|
|
|
46
46
|
|US|roundtrip|true|VOL|MEX|LAX|2014-06-01|2014-06-15|
|
|
47
|
-
|US|oneway|true|VOL|MEX|GDL|2014-06-19|2014-06-27|
|
|
48
47
|
|MX|roundtrip|true|VOL|MEX|MTY|2014-02-28|2014-03-17|
|
|
49
48
|
|MX|oneway|true|VOL|MEX|GDL|2014-03-28|2014-04-17|
|
|
50
|
-
|MX|roundtrip|true|VOL|MEX|CUN|2014-03-01|2014-03-15|
|
|
51
49
|
|MX|oneway|true|VOL|MEX|CUN|2014-02-19|2014-02-27|
|
|
52
50
|
@aij
|
|
53
51
|
Ejemplos:
|
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.27' #La version se debe incrementar cada vez que se desea publicar una nueva version del test.
|
|
19
19
|
|
|
20
20
|
gem.add_dependency('henry-container', '>= 0.1.39')
|
|
21
21
|
gem.add_dependency('page-object')
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: flights_gui_tests
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.27
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- lgonzalez,lsimean
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-08-
|
|
11
|
+
date: 2014-08-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: henry-container
|