flights_gui_tests 2.4.36 → 2.4.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/features/support/classes/results/new_cluster.rb +9 -8
- data/features/support/modules/checkout/new_checkout/tarjeta.rb +6 -1
- data/features/support/modules/pages/cookies.rb +5 -13
- data/features/support/modules/results/itineraries/data.rb +3 -2
- data/features/support/modules/results/itineraries/details.rb +4 -2
- data/features/support/modules/results/itineraries/payments.rb +8 -8
- data/features/support/pages/results/search_page.rb +11 -2
- data/features/support/version.rb +1 -1
- data/features/tests/black_list/cupones.feature +1 -3
- data/features/tests/checkout/cupones.feature +41 -0
- data/features/tests/results/reviews_airlines.feature +1 -0
- 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: a08843cb58a8865128b9bb7e7f3daf01302fd8e2
|
|
4
|
+
data.tar.gz: c43894d433926151b3b2b19645cb6db3652daf59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64f5e319594c6d8d866085c2836cfe654cda7bc50b3a5c5e5d8c14a364d5f451da3ad03d856adecebeae5ce45d26d350de88519c7ae5906c9112cabb00d6d275
|
|
7
|
+
data.tar.gz: d00cf9f1ec26cfecd39a89df12e489abeea7ffea5ec3dec6b951aa77bd847e2f4aa850f836debe39f75f7cf13e193648554bba1fa815ff0c142669d9a0b1ce38
|
|
@@ -4,31 +4,32 @@ module Results
|
|
|
4
4
|
attr_accessor :ida, :vuelta, :tarifas, :idas, :vueltas
|
|
5
5
|
|
|
6
6
|
def initialize(itinerario,html,page = 0)
|
|
7
|
+
@elemento = $HENRY_PARAMS['angular'] ? "span" : "div"
|
|
7
8
|
self.cargar_precios((html/"div.fare-container"))
|
|
8
9
|
eval "#{itinerario.downcase}(html)"
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
def roundtrip(html)
|
|
12
|
-
@idas = cargar_tramos((html/"
|
|
13
|
+
@idas = cargar_tramos((html/"#{@elemento}.sub-cluster").first)
|
|
13
14
|
@ida = @idas.first
|
|
14
|
-
@vueltas = cargar_tramos((html/"
|
|
15
|
+
@vueltas = cargar_tramos((html/"#{@elemento}.sub-cluster").last)
|
|
15
16
|
@vuelta = @vueltas.first
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
def multipleoneway(html)
|
|
19
|
-
@idas = cargar_tramos((html/"
|
|
20
|
+
@idas = cargar_tramos((html/"#{@elemento}.sub-cluster").first)
|
|
20
21
|
@ida = @idas.first
|
|
21
|
-
@vueltas = cargar_tramos((html/"
|
|
22
|
+
@vueltas = cargar_tramos((html/"#{@elemento}.sub-cluster").last)
|
|
22
23
|
@vuelta = @vueltas.first
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
def oneway(html)
|
|
26
|
-
@idas = cargar_tramos((html/"
|
|
27
|
+
@idas = cargar_tramos((html/"#{@elemento}.sub-cluster").first)
|
|
27
28
|
@ida = @idas.first
|
|
28
29
|
end
|
|
29
30
|
|
|
30
31
|
def multipledestinations(html)
|
|
31
|
-
data = (html/"
|
|
32
|
+
data = (html/"#{@elemento}.sub-cluster")
|
|
32
33
|
@idas = cargar_tramos(data.first)
|
|
33
34
|
@ida = @idas.first
|
|
34
35
|
@vueltas = @idas
|
|
@@ -37,7 +38,7 @@ module Results
|
|
|
37
38
|
|
|
38
39
|
def cargar_tramos(lista_tramos)
|
|
39
40
|
tramos = Array.new
|
|
40
|
-
(lista_tramos/"
|
|
41
|
+
(lista_tramos/".cluster-item").each{ |segmento| tramos << cargar_tramo((lista_tramos/"div.data"),segmento)}
|
|
41
42
|
return tramos
|
|
42
43
|
end
|
|
43
44
|
|
|
@@ -45,7 +46,7 @@ module Results
|
|
|
45
46
|
aerolineas = (segmento/"li.airlines img").collect{|aerolinea| aerolinea.attributes['src'].match(/(..).png/)[1].upcase}
|
|
46
47
|
return DataCluster.new( (info_ruta/"span.city-departure").inner_text.strip.no_accents.gsub(/,/,''), #nombre ciudad salida
|
|
47
48
|
(info_ruta/"span.city-arrival").inner_text.strip.no_accents.gsub(/,/,''), #nombre ciudad llegada
|
|
48
|
-
(info_ruta/"span.date").inner_text.strip,
|
|
49
|
+
(info_ruta/"span.date").first.inner_text.gsub(/\n\n/,' ').strip, #fecha
|
|
49
50
|
aerolineas, #aerolineas
|
|
50
51
|
escala_to_i((segmento/"span.stops-text").inner_text.strip), #escalas
|
|
51
52
|
(info_ruta/"span.airport").first.inner_text.strip.no_accents, #iata ciudad salida
|
|
@@ -207,7 +207,12 @@ module NewCheckout
|
|
|
207
207
|
if radio.present? and !radio.disabled?
|
|
208
208
|
radio.click
|
|
209
209
|
sleep(0.5)
|
|
210
|
-
|
|
210
|
+
begin
|
|
211
|
+
total_2=Hpricot.parse(precio_final_element.html).inner_text.gsub(/\D/,'').to_i
|
|
212
|
+
rescue Watir::Exception::UnknownObjectException
|
|
213
|
+
sleep(1)
|
|
214
|
+
total_2=Hpricot.parse(precio_final_element.html).inner_text.gsub(/\D/,'').to_i
|
|
215
|
+
end
|
|
211
216
|
unless radio.attribute_value("data-regular-expressions").nil?
|
|
212
217
|
keys = JSON.parse(radio.attribute_value("data-regular-expressions")).keys
|
|
213
218
|
if interes or radio.attribute_value("class").match(/radio-with-interest/)
|
|
@@ -3,19 +3,11 @@ 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
|
-
|
|
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
|
|
6
|
+
cookie = self.recuperar_cookie("abzTestingId")
|
|
7
|
+
nuevo_valor = cookie[:value].gsub(/#{self.recuperar_valor_abtesting(nombre)}/,valor.to_s)
|
|
8
|
+
self.eliminar_cookie("abzTestingId")
|
|
9
|
+
self.agregar_cookie("abzTestingId",nuevo_valor,{:expires => cookie[:expires],:domain=>cookie[:domain]})
|
|
10
|
+
self.recuperar_cookie("abzTestingId")
|
|
19
11
|
end
|
|
20
12
|
#recupero una cookie
|
|
21
13
|
def recuperar_cookie(nombre,index=0)
|
|
@@ -10,14 +10,15 @@ module Results
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def validar_detalles_itinerario(i)
|
|
13
|
+
cluster = $HENRY_PARAMS['angular'] ? itinerarios_elements[i].div(:class,'itineraries').spans(:class,'sub-cluster') : itinerarios_elements[i].div(:class,'itineraries').divs(:class,'sub-cluster')
|
|
13
14
|
if tipo_de_busqueda != "multipledestinations"
|
|
14
|
-
outbound =
|
|
15
|
+
outbound = cluster[0].div(:class,'item data')
|
|
15
16
|
(manage_data.city_from_1.airports.include?(outbound.spans(:class,'airport')[0].text)).should be_true
|
|
16
17
|
(manage_data.city_to_1.airports.include?(outbound.spans(:class,'airport')[1].text)).should be_true
|
|
17
18
|
outbound.span(:class,'city-departure').text.no_accents.downcase.gsub(",","").strip.should equal(manage_data.city_from_1.name_lang[AllPages.lang].downcase) unless outbound.span(:class,'city-departure').text.downcase.no_accents.gsub(",","").strip.match("toluca|campinas|fort lauderdale")
|
|
18
19
|
outbound.span(:class,'city-arrival').text.no_accents.downcase.gsub(",","").strip.should match(manage_data.city_to_1.name_lang[AllPages.lang].downcase) unless outbound.span(:class,'city-arrival').text.downcase.no_accents.gsub(",","").strip.match("toluca|campinas|fort lauderdale")
|
|
19
20
|
if tipo_de_busqueda == "roundtrip"
|
|
20
|
-
inbound =
|
|
21
|
+
inbound = cluster[1].div(:class,'item data')
|
|
21
22
|
(manage_data.city_to_1.airports.include?(inbound.spans(:class,'airport')[0].text)).should be_true
|
|
22
23
|
(manage_data.city_from_1.airports.include?(inbound.spans(:class,'airport')[1].text)).should be_true
|
|
23
24
|
inbound.span(:class,'city-departure').text.no_accents.downcase.gsub(",","").strip.should match(manage_data.city_to_1.name_lang[AllPages.lang].downcase) unless inbound.span(:class,'city-departure').text.downcase.no_accents.gsub(",","").strip.match("toluca|campinas|fort lauderdale")
|
|
@@ -58,15 +58,17 @@ module Results
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def rutas_ida(itinerario)
|
|
61
|
+
cluster = $HENRY_PARAMS['angular']? itinerario.div(:class,'itineraries').spans(:class,'sub-cluster') : itinerario.div(:class,'itineraries').divs(:class,'sub-cluster')
|
|
61
62
|
if tipo_de_busqueda=="multipledestinations"
|
|
62
63
|
return []
|
|
63
64
|
else
|
|
64
|
-
return
|
|
65
|
+
return cluster[0].ul(:class,'itineraries-group cluster-items-list').lis(:class,"item itinerary cluster-item")
|
|
65
66
|
end
|
|
66
67
|
end
|
|
67
68
|
def rutas_vuelta(itinerario)
|
|
69
|
+
cluster = $HENRY_PARAMS['angular']? itinerario.div(:class,'itineraries').spans(:class,'sub-cluster') : itinerario.div(:class,'itineraries').divs(:class,'sub-cluster')
|
|
68
70
|
if tipo_de_busqueda=="roundtrip"
|
|
69
|
-
return
|
|
71
|
+
return cluster[1].ul(:class,'itineraries-group cluster-items-list').lis(:class,"item itinerary cluster-item")
|
|
70
72
|
else
|
|
71
73
|
return []
|
|
72
74
|
end
|
|
@@ -8,19 +8,19 @@ module Results
|
|
|
8
8
|
div(:popup_cuotas,:id=>"popup-payments")
|
|
9
9
|
span(:cerrar_popup_cuotas,:css=>"#popup-payments .popup-close-button")
|
|
10
10
|
|
|
11
|
-
div(:popup_cuotas_angular,:id=>"popup-payments-angular")
|
|
12
|
-
span(:cerrar_popup_cuotas_angular,:css=>"#popup-payments-angular .popup-close-button")
|
|
13
|
-
|
|
14
11
|
def validar_popup_cuotas(i)
|
|
15
12
|
if(itinerarios_elements[i].link(:text,/pagos|cuotas|installments|juros/).present?)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
setear_clusters(i)
|
|
14
|
+
itinerarios_elements[i].link(:text,/pagos|cuotas|installments|juros/).click
|
|
15
|
+
begin
|
|
16
|
+
popup_cuotas_element.when_visible(timeout=20)
|
|
17
|
+
rescue Watir::Wait::TimeoutError
|
|
18
|
+
puts "Rompe validacion de popups"
|
|
19
|
+
end
|
|
20
20
|
sleep(1)
|
|
21
21
|
popup = Hpricot.parse(popup_cuotas_element.html)
|
|
22
22
|
popup.inner_text.gsub(/\n/,'').no_accents.strip.should_not match("los datos no estan disponibles|Dados indisponiveis neste momento")
|
|
23
|
-
popup_cuotas_element.span(:class
|
|
23
|
+
popup_cuotas_element.span(:class,$HENRY_PARAMS['angular'] ? 'tooltip-close' : 'popup-close-button popup-close').click
|
|
24
24
|
popup_cuotas_element.when_not_visible(timeout=20)
|
|
25
25
|
else
|
|
26
26
|
itinerarios_elements[i].div(:class,'fare-container').text.should_not match("pagos|cuotas|installments|juros")
|
|
@@ -149,10 +149,19 @@ module Results
|
|
|
149
149
|
return @datos_de_itinerarios[index]
|
|
150
150
|
end
|
|
151
151
|
|
|
152
|
+
def setear_clusters(index)
|
|
153
|
+
if $HENRY_PARAMS['angular']
|
|
154
|
+
execute_script("javascript:void($('##{itinerarios_elements[index].spans(:class,'sub-cluster')[0].li(:class,'radio').radios[0].id}').click())") unless tipo_de_busqueda=="multipledestinations"
|
|
155
|
+
execute_script("javascript:void($('##{itinerarios_elements[index].spans(:class,'sub-cluster')[1].li(:class,'radio').radios[0].id}').click())") if tipo_de_busqueda=="roundtrip"
|
|
156
|
+
else
|
|
157
|
+
execute_script("javascript:void($('##{itinerarios_elements[index].divs(:class,'sub-cluster')[0].li(:class,'radio').radios[0].id}').click())") unless tipo_de_busqueda=="multipledestinations"
|
|
158
|
+
execute_script("javascript:void($('##{itinerarios_elements[index].divs(:class,'sub-cluster')[1].li(:class,'radio').radios[0].id}').click())") if tipo_de_busqueda=="roundtrip"
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
152
162
|
def elegir_itinerario(index)
|
|
153
163
|
cerrar_popup_alerta_element.click if cerrar_popup_alerta_element.present?
|
|
154
|
-
|
|
155
|
-
execute_script("javascript:void($('##{itinerarios_elements[index].divs(:class,'sub-cluster')[1].li(:class,'radio').radios[0].id}').click())") if tipo_de_busqueda=="roundtrip"
|
|
164
|
+
setear_clusters(index)
|
|
156
165
|
boton_comprar = itinerarios_elements[index].links(:class,/buy/).select{|boton| boton.present?}
|
|
157
166
|
begin
|
|
158
167
|
boton_comprar.first.click
|
data/features/support/version.rb
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#language: es
|
|
2
|
+
@checkout
|
|
3
|
+
Característica: checkout.cupones
|
|
4
|
+
Se verifica que la funcionalidad de la caja de cupones funcione correctamente, se realiza una compra con cupon.
|
|
5
|
+
|
|
6
|
+
@cupones
|
|
7
|
+
Esquema del escenario: Se realiza un book con un cupon de descuento, se verifica la funcionalidad correcta de la cuponera.
|
|
8
|
+
Dado como un usuario de '<pais>'
|
|
9
|
+
* ingreso una busqueda '<tipo>' del tipo '<cabotage>'
|
|
10
|
+
Cuando realizo la busqueda
|
|
11
|
+
Entonces verifico que la pagina no rompa
|
|
12
|
+
Cuando espero que termine de cargar la pagina de resultados
|
|
13
|
+
Entonces verifico que traiga resultados
|
|
14
|
+
Cuando elijo un itinerario valido y paso a checkout
|
|
15
|
+
Entonces verifico que la pagina no rompa
|
|
16
|
+
Y espero que termine de cargar la pagina de checkout
|
|
17
|
+
Y verifico que ingrese al checkout
|
|
18
|
+
Y valido los valores del desglose del checkout
|
|
19
|
+
Entonces cargo los pasajeros
|
|
20
|
+
Y completo con un cupon de descuento con numero "XXXXXXXXXX"
|
|
21
|
+
Y verifico el mensaje de cupon invalido
|
|
22
|
+
Y si permite cupon de descuento, completo con un cupon de descuento con numero "5AYOE87EBD"
|
|
23
|
+
Y si permite cupon de descuento, verifico el mensaje de cupon valido
|
|
24
|
+
Y cargo los datos de la tarjeta
|
|
25
|
+
Y si el site es "AR|MX|PE|BR", cargo los datos de facturacion
|
|
26
|
+
Y cargo los datos de contacto
|
|
27
|
+
Cuando acepto y compro
|
|
28
|
+
Entonces espero que termine el pedido de compra
|
|
29
|
+
Y verifico si no trae errores
|
|
30
|
+
Entonces si aparece el popup de no disponibilidad, elijo un itinerario del popup de no disponibilidad
|
|
31
|
+
Entonces espero que termine de cargar la pagina de gracias
|
|
32
|
+
Y verifico que ingrese a la pagina de gracias
|
|
33
|
+
Y verifico el popup de asistencia al viajero
|
|
34
|
+
Y verifico el tag de datalayer
|
|
35
|
+
Y cancelo la reserva en el proveedor
|
|
36
|
+
Y seteo la reserva como cancelada en roma
|
|
37
|
+
|
|
38
|
+
@ar
|
|
39
|
+
Ejemplos:
|
|
40
|
+
|pais|tipo|cabotage|
|
|
41
|
+
|AR |roundtrip|nil|
|
|
@@ -10,6 +10,7 @@ Característica: results.reviews_airlines
|
|
|
10
10
|
Cuando realizo la busqueda
|
|
11
11
|
Entonces verifico que la pagina no rompa
|
|
12
12
|
Cuando espero que termine de cargar la pagina de resultados
|
|
13
|
+
Cuando pruebo angular
|
|
13
14
|
Entonces verifico que traiga resultados
|
|
14
15
|
Entonces verifico las reviews de aerolineas
|
|
15
16
|
|
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.37
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- lgonzalez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: henry-container
|
|
@@ -389,6 +389,7 @@ files:
|
|
|
389
389
|
- features/tests/checkout/book_ok_ticketed.feature
|
|
390
390
|
- features/tests/checkout/braspag.feature
|
|
391
391
|
- features/tests/checkout/compatibility.feature
|
|
392
|
+
- features/tests/checkout/cupones.feature
|
|
392
393
|
- features/tests/checkout/debito.feature
|
|
393
394
|
- features/tests/checkout/error_messages.feature
|
|
394
395
|
- features/tests/checkout/fast_checkout.feature
|