flights_gui_tests 0.0.1
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 +7 -0
- data/Gemfile +3 -0
- data/features/data/host.yml +78 -0
- data/features/data/miles.yml +216 -0
- data/features/data/sites.yml +44 -0
- data/features/data/tag_microsoft.yml +68 -0
- data/features/step_definitions/checkout/checkout_steps.rb +24 -0
- data/features/step_definitions/checkout/form_steps.rb +20 -0
- data/features/step_definitions/checkout/load_steps.rb +36 -0
- data/features/step_definitions/conditional_steps.rb +12 -0
- data/features/step_definitions/cookies_steps.rb +8 -0
- data/features/step_definitions/flights_tracker/flights_tracker_steps.rb +30 -0
- data/features/step_definitions/landing/itineraries_steps.rb +75 -0
- data/features/step_definitions/landing/landing_steps.rb +59 -0
- data/features/step_definitions/landing/load_steps.rb +30 -0
- data/features/step_definitions/page_steps.rb +18 -0
- data/features/step_definitions/results/basefare_steps.rb +65 -0
- data/features/step_definitions/results/desambiguation_steps.rb +144 -0
- data/features/step_definitions/results/errors_steps.rb +23 -0
- data/features/step_definitions/results/filters_steps.rb +301 -0
- data/features/step_definitions/results/load_steps.rb +52 -0
- data/features/step_definitions/results/matrix_steps.rb +213 -0
- data/features/step_definitions/results/order_steps.rb +49 -0
- data/features/step_definitions/results/pagination_steps.rb +29 -0
- data/features/step_definitions/results/recommendation_steps.rb +75 -0
- data/features/step_definitions/results/results_steps.rb +40 -0
- data/features/step_definitions/results/reviews_steps.rb +16 -0
- data/features/step_definitions/results/tags_steps.rb +102 -0
- data/features/step_definitions/results/wish_list_steps.rb +114 -0
- data/features/step_definitions/thanks/load_steps.rb +10 -0
- data/features/step_definitions/thanks/thanks_steps.rb +12 -0
- data/features/support/classes/clusters/checkout_cluster.rb +117 -0
- data/features/support/classes/clusters/data/data.rb +33 -0
- data/features/support/classes/clusters/results/details_cluster.rb +36 -0
- data/features/support/classes/clusters/results/landing_cluster.rb +29 -0
- data/features/support/classes/clusters/results/render_cluster.rb +83 -0
- data/features/support/classes/clusters/results_cluster.rb +171 -0
- data/features/support/classes/date.rb +26 -0
- data/features/support/classes/element.rb +23 -0
- data/features/support/classes/price.rb +66 -0
- data/features/support/classes/process_manager.rb +104 -0
- data/features/support/classes/string.rb +16 -0
- data/features/support/env.rb +94 -0
- data/features/support/hooks.rb +20 -0
- data/features/support/matchers.rb +108 -0
- data/features/support/modules/accessor.rb +26 -0
- data/features/support/modules/browser.rb +80 -0
- data/features/support/modules/checkout/datos_de_facturacion.rb +64 -0
- data/features/support/modules/checkout/informacion_de_contacto.rb +30 -0
- data/features/support/modules/checkout/pasajeros.rb +71 -0
- data/features/support/modules/checkout/tarjeta.rb +71 -0
- data/features/support/modules/element.rb +12 -0
- data/features/support/modules/helpers.rb +64 -0
- data/features/support/modules/pages/cookies.rb +33 -0
- data/features/support/modules/pages/tags.rb +27 -0
- data/features/support/modules/results/filters.rb +37 -0
- data/features/support/modules/results/itineraries/bussines.rb +17 -0
- data/features/support/modules/results/itineraries/data.rb +25 -0
- data/features/support/modules/results/itineraries/details.rb +80 -0
- data/features/support/modules/results/itineraries/miles.rb +64 -0
- data/features/support/modules/results/itineraries/payments.rb +27 -0
- data/features/support/modules/results/matrix/matrix_airline.rb +52 -0
- data/features/support/modules/results/matrix/matrix_fare_chart.rb +21 -0
- data/features/support/modules/results/matrix/matrix_price.rb +18 -0
- data/features/support/modules/results/recommendation.rb +29 -0
- data/features/support/modules/results/search_params.rb +21 -0
- data/features/support/modules/results/wish_list.rb +33 -0
- data/features/support/pages/all_pages.rb +95 -0
- data/features/support/pages/checkout/checkout_page.rb +45 -0
- data/features/support/pages/checkout/popup_results_page.rb +39 -0
- data/features/support/pages/flights_tracker/search_page.rb +54 -0
- data/features/support/pages/landing/search_page.rb +94 -0
- data/features/support/pages/results/desambiguation_airports_page.rb +16 -0
- data/features/support/pages/results/desambiguation_city_page.rb +20 -0
- data/features/support/pages/results/search_page.rb +101 -0
- data/features/support/pages/thanks/thanks_page.rb +7 -0
- data/features/tests/checkout/book_ok.feature +209 -0
- data/features/tests/flights_tracker/search.feature +65 -0
- data/features/tests/landing/search.feature +152 -0
- data/features/tests/results/basefare.feature +90 -0
- data/features/tests/results/desambiguation/airports.feature +89 -0
- data/features/tests/results/desambiguation/city.feature +87 -0
- data/features/tests/results/errors.feature +198 -0
- data/features/tests/results/filters.feature +113 -0
- data/features/tests/results/itineraries.feature +93 -0
- data/features/tests/results/matrix/matrix_airlines.feature +46 -0
- data/features/tests/results/matrix/matrix_fare_chart.feature +41 -0
- data/features/tests/results/matrix/matrix_price.feature +41 -0
- data/features/tests/results/orders.feature +89 -0
- data/features/tests/results/pagination.feature +74 -0
- data/features/tests/results/recommendation.feature +111 -0
- data/features/tests/results/reviews_airlines.feature +84 -0
- data/features/tests/results/search.feature +209 -0
- data/features/tests/results/wish_list.feature +55 -0
- data/flights_gui_tests.gemspec +34 -0
- data/henry-context.yml +4938 -0
- metadata +306 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# enconding: utf-8
|
|
2
|
+
module Pages
|
|
3
|
+
module Tags
|
|
4
|
+
include PageObject
|
|
5
|
+
|
|
6
|
+
def buscar_tag_por_src(src)
|
|
7
|
+
doc = Hpricot.parse(@browser.html)
|
|
8
|
+
return (doc/"img").select{|image| image.attributes['src'].match(/#{src}/)}
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def buscar_script_con_texto(texto)
|
|
12
|
+
doc = Hpricot.parse(@browser.html)
|
|
13
|
+
return (doc/"script").select{|script| script.inner_text.match(/#{texto}/)}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def buscar_noscript_con_html(html)
|
|
17
|
+
doc = Hpricot.parse(@browser.html)
|
|
18
|
+
return (doc/"noscript").select{|script| script.inner_html.match(/#{html}/)}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def buscar_elemento_html(acc)
|
|
22
|
+
doc = Hpricot.parse(@browser.html)
|
|
23
|
+
return (doc/"#{acc}")
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Results
|
|
3
|
+
|
|
4
|
+
module Filters
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
radio(:moneda_local, :class=>"currency-change")
|
|
9
|
+
radio(:moneda_dolar, :value=>"USD")
|
|
10
|
+
|
|
11
|
+
link(:limpiar_filtro_precio,:id=>"flights-price-filter-clean")
|
|
12
|
+
link(:aplicar_filtro_precio,:class=>"ux-common-filter-apply apply")
|
|
13
|
+
link(:remover_ultima_accion,:class=>"remove-last-action")
|
|
14
|
+
|
|
15
|
+
div(:filtros_precio,:id=>"ux-flights-filters")
|
|
16
|
+
div(:slider_horario_salida,:class=>"ux-common-filter-section ux-common-filter-slider ux-flights-filter-hours-slider ux-flights-filter-outboundhours-slider ux-common-filter-change ux-common-filter-active")
|
|
17
|
+
|
|
18
|
+
#filtros aerolineas
|
|
19
|
+
span(:cantidad_items_aerolineas,:css=>".airlines-all .total")
|
|
20
|
+
span(:cantidad_items_aeropuerto_salida,:css=>".airport-outbound-all .total")
|
|
21
|
+
span(:cantidad_items_aeropuerto_llegada,:css=>".airport-inbound-all .total")
|
|
22
|
+
span(:cantidad_items_paradas,:css=>".stops-all .total")
|
|
23
|
+
|
|
24
|
+
checkbox(:limpiar_filtro_aerolinea,:id=>"airlines-all")
|
|
25
|
+
checkbox(:limpiar_filtro_aeropuerto_salida,:id=>"airport-outbound-all")
|
|
26
|
+
checkbox(:limpiar_filtro_aeropuerto_llegada,:id=>"airport-inbound-all")
|
|
27
|
+
checkbox(:limpiar_filtro_escalas,:id=>'stops-all')
|
|
28
|
+
link(:limpiar_filtro_precio,:id=>'flights-price-filter-clean')
|
|
29
|
+
|
|
30
|
+
text_field(:filtro_precio_mayor,:class=>"price-max")
|
|
31
|
+
text_field(:filtro_precio_menor,:class=>"price-min")
|
|
32
|
+
link(:slider_precio_mayor,:class=>"ui-slider-handle ui-state-default ui-corner-all ui-slider-handle-max")
|
|
33
|
+
link(:slider_precio_menor,:class=>"ui-slider-handle ui-state-default ui-corner-all ui-slider-handle-min")
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
module Results
|
|
3
|
+
module Itineraries
|
|
4
|
+
module Bussines
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
def validar_vuelo_bussines(i)
|
|
9
|
+
if itinerarios_elements[i].div(:class,'not-economy-cluster-alert').present?
|
|
10
|
+
itinerarios_elements[i].span(:class,'ux-common-icon-rate-star').should visible("icono de bussines")
|
|
11
|
+
else
|
|
12
|
+
itinerarios_elements[i].span(:class,'ux-common-icon-rate-star').should_not visible("icono de bussines")
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
module Results
|
|
3
|
+
module Itineraries
|
|
4
|
+
module Data
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
def validar_detalles_itinerario(i)
|
|
9
|
+
if tipo_de_busqueda != "multipledestinations"
|
|
10
|
+
outbound = itinerarios_elements[i].div(:class,'itineraries').div(:class,'sub-cluster outbound').div(:class,'item data')
|
|
11
|
+
(manage_data.city_from_1.airports.include?(outbound.spans(:class,'airport')[0].text)).should be_true
|
|
12
|
+
(manage_data.city_to_1.airports.include?(outbound.spans(:class,'airport')[1].text)).should be_true
|
|
13
|
+
outbound.span(:class,'city-departure').text.no_accents.downcase.gsub(",","").strip.should equal(manage_data.city_from_1.name(AllPages.site).downcase) unless outbound.span(:class,'city-departure').text.downcase.no_accents.gsub(",","").strip.match("toluca|campinas")
|
|
14
|
+
outbound.span(:class,'city-arrival').text.no_accents.downcase.gsub(",","").strip.should equal(manage_data.city_to_1.name(AllPages.site).downcase) unless outbound.span(:class,'city-arrival').text.downcase.no_accents.gsub(",","").strip.match("toluca|campinas")
|
|
15
|
+
if tipo_de_busqueda == "roundtrip"
|
|
16
|
+
inbound = itinerarios_elements[i].div(:class,'itineraries').div(:class,'sub-cluster inbound').div(:class,'item data')
|
|
17
|
+
(manage_data.city_to_1.airports.include?(inbound.spans(:class,'airport')[0].text)).should be_true
|
|
18
|
+
(manage_data.city_from_1.airports.include?(inbound.spans(:class,'airport')[1].text)).should be_true
|
|
19
|
+
inbound.span(:class,'city-departure').text.no_accents.downcase.gsub(",","").strip.should equal(manage_data.city_to_1.name(AllPages.site).downcase) unless inbound.span(:class,'city-departure').text.downcase.no_accents.gsub(",","").strip.match("toluca|campinas")
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
module Results
|
|
3
|
+
module Itineraries
|
|
4
|
+
module Details
|
|
5
|
+
include PageObject
|
|
6
|
+
|
|
7
|
+
link(:mostrar_mas_itinerarios,:class=>"toggle-clusters show-clusters")
|
|
8
|
+
div(:popup_detail,:class=>'flights-popup popup-detail')
|
|
9
|
+
|
|
10
|
+
def validar_mas_detalles(json,i,itinerario)
|
|
11
|
+
j=0
|
|
12
|
+
mostrar_mas_itinerarios_element.click if mostrar_mas_itinerarios_element.present?
|
|
13
|
+
rutas_ida(itinerarios_elements[i]).each do |route|
|
|
14
|
+
cluster_detail = recorrer_segmentos(route,itinerario.idas[j])
|
|
15
|
+
j += 1
|
|
16
|
+
cerrar_popup
|
|
17
|
+
validar_clase(cluster_detail,route)
|
|
18
|
+
end
|
|
19
|
+
k=0
|
|
20
|
+
rutas_vuelta(itinerarios_elements[i]).each do |route|
|
|
21
|
+
cluster_detail = recorrer_segmentos(route,itinerario.vueltas[k])
|
|
22
|
+
k += 1
|
|
23
|
+
cerrar_popup
|
|
24
|
+
validar_clase(cluster_detail,route)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def validar_clase(cluster,route)
|
|
29
|
+
if cluster.tramos.select{|tramo| tramo['bussines'] }.empty?
|
|
30
|
+
route.span(:class,'ux-common-icon-rate-star').should_not visible("icono de bussines")
|
|
31
|
+
else
|
|
32
|
+
route.span(:class,'ux-common-icon-rate-star').should visible("icono de bussines")
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def recorrer_segmentos(route,cluster)
|
|
37
|
+
route.li(:class,'stops').a(:class,'text').click
|
|
38
|
+
popup_detail_element.when_visible(timeout=20)
|
|
39
|
+
doc = Hpricot.parse(popup_detail_element.html)
|
|
40
|
+
detail = DetailsCluster.new(doc)
|
|
41
|
+
detail.duracion.should match(/#{cluster.duracion}/)
|
|
42
|
+
detail.tramos.first['ciudad_origen'].should match(cluster.origen)
|
|
43
|
+
detail.tramos.last['ciudad_destino'].should match(cluster.destino)
|
|
44
|
+
cluster.fecha.should equal(detail.tramos.first['fecha_origen'])
|
|
45
|
+
cluster.hou_sal_ida.should equal(detail.tramos.first['hora_origen'])
|
|
46
|
+
reglas_de_vuelo()
|
|
47
|
+
return detail
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def reglas_de_vuelo()
|
|
51
|
+
popup = popup_detail_element
|
|
52
|
+
popup.div(:class,'top-box').a(:class,'show-rules').should visible
|
|
53
|
+
popup.div(:class,'detail').div(:class,'detail-footer').div(:class,'rules').should_not visible
|
|
54
|
+
popup.div(:class,'top-box').a(:class,'show-rules').click
|
|
55
|
+
popup.div(:class,'detail').div(:class,'detail-footer').div(:class,'rules').should visible
|
|
56
|
+
popup.div(:class,'detail').div(:class,'detail-footer').div(:class,'rules').div(:class,'text').text.strip.no_accents.should match(/The ticket you are booking is subject to the airline rules and restrictions|El boleto que usted esta comprando est.{1,2} sujeto a reglas y restricciones impuestas por la aerol.{1,2}nea transportadora|No incluye impuestos, no reembolsable, aplica penalidad|Estos tickets No permiten cambios NI devoluciones parciales|O bilhete que voc.{1,2} est.{1,2} para adquirir est.{1,2} sujeito a regras e restri.{1,2}.{1,2}es impostas pela companhia a.{1,2}rea transportadora/)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def rutas_ida(itinerario)
|
|
60
|
+
if tipo_de_busqueda=="multipledestinations"
|
|
61
|
+
return []
|
|
62
|
+
else
|
|
63
|
+
return itinerario.div(:class,'itineraries').div(:class,'sub-cluster outbound').ul(:class,'itineraries-group cluster-items-list').lis(:class,"item itinerary cluster-item")
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
def rutas_vuelta(itinerario)
|
|
67
|
+
if tipo_de_busqueda=="roundtrip"
|
|
68
|
+
return itinerario.div(:class,'itineraries').div(:class,'sub-cluster inbound').ul(:class,'itineraries-group cluster-items-list').lis(:class,"item itinerary cluster-item")
|
|
69
|
+
else
|
|
70
|
+
return []
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def cerrar_popup
|
|
75
|
+
popup_detail_element.span(:class,'popup-close-button popup-close').click
|
|
76
|
+
sleep(0.5)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
module Results
|
|
3
|
+
module Itineraries
|
|
4
|
+
module Miles
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
div(:popup_pasajero_frecuente, :id=>"popup-frequent-flyer")
|
|
9
|
+
|
|
10
|
+
def validar_millas(json,i)
|
|
11
|
+
|
|
12
|
+
cluster_html = Hpricot.parse(itinerarios_elements[i].html)
|
|
13
|
+
|
|
14
|
+
if itinerarios_elements[i].link(:class,"frequent-flyer").present?
|
|
15
|
+
|
|
16
|
+
if tipo_de_busqueda != "multipledestinations"
|
|
17
|
+
airline = json['result']['data']['items'][i]['itinerariesBox']['frequentFlyerInfo']['airline']['code']
|
|
18
|
+
miles = json['result']['data']['items'][i]['itinerariesBox']['frequentFlyerInfo']['points']['formatted']
|
|
19
|
+
unit = json['result']['data']['items'][i]['itinerariesBox']['frequentFlyerInfo']['distanceUnit']
|
|
20
|
+
else
|
|
21
|
+
airline = json['result']['data']['items'][i]['itinerary']['itineraryInfo']['frequentFlyerInfo']['airline']['code']
|
|
22
|
+
miles = json['result']['data']['items'][i]['itinerary']['itineraryInfo']['frequentFlyerInfo']['points']['formatted']
|
|
23
|
+
unit = json['result']['data']['items'][i]['itinerary']['itineraryInfo']['frequentFlyerInfo']['distanceUnit']
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
country = case AllPages.site
|
|
27
|
+
when "US" then "US"
|
|
28
|
+
when "BR" then "BR"
|
|
29
|
+
else "DF"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
data = YAML.load(File.open("features/data/miles.yml"))[country]
|
|
33
|
+
|
|
34
|
+
if miles
|
|
35
|
+
text = "#{data['text'].first.gsub(/miles/,miles).gsub(/unit/,data['unit'][unit])} "
|
|
36
|
+
else
|
|
37
|
+
text = "#{data['text'].last.gsub(/unit/,data['unit'][unit])} "
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
itinerarios_elements[i].link(:class,"frequent-flyer").text.downcase.strip.no_accents.should match(data[airline].last.gsub(/unit/,data["unit"][unit]).downcase.strip.no_accents)
|
|
41
|
+
itinerarios_elements[i].link(:class,"frequent-flyer").click
|
|
42
|
+
popup_pasajero_frecuente_element.when_visible(timeout=20)
|
|
43
|
+
|
|
44
|
+
if popup_pasajero_frecuente_element.present?
|
|
45
|
+
doc = Hpricot.parse(popup_pasajero_frecuente_element.html)
|
|
46
|
+
(doc/"div.popup-content").inner_text.gsub(/\n\n/," ").gsub(/\n/,"").downcase.no_accents.strip.should match(text.downcase + data[airline][0].downcase.strip)
|
|
47
|
+
popup_pasajero_frecuente_element.span(:class,'popup-close-button popup-close').click
|
|
48
|
+
popup_pasajero_frecuente_element.when_not_visible(timeout=20)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
else
|
|
52
|
+
|
|
53
|
+
if tipo_de_busqueda != "multipledestinations"
|
|
54
|
+
(!json['result']['data']['items'][i]['itinerariesBox']['frequentFlyerInfo']).should be_true
|
|
55
|
+
else
|
|
56
|
+
(!json['result']['data']['items'][i]['itinerary']['itineraryInfo']['frequentFlyerInfo']).should be_true
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
module Results
|
|
3
|
+
module Itineraries
|
|
4
|
+
module Payments
|
|
5
|
+
include PageObject
|
|
6
|
+
|
|
7
|
+
div(:popup_cuotas,:id=>"popup-payments")
|
|
8
|
+
|
|
9
|
+
span(:cerrar_popup_cuotas,:css=>"#popup-payments .popup-close-button")
|
|
10
|
+
|
|
11
|
+
def validar_popup_cuotas(i)
|
|
12
|
+
if(itinerarios_elements[i].div(:class,'actions').link(:class,'payments').present?)
|
|
13
|
+
itinerarios_elements[i].radio(:id,/outbound/).click if itinerarios_elements[i].radio(:id,/outbound/).present?
|
|
14
|
+
itinerarios_elements[i].radio(:id,/inbound/).click if itinerarios_elements[i].radio(:id,/inbound/).present?
|
|
15
|
+
itinerarios_elements[i].div(:class,'actions').link(:class,'payments').click
|
|
16
|
+
popup_cuotas_element.when_visible(timeout=20)
|
|
17
|
+
popup = Hpricot.parse(popup_cuotas_element.html)
|
|
18
|
+
popup_cuotas_element.span(:class,'popup-close-button popup-close').click
|
|
19
|
+
popup_cuotas_element.when_not_visible(timeout=20)
|
|
20
|
+
else
|
|
21
|
+
itinerarios_elements[i].div(:class,'actions').text.should_not match("pagos|cuotas|installments|juros")
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
module Results
|
|
3
|
+
module Matriz
|
|
4
|
+
module MatrizAerolinea
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
div(:matriz_aerolineas, :id=>"matrix")
|
|
9
|
+
div(:link_inactivo, :class=>"flights-tab-header flights-tab-airlinePricesMatrix")
|
|
10
|
+
div(:link_activo, :class=>"flights-tab-header flights-tab-airlinePricesMatrix flights-tab-header-active")
|
|
11
|
+
|
|
12
|
+
span(:siguiente_aerolinea,:class => "matrix-next")
|
|
13
|
+
link(:limpiar_matriz_aerolinea,:class=>'matrix-reset')
|
|
14
|
+
|
|
15
|
+
element(:seleccionar_itinerario_matriz,:span,:css => ".matrix-container .price-currency")
|
|
16
|
+
element(:seleccionar_itinerario_matriz_pe,:span,:css => ".matrix-container .PEN")
|
|
17
|
+
|
|
18
|
+
elements(:enlaces_reviews_aerolineas,:link,:class=>"review-description")
|
|
19
|
+
elements(:nombres_aerolineas,:div,:css=>".airline-description .airline-name")
|
|
20
|
+
elements(:logos_aerolineas,:image,:css=>".airline-description .airline-logo img")
|
|
21
|
+
|
|
22
|
+
#popup
|
|
23
|
+
div(:popup_reviews_aerolineas,:id=>"popup-reviews")
|
|
24
|
+
span(:close_popup_reviews_aerolineas,:class=>"popup-close-button popup-close")
|
|
25
|
+
|
|
26
|
+
span(:filtro_matriz,:css=>'.matrix-filter span')
|
|
27
|
+
|
|
28
|
+
def activar_aerolineas_en_matriz
|
|
29
|
+
link_inactivo_element.click if link_inactivo_element.present?
|
|
30
|
+
sleep(1)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def aerolineas_en_matriz
|
|
34
|
+
self.activar_aerolineas_en_matriz
|
|
35
|
+
self.enlaces_reviews_aerolineas_elements
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def nombre_aerolinea_en_matriz(index)
|
|
39
|
+
self.nombres_aerolineas_elements[index].text.strip.downcase
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def logo_aerolinea_en_matriz(index)
|
|
43
|
+
self.logos_aerolineas_elements[index].attribute("src").strip.downcase
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def elegir_aerolinea(src)
|
|
47
|
+
@browser.div(:class,'matrix-airlines-container').img(:src, src)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
module Results
|
|
3
|
+
module Matriz
|
|
4
|
+
module MatrizFareChart
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
div(:tab_matriz_tendencia_precio,:class=>'flights-tab-header flights-tab-fareChart')
|
|
9
|
+
div(:matriz_fare_chart,:id=>'fare-chart')
|
|
10
|
+
div(:fare_chart_principal,:class=>"fare-chart-main")
|
|
11
|
+
div(:fare_chart_secundario,:class=>"fare-chart-secondary")
|
|
12
|
+
|
|
13
|
+
div(:barras_fare_chart_secundario,:css=>".fare-chart-secondary .fare-chart-small")
|
|
14
|
+
div(:barra_precio_minimo,:class=>"fare-chart-bar fare-chart-min-price")
|
|
15
|
+
|
|
16
|
+
span(:mensaje_fare_chart,:class=>'fare-chart-description-text')
|
|
17
|
+
element(:script_matriz_fare_chart,:script,:id=>"popup-fare-chart-template")
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
module Results
|
|
3
|
+
module Matriz
|
|
4
|
+
module MatrizPrice
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
div(:tab_matriz_precio,:class=>'flights-tab-header flights-tab-priceSuggestionMatrix ')
|
|
9
|
+
div(:matriz_precio,:id=>"price-suggestion-matrix")
|
|
10
|
+
div(:alerta_matriz_precio,:id=>'ux-common-message ux-common-message-success price-suggestion-matrix-alert')
|
|
11
|
+
div(:popup_matriz_precio,:class=>"ux-common-overlay ux-common-overlay-top-center ux-common-overlay-popover popup-price-suggestion-matrix-alert")
|
|
12
|
+
div(:matriz_precio_overlay,:class=>"price-suggestion-matrix-overlay")
|
|
13
|
+
|
|
14
|
+
span(:mensaje_precio,:class=>'price-suggestion-description-text')
|
|
15
|
+
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Results
|
|
3
|
+
|
|
4
|
+
module Recommendation
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
span(:icono_mail,:class=>"main-sprite icon-mail icon")
|
|
9
|
+
|
|
10
|
+
radio(:primera_opcion_ida,:id=>"0-outbound-0")
|
|
11
|
+
radio(:primera_opcion_vuelta,:id=>"0-inbound-0")
|
|
12
|
+
|
|
13
|
+
div(:popup_vuelos,:class=>"flights-popup")
|
|
14
|
+
div(:popup_mail,:id=>"popup-email")
|
|
15
|
+
|
|
16
|
+
text_field(:asunto_recomendacion,:class=>"input subject placeholder")
|
|
17
|
+
text_field(:error_nombre_recomendacion,:class=>"input sender-name flights-input error")
|
|
18
|
+
text_field(:error_mail_remitente_recomendacion,:class=>"input sender flights-input error")
|
|
19
|
+
text_field(:error_mail_destinatario_recomendacion,:class=>"input receiver flights-input error")
|
|
20
|
+
text_field(:nombre_recomendacion,:id=>"sender-name")
|
|
21
|
+
text_field(:mail_remitente_recomendacion,:id=>"sender")
|
|
22
|
+
text_field(:mail_destinatario_recomendacion,:id=>"receiver")
|
|
23
|
+
|
|
24
|
+
p(:mail_recomendacion_enviado,:class=>"email-feedback")
|
|
25
|
+
|
|
26
|
+
text_area(:comentario_recomendacion,:class=>"input message flights-input")
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Results
|
|
3
|
+
|
|
4
|
+
module SearchParams
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
def buscar(url = nil)
|
|
9
|
+
if url
|
|
10
|
+
@browser.goto(url)
|
|
11
|
+
else
|
|
12
|
+
@browser.goto(self.manage_data.generate_url_results_search)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def nueva_fecha_ida(fecha)
|
|
17
|
+
self.manage_data.set_from_date fecha
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Results
|
|
3
|
+
|
|
4
|
+
module WishList
|
|
5
|
+
|
|
6
|
+
include PageObject
|
|
7
|
+
|
|
8
|
+
li(:item_usuario_nibbler,:class=>"nibbler-common-header-user-item")
|
|
9
|
+
li(:corazon_usuario_nibbler,:css=>".nibbler-common-header-user-item .nibbler-common-header-favorites-has")
|
|
10
|
+
|
|
11
|
+
div(:popup_usuario_nibbler,:class=>"nibbler-common-overlay nibbler-common-overlay-popover nibbler-common-overlay-bottom-left nibbler-common-login-overlay")
|
|
12
|
+
div(:login_usuario_nibbler,:id=>"nibbler-selfservice-login-overlay")
|
|
13
|
+
div(:error_favoritos,:class=>"messages one-line-message wishlist-error")
|
|
14
|
+
div(:usuario_logueado,:css=>".nibbler-common-header-user .fb-description")
|
|
15
|
+
|
|
16
|
+
link(:cerrar_sesion_usuario_nibbler,:css=>".nibbler-common-login-overlay .nibbler-common-close-session")
|
|
17
|
+
link(:link_favorito,:css=>".nibbler-common-login-overlay .nibbler-wishlist-favorite-link")
|
|
18
|
+
|
|
19
|
+
ul(:itinerario_favorito,:css=>".nibbler-common-header-favorites-popup .nibbler-common-last-searches-body")
|
|
20
|
+
|
|
21
|
+
span(:cerrar_popup_usuario_nibbler,:css=>".nibbler-common-login-overlay .nibbler-common-overlay-close")
|
|
22
|
+
span(:icono_favoritos,:class=>"nibbler-common-icon-favourites")
|
|
23
|
+
span(:icono_favoritos_cluster,:class=>"icon-wishlist")
|
|
24
|
+
span(:icono_favoritos_cluster_marcado,:css=>".cluster .ux-common-icon-favourites-selected")
|
|
25
|
+
span(:corazon_lista_precios,:css=>".cluster .flights-wishlist-item .ux-common-icon-favourites-selected")
|
|
26
|
+
|
|
27
|
+
text_field(:mail_usuario_nibbler,:id=>"signin-email")
|
|
28
|
+
text_field(:pass_usuario_nibbler,:id=>"signin-pass")
|
|
29
|
+
|
|
30
|
+
button(:boton_usuario_nibbler,:class=>"nibbler-selfservice-pass-button")
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|