flights_gui_tests 1.0.3 → 1.0.4
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/results/matrix_steps.rb +1 -1
- data/features/step_definitions/results/results_steps.rb +2 -2
- data/features/step_definitions/results/wish_list_steps.rb +1 -1
- data/features/step_definitions/thanks/thanks_steps.rb +1 -1
- data/features/support/classes/checkout/{cluster.rb → old_cluster.rb} +1 -1
- data/features/support/classes/checkout/render_cluster.rb +1 -1
- data/features/support/classes/clusters.rb +3 -3
- data/features/support/classes/landing/cluster.rb +1 -1
- data/features/support/classes/results/old_cluster.rb +172 -0
- data/features/support/classes/results/{details_cluster.rb → old_details_cluster.rb} +1 -1
- data/features/support/env.rb +0 -1
- data/features/support/modules/browser.rb +4 -4
- data/features/support/modules/results/filters.rb +94 -30
- data/features/support/modules/results/itineraries/details.rb +1 -1
- data/features/support/modules/results/itineraries/miles.rb +0 -1
- data/features/support/pages/checkout/checkout_page/old_checkout_page.rb +1 -1
- data/features/support/pages/landing/search_page.rb +2 -2
- data/features/support/pages/results/search_page.rb +10 -10
- data/features/support/pages/thanks/thanks_page.rb +1 -1
- data/features/tests/results/filters.feature +73 -49
- data/flights_gui_tests.gemspec +1 -1
- data/henry-context.yml +6 -35
- metadata +5 -7
- data/features/support/classes/results/cluster.rb +0 -170
- data/features/support/modules/results/new_filters.rb +0 -117
- data/features/tests/results/new_filters.feature +0 -119
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71eb114e8cbbc73021f12cd072a767309af0ea73
|
4
|
+
data.tar.gz: 74ef4513f2b6a312c245a55775bd696ca1181333
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e6b99bd8c97d0439892c6f92c3b01cef027e6393aa08264652fb6f3c3368e57e3bfcda4bacce0fd5d97fbd77872e5370620b65cd6e372e83383e19f0f8e6eba
|
7
|
+
data.tar.gz: 3a5929771aba2b6951466e9c10591ab764389dd6a8d349e9faea13e01606037ad8e00dd21d1414ceaf4ff1d22fee48699b56bfa1d5af08ec5d6c22daa51e9557
|
@@ -100,7 +100,7 @@ end
|
|
100
100
|
|
101
101
|
Cuando(/^(?:verifico|valido) que los datos mostrados en la matriz sean correctos$/) do
|
102
102
|
doc = Hpricot.parse(@page.matriz_fare_chart_element.html)
|
103
|
-
first_value =
|
103
|
+
first_value = Results::OldCluster.new(@page.tipo_de_busqueda, Hpricot.parse(@page.itinerarios_elements.first.html))
|
104
104
|
max_value = (doc/"div.fare-chart-content div.fare-chart-main div.fare-chart-values-container div.fare-chart-value span.#{Helpers.currency(AllPages.site)} span.amount")[0]
|
105
105
|
(first_value.tarifas['tarifa_adulto'].value <= max_value.inner_text.gsub(/\./,"").to_i).should be_true
|
106
106
|
#para usar despues
|
@@ -34,7 +34,6 @@ Cuando(/^elijo un itinerario del proveedor "(.*)" y paso a checkout$/) do |prov|
|
|
34
34
|
end
|
35
35
|
|
36
36
|
Entonces(/^recorro y (?:verifico|valido) cada itinerario$/) do
|
37
|
-
byebug
|
38
37
|
json = @page.manage_data.get_results_search_service("TOTALFARE")
|
39
38
|
@page.cerrar_popup_alerta_element.click if @page.cerrar_popup_alerta_element.present?
|
40
39
|
@page.cerrar_popup_cantidad_visitantes_element.click if @page.cerrar_popup_cantidad_visitantes_element.present?
|
@@ -57,7 +56,7 @@ Y(/^(?:verifico|valido) el popup de alertas$/) do
|
|
57
56
|
@page.boton_alertas_element.click
|
58
57
|
@page.popup_alertas_element.when_visible(timeout=20)
|
59
58
|
@page.popup_alertas_element.should visible
|
60
|
-
@page.
|
59
|
+
@page.browser.execute_script("javascript:void($('#nibbler-subscriptions .nibbler-common-overlay-close').click());")
|
61
60
|
sleep(1)
|
62
61
|
end
|
63
62
|
end
|
@@ -85,5 +84,6 @@ end
|
|
85
84
|
Y(/^cierro popups$/)do
|
86
85
|
sleep(1)
|
87
86
|
@page.cerrar_popup_destino_hot_element.click if @page.popup_destino_hot_element.present?
|
87
|
+
@page.cerrar_popup_destino_hot_LOW_element.click if @page.popup_destino_hot_LOW_element.present?
|
88
88
|
@page.cerrar_mensaje_cancelacion_element.click if @page.mensaje_cancelacion_element.present?
|
89
89
|
end
|
@@ -68,7 +68,7 @@ Cuando(/^elijo un itinerario como deseado$/) do
|
|
68
68
|
@page.primera_opcion_vuelta_element.click if @page.primera_opcion_vuelta_element.present?
|
69
69
|
@page.icono_favoritos_cluster_element.should visible("icono de deseado")
|
70
70
|
@page.icono_favoritos_cluster_element.click
|
71
|
-
cluster =
|
71
|
+
cluster = Results::OldCluster.new(@page.tipo_de_busqueda,Hpricot.parse(@page.itinerarios_elements.first.html))
|
72
72
|
end
|
73
73
|
|
74
74
|
Entonces(/^verifico que el itinerario deseado quede marcado$/) do
|
@@ -35,7 +35,7 @@ Entonces(/^(?:verifico|valido) los datos del vuelo comprado$/) do
|
|
35
35
|
begin
|
36
36
|
@page.popup_desglose_detalles_gracias_element.when_visible(timeout=20)
|
37
37
|
doc = Hpricot.parse(@page.popup_desglose_detalles_gracias_element.html)
|
38
|
-
detail =
|
38
|
+
detail = OldDetailsCluster.new(doc)
|
39
39
|
@page.cerrar_popup_desglose_detalles_gracias_element.click
|
40
40
|
@page.popup_desglose_detalles_gracias_element.when_not_visible(visible=20)
|
41
41
|
sleep(1)
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
# carga de clases de cluster
|
3
3
|
require_relative 'data/data'
|
4
|
-
require_relative 'results/
|
5
|
-
require_relative 'results/
|
4
|
+
require_relative 'results/old_cluster'
|
5
|
+
require_relative 'results/old_details_cluster'
|
6
6
|
require_relative 'results/new_cluster'
|
7
7
|
require_relative 'results/new_details_cluster'
|
8
|
-
require_relative 'checkout/
|
8
|
+
require_relative 'checkout/old_cluster'
|
9
9
|
require_relative 'checkout/new_cluster'
|
10
10
|
require_relative 'checkout/render_cluster'
|
11
11
|
require_relative 'landing/cluster'
|
@@ -0,0 +1,172 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
module Results
|
3
|
+
class OldCluster
|
4
|
+
|
5
|
+
attr_accessor :ida, :vuelta, :tarifas, :idas, :vueltas
|
6
|
+
|
7
|
+
def initialize(itinerario,html,page = 0)
|
8
|
+
eval "#{itinerario.downcase}(html)"
|
9
|
+
self.load_prices((html/"div.fare-container"))
|
10
|
+
end
|
11
|
+
|
12
|
+
def roundtrip(html)
|
13
|
+
self.load_data_from((html/"div.itineraries div[@class='sub-cluster outbound']"))
|
14
|
+
self.load_data_to((html/"div.itineraries div[@class='sub-cluster inbound']"))
|
15
|
+
end
|
16
|
+
def oneway(html)
|
17
|
+
self.load_data_from((html/"div.itineraries//div[@class='sub-cluster outbound']"))
|
18
|
+
@nro_vuelo_vuelta = -1
|
19
|
+
end
|
20
|
+
def multipledestinations(html)
|
21
|
+
self.load_data_from((html/"div.itineraries//div[@class='sub-cluster multiple']"))
|
22
|
+
self.load_data_to((html/"div.itineraries//div[@class='sub-cluster multiple']").last)
|
23
|
+
end
|
24
|
+
def load_data_from(div_datos)
|
25
|
+
@idas = Array.new
|
26
|
+
(div_datos/"li.itinerary").each do |div_datos_ida|
|
27
|
+
duracion = (div_datos_ida/"li.time").inner_text.strip
|
28
|
+
origen = (div_datos/"span.city-departure").first.inner_text.gsub(/,/,'').strip.no_accents
|
29
|
+
destino= (div_datos/"span.city-arrival").first.inner_text.gsub(/,/,'').strip.no_accents
|
30
|
+
origen_iata = (div_datos/"a")[0].inner_text.strip
|
31
|
+
destino_iata = (div_datos/"a")[1].inner_text.strip
|
32
|
+
fecha = (div_datos/"span.date").first.empty? ? (div_datos_ida/"li.date").first.inner_text.strip.no_accents : (div_datos/"span.date").first.inner_text.strip.no_accents
|
33
|
+
escala = (div_datos_ida/"li.stops/a").inner_text.strip.empty? ? "Sin escalas" : (div_datos_ida/"li.stops/a").inner_text.to_i
|
34
|
+
aerolinea = Array.new
|
35
|
+
i = 0
|
36
|
+
(div_datos_ida/"li.airlinesShort//img").each do |aer|
|
37
|
+
aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
|
38
|
+
i = i + 1
|
39
|
+
end
|
40
|
+
(div_datos_ida/"li.airlines//img").each do |aer|
|
41
|
+
aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
|
42
|
+
i = i + 1
|
43
|
+
end
|
44
|
+
hou_sal_ida = Time.parse((div_datos_ida/"li.leave span.hour").inner_text.strip)
|
45
|
+
hou_lle_ida = Time.parse((div_datos_ida/"li.arrive span.hour").inner_text.strip)
|
46
|
+
@idas << DataCluster.new(origen,destino,fecha, aerolinea, escala_to_i(escala),origen_iata,destino_iata,hou_sal_ida,hou_lle_ida,duracion)
|
47
|
+
end
|
48
|
+
@nro_vuelo_ida = 0
|
49
|
+
@ida = @idas[@nro_vuelo_ida]
|
50
|
+
end
|
51
|
+
def load_data_to(div_datos)
|
52
|
+
@vueltas = Array.new
|
53
|
+
(div_datos/"li.itinerary").each do |div_datos_vuelta|
|
54
|
+
duracion = (div_datos_vuelta/"li.time").inner_text.strip
|
55
|
+
origen = (div_datos/"span.city-departure").first.inner_text.gsub(/,/,'').strip.no_accents
|
56
|
+
destino= (div_datos/"span.city-arrival").first.inner_text.gsub(/,/,'').strip.no_accents
|
57
|
+
origen_iata = (div_datos/"a")[0].inner_text.strip
|
58
|
+
destino_iata = (div_datos/"a")[1].inner_text.strip
|
59
|
+
fecha = (div_datos/"span.date").last.empty? ? (div_datos_vuelta/"li.date").last.inner_text.strip.no_accents : (div_datos/"span.date").last.inner_text.strip.no_accents
|
60
|
+
escala = (div_datos_vuelta/"li.stops/a").inner_text.strip.empty? ? "Sin escalas" : (div_datos_vuelta/"li.stops/a").inner_text.to_i
|
61
|
+
aerolinea = Array.new
|
62
|
+
i = 0
|
63
|
+
(div_datos_vuelta/"li.airlinesShort//img").each do |aer|
|
64
|
+
aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
|
65
|
+
i = i + 1
|
66
|
+
end
|
67
|
+
(div_datos_vuelta/"li.airlines//img").each do |aer|
|
68
|
+
aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
|
69
|
+
i = i + 1
|
70
|
+
end
|
71
|
+
hou_sal_ida = Time.parse((div_datos_vuelta/"li.leave span.hour").inner_text.strip)
|
72
|
+
hou_lle_ida = Time.parse((div_datos_vuelta/"li.arrive span.hour").inner_text.strip)
|
73
|
+
@vueltas << DataCluster.new(origen,destino,fecha, aerolinea, escala_to_i(escala),origen_iata,destino_iata,hou_sal_ida,hou_lle_ida,duracion)
|
74
|
+
end
|
75
|
+
@nro_vuelo_vuelta = 0
|
76
|
+
@vuelta = @vueltas[@nro_vuelo_vuelta]
|
77
|
+
end
|
78
|
+
|
79
|
+
def load_prices(p_html)
|
80
|
+
|
81
|
+
@tarifas = Hash.new
|
82
|
+
@tarifas['tarifa_adulto_dolar'] = Price.new((p_html/"span.price-currency span.currency").first.inner_text.strip + " " + (p_html/"span.price-currency span.amount").first.inner_text.strip)
|
83
|
+
if (p_html/"span[@class='price-currency #{Helpers.currency(AllPages.site)} '] span.currency").first
|
84
|
+
@tarifas['tarifa_adulto'] = Price.new((p_html/"span[@class='price-currency #{Helpers.currency(AllPages.site)} '] span.currency").first.inner_text.strip + " " + (p_html/"span[@class='price-currency #{Helpers.currency(AllPages.site)} '] span.amount").first.inner_text.strip)
|
85
|
+
else
|
86
|
+
@tarifas['tarifa_adulto'] = @tarifas['tarifa_adulto_dolar']
|
87
|
+
end
|
88
|
+
|
89
|
+
adt = (p_html/"li").select{|li| li.inner_text.no_accents.downcase =~ /adulto/}.first
|
90
|
+
@tarifas['adt'] = adt ? Price.new((adt/"span.currency").first.inner_text.strip + " " + (adt/"span.amount").first.inner_text.strip) : Price.new("$ 0",true)
|
91
|
+
|
92
|
+
cnn = (p_html/"li").select{|li| li.inner_text.no_accents.downcase =~ /nino/}.first
|
93
|
+
@tarifas['cnn'] = cnn ? Price.new((cnn/"span.currency").first.inner_text.strip + " " + (cnn/"span.amount").first.inner_text.strip) : Price.new("$ 0",true)
|
94
|
+
|
95
|
+
inf = (p_html/"li").select{|li| li.inner_text.no_accents.downcase =~ /bebe/}.first
|
96
|
+
@tarifas['inf'] = inf ? Price.new((inf/"span.currency").first.inner_text.strip + " " + (inf/"span.amount").first.inner_text.strip) : Price.new("$ 0",true)
|
97
|
+
|
98
|
+
tasas = (p_html/"li.taxes-price").empty? ? (p_html/"li[@class='taxDetail.OTHER-price']").first : (p_html/"li.taxes-price").first
|
99
|
+
@tarifas['tasas'] = tasas ? Price.new((tasas/"span.currency").first.inner_text.strip + " " + (tasas/"span.amount").first.inner_text.strip,true) : Price.new("$ 0",true)
|
100
|
+
|
101
|
+
cargos = (p_html/"li.charges-price").first
|
102
|
+
@tarifas['cargos'] = cargos ? Price.new((cargos/"span.currency").first.inner_text.strip + " " + (cargos/"span.amount").first.inner_text.strip,true) : Price.new("$ 0",true)
|
103
|
+
|
104
|
+
afip = (p_html/"li[@class='taxDetail.ZK-price']").first
|
105
|
+
@tarifas['afip'] = afip ? Price.new((afip/"span.currency").first.inner_text.strip + " " + (afip/"span.amount").first.inner_text.strip,true) : Price.new("$ 0",true)
|
106
|
+
|
107
|
+
@tarifas['encargos'] = Price.new("$ 0",true)
|
108
|
+
|
109
|
+
campo = (p_html/"li").empty? ? "total" : "fare"
|
110
|
+
@tarifas['total'] = (p_html/"li.#{campo}-price span.currency").empty? ? Price.new("$ 0",true) : Price.new((p_html/"li.#{campo}-price span.currency").first.inner_text.strip + " " + (p_html/"li.#{campo}-price span.amount").first.inner_text.strip)
|
111
|
+
end
|
112
|
+
|
113
|
+
def validarSumaDesgloce(linea = "total|tarifa_adulto")
|
114
|
+
|
115
|
+
sumaTarifas = 0
|
116
|
+
@tarifas.each_pair do |key,tarifa|
|
117
|
+
if key !~ /#{linea}/
|
118
|
+
sumaTarifas += tarifa.valor
|
119
|
+
end
|
120
|
+
if @tarifas['total'] and (tarifa.valor > @tarifas['total'].valor) and (linea !~ /tarifa_adulto/)
|
121
|
+
true.should be_true
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
if @tarifas['total'] and ((sumaTarifas.to_i - @tarifas['total'].valor.to_i) > 3)
|
126
|
+
true.should be_true
|
127
|
+
end
|
128
|
+
|
129
|
+
end
|
130
|
+
def validarEcuacionTarifasPorCantidadDePasajeros(cant)
|
131
|
+
unless @tarifas['adt'].valor.zero?
|
132
|
+
(@tarifas['adt'].valor == @tarifas['tarifa_adulto'].valor * cant).should be_true
|
133
|
+
end
|
134
|
+
end
|
135
|
+
def validarResolucionAFIP
|
136
|
+
(@tarifas['total'] * 20 / 100).truncate + 1 == @tarifas['afip']
|
137
|
+
end
|
138
|
+
def total_escalas()
|
139
|
+
vueltas = @vueltas ? @vueltas.collect{|vuelta| vuelta.escalas} : []
|
140
|
+
(vueltas + @idas.collect{|vuelta| vuelta.escalas}).sort
|
141
|
+
end
|
142
|
+
|
143
|
+
def duracion
|
144
|
+
menor_ida = menor_duracion(@idas.collect{|ida| ida.duracion})
|
145
|
+
menor_vuelta = @vueltas ? menor_duracion(@vueltas.collect{|ida| ida.duracion}) : 0
|
146
|
+
|
147
|
+
return menor_vuelta + menor_ida
|
148
|
+
end
|
149
|
+
|
150
|
+
def escala_to_i(escala)
|
151
|
+
return 0 if escala.to_s =~ /(solo vuelo directo)|(Sin escalas)|(Sem escalas)|(Soamente v.o directo)|(Vuelo Directo)/i
|
152
|
+
return escala.to_s.gsub(/\D/,'').to_i
|
153
|
+
end
|
154
|
+
|
155
|
+
def menor_duracion(rutas)
|
156
|
+
totales = []
|
157
|
+
rutas.each do |custom|
|
158
|
+
if custom.match("^(.*)h (.*)m$")
|
159
|
+
total = custom.match("^(.*)h (.*)m$")[1].to_i * 60
|
160
|
+
total += custom.match("^(.*)h (.*)m$")[2].to_i
|
161
|
+
elsif custom.match("^(.*)h$")
|
162
|
+
total = custom.match("^(.*)h$")[1].to_i * 60
|
163
|
+
else
|
164
|
+
total = custom.match("^(.*)m$")[1].to_i
|
165
|
+
end
|
166
|
+
totales << total
|
167
|
+
end
|
168
|
+
return totales.sort.first
|
169
|
+
end
|
170
|
+
|
171
|
+
end
|
172
|
+
end
|
data/features/support/env.rb
CHANGED
@@ -40,7 +40,6 @@ require_relative 'pages/all_pages'
|
|
40
40
|
|
41
41
|
require_relative 'modules/results/search_params'
|
42
42
|
require_relative 'modules/results/filters'
|
43
|
-
require_relative 'modules/results/new_filters'
|
44
43
|
require_relative 'modules/results/wish_list'
|
45
44
|
require_relative 'modules/results/recommendation'
|
46
45
|
require_relative 'modules/results/matrix/matrix_airline'
|
@@ -33,17 +33,17 @@ module Browser
|
|
33
33
|
begin
|
34
34
|
|
35
35
|
begin
|
36
|
-
|
36
|
+
pagina = Hpricot.parse(browser.html)
|
37
37
|
rescue Hpricot::ParseError
|
38
|
-
|
38
|
+
return false
|
39
39
|
end
|
40
40
|
|
41
41
|
if (pagina/"div#errorInfo").length>0
|
42
|
-
|
42
|
+
raise((pagina/"div#errorInfo").inner_html)
|
43
43
|
end
|
44
44
|
|
45
45
|
if (pagina/"div.errorPageContenido h2#disculpaLangES").inner_text.match(/Estamos trabajando/i)
|
46
|
-
|
46
|
+
return true
|
47
47
|
end
|
48
48
|
|
49
49
|
browser_text = Sanitize.clean(browser.html)
|
@@ -4,37 +4,102 @@ module Results
|
|
4
4
|
module Filters
|
5
5
|
|
6
6
|
include PageObject
|
7
|
-
|
8
|
-
radio(:moneda_local, :class=>"currency-change")
|
9
|
-
radio(:moneda_dolar, :value=>"USD")
|
10
7
|
|
11
|
-
|
12
|
-
|
8
|
+
div(:filtros_nuevos,:id=>"inline-filters")
|
9
|
+
div(:popup_mas_filtros,:id=>"inline-filters-item-more-tooltip")
|
10
|
+
|
11
|
+
div(:filtros_precio,:class=>"inline-filters-detail-price")
|
12
|
+
div(:filtros_escalas,:id=>"inline-filters-detail-scales")
|
13
|
+
div(:filtros_horarios,:id=>"inline-filters-detail-time")
|
14
|
+
div(:filtros_aeropuerto,:id=>"inline-filters-detail-airports")
|
15
|
+
div(:filtros_duracion,:id=>"inline-filters-detail-duration")
|
16
|
+
div(:filtros_alianzas,:id=>"inline-filters-detail-alliances")
|
17
|
+
div(:filtros_aerolineas,:id=>"inline-filters-detail-airlines")
|
18
|
+
|
19
|
+
div(:filtros_aplicados,:class=>"inline-filters-applied")
|
20
|
+
|
21
|
+
div(:filtro_precio_visible,:class=>"inline-filters-detail inline-filters-detail-price")
|
22
|
+
div(:filtro_aerolineas_visible,:class=>"inline-filters-detail inline-filters-detail-airlines")
|
23
|
+
div(:filtro_horarios_visible,:class=>"inline-filters-detail inline-filters-detail-time")
|
24
|
+
div(:filtro_aeropuertos_visible,:class=>"inline-filters-detail inline-filters-detail-airports")
|
25
|
+
div(:filtro_duracion_visible,:class=>"inline-filters-detail inline-filters-detail-duration")
|
26
|
+
div(:filtro_escalas_visible,:class=>"inline-filters-detail inline-filters-detail-scales")
|
27
|
+
div(:filtro_alianzas_visible,:class=>"inline-filters-detail inline-filters-detail-alliances")
|
28
|
+
|
29
|
+
span(:mas_filtros,:css=>"div#inline-filters li.inline-filters-item-more span.inline-filters-item-content")
|
30
|
+
|
31
|
+
li(:ver_filtro_precio_visible,:class=>"inline-filters-item inline-filters-item-price inline-fitlers-detail-title")
|
32
|
+
li(:ver_filtro_escalas_visible,:class=>"inline-filters-item inline-filters-item-scales inline-fitlers-detail-title")
|
33
|
+
li(:ver_filtro_horarios_visible,:class=>"inline-filters-item inline-filters-item-time inline-fitlers-detail-title")
|
34
|
+
li(:ver_filtro_aeropuertos_visible,:class=>"inline-filters-item inline-filters-item-airports inline-fitlers-detail-title")
|
35
|
+
li(:ver_filtro_duracion_visible,:class=>"inline-filters-item inline-filters-item-duration inline-fitlers-detail-title")
|
36
|
+
li(:ver_filtro_aerolineas_visible,:class=>"inline-filters-item inline-filters-item-airlines inline-fitlers-detail-title")
|
37
|
+
li(:ver_filtro_alianzas_visible,:class=>"inline-filters-item inline-filters-item-alliances inline-fitlers-detail-title")
|
38
|
+
|
39
|
+
elements(:opciones_aeropuerto_origen,:input,:name=>"inline-filters-airport-outbound")
|
40
|
+
elements(:opciones_aeropuerto_destino,:input,:name=>"inline-filters-airport-inbound")
|
41
|
+
elements(:opciones_aerolineas,:input,:name=>"inline-filters-airlines")
|
42
|
+
elements(:opciones_escalas,:input,:name=>"inline-filters-stops")
|
43
|
+
elements(:opciones_alianzas,:input,:name=>"inline-filters-alliances")
|
44
|
+
|
45
|
+
link(:aplicar_filtros,:class=>"inline-filters-apply flights-button")
|
46
|
+
|
47
|
+
span(:remover_filtro_de_horario_de_ida,:id=>"inline-filters-time-outbound-slider-applied")
|
48
|
+
span(:remover_filtro_de_horario_de_vuelta,:id=>"inline-filters-time-inbound-slider-applied")
|
49
|
+
span(:remover_filtro_de_precio,:id=>"inline-filters-price-slider-applied")
|
50
|
+
checkbox(:remover_filtro_de_aerolinea,:id=>"inline-filters-airlines-all")
|
51
|
+
checkbox(:remover_filtro_de_aeropuerto_origen,:id=>"inline-filters-airport-outbound-all")
|
52
|
+
checkbox(:remover_filtro_de_aeropuerto_destino,:id=>"inline-filters-airport-inbound-all")
|
53
|
+
checkbox(:remover_filtro_de_escalas,:id=>"inline-filters-stops-all")
|
54
|
+
|
55
|
+
span(:remover_filtro_de_duracion_de_ida,:id=>"inline-filters-duration-outbound-slider-applied")
|
56
|
+
span(:remover_filtro_de_duracion_de_vuelta,:id=>"inline-filters-duration-inbound-slider-applied")
|
57
|
+
|
58
|
+
text_field(:nuevo_filtro_precio_menor,:css=>"div.inline-filters-detail-price span.ux-common-filter-price-min input.price-min")
|
59
|
+
text_field(:nuevo_filtro_precio_mayor,:css=>"div.inline-filters-detail-price span.ux-common-filter-price-max input.price-max")
|
60
|
+
|
61
|
+
div(:nuevo_filtro_duracion_salida,:css=>"div.inline-filters-detail-duration div#inline-filters-duration-outbound-slider")
|
62
|
+
div(:nuevo_filtro_duracion_llegada,:css=>"div.inline-filters-detail-duration div#inline-filters-duration-inbound-slider")
|
63
|
+
|
64
|
+
link(:slider_nuevo_precio_mayor,:css=>"div.inline-filters-detail-price .ui-slider-handle-max")
|
65
|
+
link(:slider_nuevo_precio_menor,:css=>"div.inline-filters-detail-price .ui-slider-handle-min")
|
13
66
|
link(:remover_ultima_accion,:class=>"remove-last-action")
|
14
|
-
link(:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
67
|
+
link(:slider_nuevo_filtro_duracion_salida,:css=>"div.inline-filters-detail-duration div#inline-filters-duration-outbound-slider .ui-slider-handle-min")
|
68
|
+
link(:slider_nuevo_filtro_duracion_llegada,:css=>"div.inline-filters-detail-duration div#inline-filters-duration-inbound-slider .ui-slider-handle-min")
|
69
|
+
|
70
|
+
def se_muestra_filtro_de_alianzas(alianza)
|
71
|
+
return browser.span(:id,"inline-filters-alliances-#{alianza}-applied")
|
72
|
+
end
|
73
|
+
|
74
|
+
def remover_filtro_de_alianzas(alianza)
|
75
|
+
return browser.span(:id,"inline-filters-alliances-#{alianza}-applied").span(:class,"inline-filters-applied-description-remove")
|
76
|
+
end
|
77
|
+
|
78
|
+
def ver_filtro(filtro)
|
79
|
+
mas_filtros_element.click
|
80
|
+
popup_mas_filtros_element.when_visible
|
81
|
+
filtro.click
|
82
|
+
popup_mas_filtros_element.when_not_visible
|
83
|
+
end
|
84
|
+
|
85
|
+
def cantidad_de_escalas(value)
|
86
|
+
case value
|
87
|
+
when "NONE" then 0
|
88
|
+
when "ONE" then 1
|
89
|
+
when "MORE_THAN_ONE" then 2
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def valor_minimo(filtro)
|
94
|
+
return filtro.span(:class,'flights-slider-min').span(:class,'flights-slider-value')
|
95
|
+
end
|
96
|
+
|
97
|
+
def valor_maximo(filtro)
|
98
|
+
return filtro.span(:class,'flights-slider-max').span(:class,'flights-slider-value')
|
99
|
+
end
|
100
|
+
|
101
|
+
def devolver_duracion(duracion)
|
102
|
+
time = duracion.strip.split(' ')
|
38
103
|
if time.length==1
|
39
104
|
aux = time.first
|
40
105
|
if(aux.match(/h/))
|
@@ -49,5 +114,4 @@ module Results
|
|
49
114
|
end
|
50
115
|
|
51
116
|
end
|
52
|
-
|
53
117
|
end
|