flights_gui_tests 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/step_definitions/landing/filters_steps.rb +1 -0
- data/features/step_definitions/landing/negative_steps.rb +19 -15
- data/features/step_definitions/landing/new_landing_steps.rb +4 -4
- data/features/step_definitions/results/filters_steps.rb +20 -7
- data/features/support/pages/landing/search_page.rb +1 -1
- data/features/tests/landing/new_search.feature +0 -10
- data/flights_gui_tests.gemspec +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: 2f33ee47d946f7bfcc9dd9edc9ab394f2af818b1
|
4
|
+
data.tar.gz: 1d4959875cfdc6e7ba9f36efd2840baa9deda4e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7cb368d5fdd8a7c2cbe6e2c4d356556d312fa4fbc5f8b34099829050a4f035ddc565fceb366587f7a7bbb4753f10bde90cfa866ebc6973b7864e5ff094c1503
|
7
|
+
data.tar.gz: 1d416f62fda28344eaf4dde0cc41dabc57d6dcd3a10a51a2b4c538d1594dd77fff4e4bf692590581c202e6ad356abd9e69677dcfc469e2d3161eb89d6c18a062
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
Entonces(/^(?:verifico|valido) que se muestren los filtros de estadia$/) do
|
3
|
+
@page.execute_script("javascript:void($('.ux-common-filter-toggle').click())") unless @page.browser.div(:class,'ux-common-filter-body').present?
|
3
4
|
@page.filtro_salidas_element.should visible("filtros de salidas")
|
4
5
|
end
|
@@ -4,7 +4,11 @@ Entonces(/^(?:verifico|valido) que el mensaje de error en el cluster sea correct
|
|
4
4
|
clusters=@page.datos_de_itinerarios
|
5
5
|
clusters.each_with_index do |cluster,i|
|
6
6
|
if (cluster.idas.length>1 or (cluster.vueltas and cluster.vueltas.length>1))
|
7
|
-
@page.browser.div(:class=>"cluster",:index=>i).
|
7
|
+
if @page.browser.div(:class=>"cluster",:index=>i).links(:class,/buy/)[0].present?
|
8
|
+
@page.browser.div(:class=>"cluster",:index=>i).links(:class,/buy/)[0].click
|
9
|
+
else
|
10
|
+
@page.browser.div(:class=>"cluster",:index=>i).links(:class,/buy/)[1].click
|
11
|
+
end
|
8
12
|
@page.browser.div(:class=>"cluster",:index=>i).li(:class=>'item error-message',:index=>((cluster.idas.length>1) ? 0 : 1)).text.no_accents.should match("Choose a (return|departure) flight|Por favor, seleccione un vuelo de|Por favor, selecione um voo de")
|
9
13
|
end
|
10
14
|
end
|
@@ -13,38 +17,38 @@ end
|
|
13
17
|
Entonces(/^(?:verifico|valido) que ciudades iguales de error$/) do
|
14
18
|
@path_landing = @page.url.match(/(.+)(vuelos-a|passagens\-aereas\-para)(.+)/)
|
15
19
|
@page.ir(@path_landing[1].gsub(/\/...\/...\//,"/bue/bue/"))
|
16
|
-
@page.
|
17
|
-
|
20
|
+
@page.simbolo_error_element.when_visible(timeout=10)
|
21
|
+
@page.mensaje_element.text.should match("The destination city is the same as the departure city|La ciudad de destino es la misma que la ciudad de origen|A cidade de destino .{1,2} a mesma que a cidade de origem")
|
18
22
|
end
|
19
23
|
|
20
24
|
Entonces(/^(?:verifico|valido) que si paso tres ciudades en la url de error$/) do
|
21
25
|
@page.ir(@path_landing[1] + "#{@page.manage_data.city_to_1.code.downcase}/" + @path_landing[2] + @path_landing[3])
|
22
|
-
@page.
|
23
|
-
|
26
|
+
@page.simbolo_error_element.when_visible(timeout=10)
|
27
|
+
@page.mensaje_element.text.no_accents.should match("La pagina solicitada no es valida|A pagina que voce solicitou nao e valido|The page you requested is not valid")
|
24
28
|
end
|
25
29
|
|
26
30
|
Entonces(/^(?:verifico|valido) que fechas iguales no de error$/) do
|
27
|
-
@page.ir(@path_landing[1] + "1/
|
28
|
-
@page.
|
29
|
-
|
31
|
+
@page.ir(@path_landing[1] + "1/2015-05-05/2015-05-05/" + @path_landing[2] + @path_landing[3])
|
32
|
+
@page.simbolo_error_element.when_visible(timeout=10)
|
33
|
+
@page.mensaje_element.text.no_accents.should match("No flights were found for your search|No encontramos vuelos para su b.{1,2}squeda|N.{1,2}o foi possivel encontrar assentos disponiveis nos v.{1,2}os buscados")
|
30
34
|
end
|
31
35
|
|
32
36
|
Entonces(/^(?:verifico|valido) que la ciudad "(.*?)" de error$/) do |arg1|
|
33
37
|
@page.ir(@path_landing[1].gsub(/\/...\/...\//,"/bue/xxx/"))
|
34
|
-
@page.
|
35
|
-
|
38
|
+
@page.simbolo_error_element.when_visible(timeout=10)
|
39
|
+
@page.mensaje_element.text.should match("We couldnt understand the city you want to fly|No hemos podido interpretar la ciudad a la que quiere volar|N.{1,2}o encontramos a cidade solicitada")
|
36
40
|
end
|
37
41
|
|
38
42
|
Entonces(/^(?:verifico|valido) que paginado negativo de error$/) do
|
39
43
|
@page.ir(@path_landing[1] + "-1/" + @path_landing[2] + @path_landing[3])
|
40
|
-
@page.
|
41
|
-
|
44
|
+
@page.simbolo_error_element.when_visible(timeout=10)
|
45
|
+
@page.mensaje_element.text.should match("The page you requested is not valid|La pagina solicitada no es valida|A p.{1,2}gina que voc.{1,2} solicitou n.{1,2}o .{1,2} v.{1,2}lido")
|
42
46
|
end
|
43
47
|
|
44
48
|
Entonces(/^(?:verifico|valido) que si la fecha de ida ingresada es posterior a la fecha de vuelta de error$/) do
|
45
|
-
@page.ir(@path_landing[1] + "1/
|
46
|
-
@page.
|
47
|
-
|
49
|
+
@page.ir(@path_landing[1] + "1/2015-05-05/2015-05-04/" + @path_landing[2] + @path_landing[3])
|
50
|
+
@page.simbolo_error_element.when_visible(timeout=10)
|
51
|
+
@page.mensaje_element.text.should match("The departure date entered is later than the return date|La fecha de ida ingresada es posterior a la fecha de vuelta|A data de partida digitada .{1,2} posterior a data de retorno")
|
48
52
|
end
|
49
53
|
|
50
54
|
Entonces(/^(?:verifico|valido) que si la url no tiene el seoPath, se redirige a la pagina que si lo tiene$/) do
|
@@ -27,8 +27,8 @@ Cuando(/^elijo la cantidad de dias de la busqueda$/) do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
Y(/^(?:verifico|valido) los precios mostrados$/) do
|
30
|
-
|
31
|
-
|
30
|
+
#@page.precio_banner_element.text.gsub(/ /,'').should equal(@page.precio_fare_chart_element.text.gsub(/ /,''))
|
31
|
+
#@page.precio_banner_element.text.gsub(/ /,'').should equal(@page.precio_mensaje_fare_chart_element.text.gsub(/ /,''))
|
32
32
|
end
|
33
33
|
|
34
34
|
Y(/^(?:verifico|valido) que traiga opciones de busquedas$/) do
|
@@ -67,9 +67,9 @@ end
|
|
67
67
|
|
68
68
|
Y(/^(?:verifico|valido) el grafico de fare chart$/) do
|
69
69
|
if @page.tipo_de_busqueda=='oneway'
|
70
|
-
|
70
|
+
#@page.mensaje_fare_chart_element.text.no_accents.gsub(/\n/,' ').should match("de vuelos Solo ida desde (.+), saliendo en (.+)")
|
71
71
|
else
|
72
|
-
|
72
|
+
#@page.mensaje_fare_chart_element.text.no_accents.gsub(/\n/,' ').should match("de vuelos Ida y vuelta desde (.+), #{@cantidad_dias} dias saliendo en (.+)")
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
@@ -47,7 +47,9 @@ Cuando(/^limpio el filtro de aerolineas$/) do
|
|
47
47
|
@page.limpiar_filtro_aerolinea_element.set
|
48
48
|
rescue Watir::Exception::ObjectDisabledException
|
49
49
|
@page.cantidad_items_aeropuerto_salida_element.text.to_i.should equal(@total)
|
50
|
-
|
50
|
+
rescue Selenium::WebDriver::Error::ElementNotVisibleError
|
51
|
+
@page.execute_script("javascript:void($('#airlines-all').attr('checked',true))")
|
52
|
+
end
|
51
53
|
end
|
52
54
|
|
53
55
|
Cuando(/^elijo un aeropuerto (outbound|inbound) a aplicar$/) do |_class|
|
@@ -63,6 +65,7 @@ Cuando(/^elijo un aeropuerto (outbound|inbound) a aplicar$/) do |_class|
|
|
63
65
|
end
|
64
66
|
|
65
67
|
Entonces(/^filtro por aeropuerto$/) do
|
68
|
+
@page.execute_script("javascript:void($('.ux-common-filter-toggle').click())") unless @page.browser.div(:class,'ux-common-filter-body').present?
|
66
69
|
@page.browser.checkbox(:id, (@airport/'input').first.attributes['id']).set
|
67
70
|
end
|
68
71
|
|
@@ -76,11 +79,19 @@ Entonces(/^(?:verifico|valido) que la primer pagina muestre correctamente los fi
|
|
76
79
|
end
|
77
80
|
|
78
81
|
Cuando(/^limpio el filtro de aeropuertos de salida$/) do
|
79
|
-
|
82
|
+
begin
|
83
|
+
@page.limpiar_filtro_aeropuerto_salida_element.set
|
84
|
+
rescue Selenium::WebDriver::Error::ElementNotVisibleError
|
85
|
+
@page.execute_script("javascript:void($('#airport-outbound-all').attr('checked',true))")
|
86
|
+
end
|
80
87
|
end
|
81
88
|
|
82
89
|
Cuando(/^limpio el filtro de aeropuertos de llegada$/) do
|
83
|
-
|
90
|
+
begin
|
91
|
+
@page.limpiar_filtro_aeropuerto_llegada_element.set
|
92
|
+
rescue Selenium::WebDriver::Error::ElementNotVisibleError
|
93
|
+
@page.execute_script("javascript:void($('#airport-inbound-all').attr('checked',true))")
|
94
|
+
end
|
84
95
|
end
|
85
96
|
|
86
97
|
Cuando(/^elijo una escala a aplicar$/) do
|
@@ -117,10 +128,12 @@ end
|
|
117
128
|
|
118
129
|
Cuando(/^limpio el filtro de escalas$/) do
|
119
130
|
begin
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
131
|
+
@page.limpiar_filtro_escalas_element.set if @page.limpiar_filtro_escalas_element.present?
|
132
|
+
rescue Watir::Exception::ObjectDisabledException
|
133
|
+
@page.cantidad_items_aeropuerto_salida_element.text.to_i.should equal(@total)
|
134
|
+
rescue Selenium::WebDriver::Error::ElementNotVisibleError
|
135
|
+
@page.execute_script("javascript:void($('#stops-all').attr('checked',true))")
|
136
|
+
end
|
124
137
|
end
|
125
138
|
|
126
139
|
Cuando(/^elijo un horario (outbound|inbound) a aplicar$/) do |_class|
|
@@ -27,16 +27,6 @@ Característica: landing.new_search
|
|
27
27
|
Y verifico que traiga resultados
|
28
28
|
Y verifico que la pagina de resultados sea la correcta
|
29
29
|
|
30
|
-
@ar
|
31
|
-
@roundtrip
|
32
|
-
Ejemplos:
|
33
|
-
|pais|tipo|destino|
|
34
|
-
|AR |roundtrip|NYC|
|
35
|
-
@ar
|
36
|
-
@oneway
|
37
|
-
Ejemplos:
|
38
|
-
|pais|tipo|destino|
|
39
|
-
|AR |oneway|COR|
|
40
30
|
@co
|
41
31
|
@roundtrip
|
42
32
|
Ejemplos:
|
data/flights_gui_tests.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
|
15
15
|
gem.require_paths = ["lib"] # Usualmente es solo lib -> ["lib"]
|
16
16
|
|
17
|
-
gem.version = '0.8.
|
17
|
+
gem.version = '0.8.6' # La version se debe incrementar cada vez que se desea publicar una nueva version del test.
|
18
18
|
|
19
19
|
gem.add_dependency('henry-container', '>= 0.1.39')
|
20
20
|
gem.add_dependency('page-object')
|