flights_gui_tests 1.2.5 → 1.2.6
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/last_minutes_steps.rb +1 -0
- data/features/step_definitions/results/matrix_steps.rb +1 -1
- data/features/step_definitions/results/wish_list_steps.rb +1 -1
- data/features/support/modules/results/itineraries/bussines.rb +0 -12
- data/features/support/modules/results/itineraries/details.rb +37 -83
- data/features/support/modules/results/itineraries/payments.rb +5 -23
- data/features/support/pages/results/search_page.rb +1 -5
- data/features/support/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afe38e2ea2ecc1cebb9d9f326ce84ad35e6bb807
|
4
|
+
data.tar.gz: 6ff145d37d36cf12fc3177910e87c34b9e8cdf72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5ee35ed4fdd4ab3ec7a8dae27b47bd98f16b37241e5d9fc8fc5986e8b209c6644063823adc6557d562aa31a18b273a7d29ba4c553f21302d6eeedefef46d141
|
7
|
+
data.tar.gz: 2ffe70f06ccf4a5ee61acb170a8a40322fdb64ea302e90871078f207b18c31398e57df23f27af692ef06ecfa05ae93556f2e671b6612bbde5c94a58a59b16f34
|
@@ -17,6 +17,7 @@ Cuando(/^espero que de error de compra al no poder emitirse los tickets$/) do
|
|
17
17
|
begin
|
18
18
|
@page.mensaje_error_emision_last_minute_element.when_visible(timeout=10)
|
19
19
|
rescue
|
20
|
+
break if @page.url.match("no-more-flights")
|
20
21
|
@page.mensaje_error_emision_last_minute_element.should visible("Mensaje error last minute")
|
21
22
|
end
|
22
23
|
end
|
@@ -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 = Results::
|
103
|
+
first_value = Results::NewCluster.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
|
@@ -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 = Results::
|
71
|
+
cluster = Results::NewCluster.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
|
@@ -6,18 +6,6 @@ module Results
|
|
6
6
|
include PageObject
|
7
7
|
|
8
8
|
def validar_vuelo_bussines(i)
|
9
|
-
unless @nuevo_cluster
|
10
|
-
if itinerarios_elements[i].div(:class,'not-economy-cluster-alert').present?
|
11
|
-
itinerarios_elements[i].span(:class,'ux-common-icon-rate-star').should visible("icono de bussines")
|
12
|
-
else
|
13
|
-
itinerarios_elements[i].span(:class,'ux-common-icon-rate-star').should_not visible("icono de bussines")
|
14
|
-
end
|
15
|
-
else
|
16
|
-
new_validar_vuelo_bussines(i)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def new_validar_vuelo_bussines(i)
|
21
9
|
if itinerarios_elements[i].div(:class,'not-economy-cluster-alert alert').present?
|
22
10
|
itinerarios_elements[i].span(:class,'ux-common-icon-rate-star').should visible("icono de bussines")
|
23
11
|
else
|
@@ -10,24 +10,39 @@ module Results
|
|
10
10
|
elements(:new_popup_detail,:div,:class=>'inline-detail')
|
11
11
|
|
12
12
|
def validar_mas_detalles(json,i,itinerario)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
13
|
+
mostrar_mas_itinerarios_element.click if mostrar_mas_itinerarios_element.present?
|
14
|
+
rutas_ida(itinerarios_elements[i]).each_with_index do |route,j|
|
15
|
+
if route.present?
|
16
|
+
begin
|
17
|
+
cluster_detail = recorrer_segmentos(route,itinerario.idas[j],$num)
|
18
|
+
cerrar_popup(route)
|
19
|
+
validar_clase(cluster_detail,route)
|
20
|
+
rescue Selenium::WebDriver::Error::UnknownError => e
|
21
|
+
puts "Fallo validacion de mas detalles, itinerario #{i}, ruta ida #{j}"
|
22
|
+
puts e.message # Test de excepción
|
23
|
+
rescue NoMethodError => e
|
24
|
+
puts "Fallo validacion de mas detalles, itinerario #{i}, ruta ida #{j}"
|
25
|
+
puts e.message
|
26
|
+
end
|
27
|
+
$num += 1
|
28
|
+
else
|
29
|
+
puts "No se ve el elemento numero #{i} en la ruta #{j}"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
rutas_vuelta(itinerarios_elements[i]).each_with_index do |route,k|
|
33
|
+
if route.present?
|
34
|
+
begin
|
35
|
+
cluster_detail = recorrer_segmentos(route,itinerario.vueltas[k],$num)
|
36
|
+
cerrar_popup(route)
|
37
|
+
validar_clase(cluster_detail,route)
|
38
|
+
rescue Selenium::WebDriver::Error::UnknownError => e
|
39
|
+
puts "Fallo validacion de mas detalles, itinerario #{i}, ruta vuelta #{k}"
|
40
|
+
puts e.message # Test de excepción
|
41
|
+
end
|
42
|
+
$num += 1
|
43
|
+
else
|
44
|
+
puts "No se ve el elemento numero #{i} en la ruta #{k}"
|
28
45
|
end
|
29
|
-
else
|
30
|
-
new_validar_mas_detalles(json,i,itinerario)
|
31
46
|
end
|
32
47
|
end
|
33
48
|
|
@@ -39,25 +54,6 @@ module Results
|
|
39
54
|
end
|
40
55
|
end
|
41
56
|
|
42
|
-
def recorrer_segmentos(route,cluster)
|
43
|
-
route.li(:class,'stops').a(:class,'text').click
|
44
|
-
popup_detail_element.when_visible(timeout=20)
|
45
|
-
doc = Hpricot.parse(popup_detail_element.html)
|
46
|
-
detail = OldDetailsCluster.new(doc)
|
47
|
-
detail.duracion.should match(/#{cluster.duracion}/)
|
48
|
-
detail.tramos.first['ciudad_origen'].should match(cluster.origen)
|
49
|
-
detail.tramos.last['ciudad_destino'].should match(cluster.destino)
|
50
|
-
cluster.fecha.should equal(detail.tramos.first['fecha_origen'])
|
51
|
-
cluster.hou_sal_ida.should equal(detail.tramos.first['hora_origen'])
|
52
|
-
reglas_de_vuelo()
|
53
|
-
return detail
|
54
|
-
end
|
55
|
-
|
56
|
-
def reglas_de_vuelo()
|
57
|
-
popup = popup_detail_element
|
58
|
-
popup.div(:class,'top-box').a(:class,'show-rules').should_not visible
|
59
|
-
end
|
60
|
-
|
61
57
|
def rutas_ida(itinerario)
|
62
58
|
if tipo_de_busqueda=="multipledestinations"
|
63
59
|
return []
|
@@ -73,22 +69,17 @@ module Results
|
|
73
69
|
end
|
74
70
|
end
|
75
71
|
|
76
|
-
def cerrar_popup
|
77
|
-
popup_detail_element.span(:class,'popup-close-button popup-close').click
|
78
|
-
sleep(0.5)
|
79
|
-
end
|
80
|
-
|
81
|
-
def new_cerrar_popup(route)
|
72
|
+
def cerrar_popup(route)
|
82
73
|
route.li(:class,'detail').span(:class,'itinerary-detail-hide').click
|
83
74
|
sleep(0.5)
|
84
75
|
end
|
85
76
|
|
86
|
-
def
|
77
|
+
def reglas_de_vuelo(i)
|
87
78
|
popup = new_popup_detail_elements[i]
|
88
79
|
popup.div(:class,'top-box').a(:class,'show-rules show-cluster-rules').should_not visible
|
89
80
|
end
|
90
81
|
|
91
|
-
def
|
82
|
+
def recorrer_segmentos(route,cluster,i)
|
92
83
|
route.li(:class,'detail').links[0].click
|
93
84
|
new_popup_detail_elements[i].when_visible(timeout=20)
|
94
85
|
doc = Hpricot.parse(new_popup_detail_elements[i].html)
|
@@ -98,47 +89,10 @@ module Results
|
|
98
89
|
detail.tramos.last['ciudad_destino'].should match(cluster.destino)
|
99
90
|
cluster.fecha.should equal(detail.tramos.first['fecha_origen'])
|
100
91
|
cluster.hou_sal_ida.should equal(detail.tramos.first['hora_origen'])
|
101
|
-
|
92
|
+
reglas_de_vuelo(i)
|
102
93
|
return detail
|
103
94
|
end
|
104
|
-
|
105
|
-
def new_validar_mas_detalles(json,i,itinerario)
|
106
|
-
mostrar_mas_itinerarios_element.click if mostrar_mas_itinerarios_element.present?
|
107
|
-
rutas_ida(itinerarios_elements[i]).each_with_index do |route,j|
|
108
|
-
if route.present?
|
109
|
-
begin
|
110
|
-
cluster_detail = new_recorrer_segmentos(route,itinerario.idas[j],$num)
|
111
|
-
new_cerrar_popup(route)
|
112
|
-
validar_clase(cluster_detail,route)
|
113
|
-
rescue Selenium::WebDriver::Error::UnknownError => e
|
114
|
-
puts "Fallo validacion de mas detalles, itinerario #{i}, ruta ida #{j}"
|
115
|
-
puts e.message # Test de excepción
|
116
|
-
rescue NoMethodError => e
|
117
|
-
puts "Fallo validacion de mas detalles, itinerario #{i}, ruta ida #{j}"
|
118
|
-
puts e.message
|
119
|
-
end
|
120
|
-
$num += 1
|
121
|
-
else
|
122
|
-
puts "No se ve el elemento numero #{i} en la ruta #{j}"
|
123
|
-
end
|
124
|
-
end
|
125
|
-
rutas_vuelta(itinerarios_elements[i]).each_with_index do |route,k|
|
126
|
-
if route.present?
|
127
|
-
begin
|
128
|
-
cluster_detail = new_recorrer_segmentos(route,itinerario.vueltas[k],$num)
|
129
|
-
new_cerrar_popup(route)
|
130
|
-
validar_clase(cluster_detail,route)
|
131
|
-
rescue Selenium::WebDriver::Error::UnknownError => e
|
132
|
-
puts "Fallo validacion de mas detalles, itinerario #{i}, ruta vuelta #{k}"
|
133
|
-
puts e.message # Test de excepción
|
134
|
-
end
|
135
|
-
$num += 1
|
136
|
-
else
|
137
|
-
puts "No se ve el elemento numero #{i} en la ruta #{k}"
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
95
|
+
|
142
96
|
end
|
143
97
|
end
|
144
98
|
end
|
@@ -2,32 +2,14 @@
|
|
2
2
|
module Results
|
3
3
|
module Itineraries
|
4
4
|
module Payments
|
5
|
-
|
5
|
+
|
6
|
+
include PageObject
|
6
7
|
|
7
|
-
|
8
|
+
div(:popup_cuotas,:id=>"popup-payments")
|
8
9
|
|
9
|
-
|
10
|
+
span(:cerrar_popup_cuotas,:css=>"#popup-payments .popup-close-button")
|
10
11
|
|
11
|
-
|
12
|
-
unless @nuevo_cluster
|
13
|
-
if(itinerarios_elements[i].div(:class,'actions').link(:class,'payments').present?)
|
14
|
-
itinerarios_elements[i].radio(:id,/outbound/).click if itinerarios_elements[i].radio(:id,/outbound/).present?
|
15
|
-
itinerarios_elements[i].radio(:id,/inbound/).click if itinerarios_elements[i].radio(:id,/inbound/).present?
|
16
|
-
itinerarios_elements[i].div(:class,'actions').link(:class,'payments').click
|
17
|
-
popup_cuotas_element.when_visible(timeout=20)
|
18
|
-
popup = Hpricot.parse(popup_cuotas_element.html)
|
19
|
-
sleep(0.5)
|
20
|
-
popup_cuotas_element.span(:class,'popup-close-button popup-close').click
|
21
|
-
popup_cuotas_element.when_not_visible(timeout=20)
|
22
|
-
else
|
23
|
-
itinerarios_elements[i].div(:class,'actions').text.should_not match("pagos|cuotas|installments|juros")
|
24
|
-
end
|
25
|
-
else
|
26
|
-
new_validar_popup_cuotas(i)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def new_validar_popup_cuotas(i)
|
12
|
+
def validar_popup_cuotas(i)
|
31
13
|
if(itinerarios_elements[i].link(:text,/pagos|cuotas|installments|juros/).present?)
|
32
14
|
itinerarios_elements[i].radio(:id,/outbound/).click if itinerarios_elements[i].radio(:id,/outbound/).present?
|
33
15
|
itinerarios_elements[i].radio(:id,/inbound/).click if itinerarios_elements[i].radio(:id,/inbound/).present?
|
@@ -100,11 +100,7 @@ module Results
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def cargar_itinerario(itinerario)
|
103
|
-
|
104
|
-
return Results::NewCluster.new(tipo_de_busqueda,Hpricot.parse(itinerario.html))
|
105
|
-
else
|
106
|
-
return Results::OldCluster.new(tipo_de_busqueda,Hpricot.parse(itinerario.html))
|
107
|
-
end
|
103
|
+
return Results::NewCluster.new(tipo_de_busqueda,Hpricot.parse(itinerario.html))
|
108
104
|
end
|
109
105
|
|
110
106
|
def datos_de_itinerarios
|
data/features/support/version.rb
CHANGED