flights_gui_tests 2.3.83 → 2.3.84
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c04d93f728b932c71083c354cd056953d5f5bc7
|
4
|
+
data.tar.gz: bda00813bcac9319e8797b72dbfa069614cab4a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82546033fc7ad31d943323d8f00fefdbc856b701ec6f1b6c44ff17fdfa1479c8fe8c1922175711ea864955ae0a9a678425422214c1de4f87c9cb8832da6a8064
|
7
|
+
data.tar.gz: 4f1ec56be62335c8aabdd8a1cbc866b404c638cb8ab282097e4ab57da96b2223093f6081f76da22c1cb4b86986b0509bc72c974b29e38f3e7129acf4db341992
|
@@ -23,10 +23,12 @@ Cuando(/^elijo un itinerario y paso a checkout$/) do
|
|
23
23
|
pending("No se encontraron vuelos de aerolineas permitidas") unless permitida
|
24
24
|
step "cierro popups"
|
25
25
|
begin
|
26
|
-
@itinerario_resultados = @page.
|
26
|
+
@itinerario_resultados = @page.itinerario(@index)
|
27
|
+
@page.elegir_itinerario(@index)
|
27
28
|
rescue Selenium::WebDriver::Error::UnknownError
|
28
29
|
step "cierro popups"
|
29
|
-
@itinerario_resultados = @page.
|
30
|
+
@itinerario_resultados = @page.itinerario(@index)
|
31
|
+
@page.elegir_itinerario(@index)
|
30
32
|
rescue Net::ReadTimeout
|
31
33
|
puts "Rompe Net::ReadTimeout"
|
32
34
|
end
|
@@ -37,7 +39,8 @@ Cuando(/^elijo un itinerario del proveedor "(.*)" y paso a checkout$/) do |prov|
|
|
37
39
|
@index, permitida = @page.sanear_itinerarios($aerolineas_prohibidas)
|
38
40
|
pending("No se encontraron vuelos de aerolineas permitidas") unless permitida
|
39
41
|
step "cierro popups"
|
40
|
-
@itinerario_resultados = @page.
|
42
|
+
@itinerario_resultados = @page.itinerario(@index)
|
43
|
+
@page.elegir_itinerario(@index)
|
41
44
|
end
|
42
45
|
|
43
46
|
Entonces(/^recorro y (?:verifico|valido) cada itinerario$/) do
|
data/features/support/hooks.rb
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
Before do |scenario|
|
3
3
|
@uow = "ROBOTFGUI-#{Socket.gethostname}-#{Time.now.strftime('%Y%m%d%H%M')}-#{scenario.tags.map{|tag| tag.name.gsub("@",'')}.join("-")}"
|
4
|
-
$browser.
|
4
|
+
$browser.alert.ok if $browser.alert.exists?
|
5
|
+
$browser.goto("http://www.despegar.com/about")
|
6
|
+
$browser.alert.ok if $browser.alert.exists?
|
5
7
|
begin
|
6
8
|
$browser.execute_script("javascript:void(document.cookie = 'X-UOW-CUSTOM=#{@uow}; Path=/')")
|
7
9
|
rescue
|
8
10
|
puts "No se pudo cargar el X-UOW"
|
9
11
|
end
|
12
|
+
$first = false
|
10
13
|
end
|
11
14
|
|
12
15
|
After do |scenario|
|
@@ -141,13 +141,16 @@ module Results
|
|
141
141
|
return index, permitida
|
142
142
|
end
|
143
143
|
|
144
|
+
def itinerario(index)
|
145
|
+
return @datos_de_itinerarios[index]
|
146
|
+
end
|
147
|
+
|
144
148
|
def elegir_itinerario(index)
|
145
149
|
cerrar_popup_alerta_element.click if cerrar_popup_alerta_element.present?
|
146
150
|
itinerarios_elements[index].div(:class,'sub-cluster outbound').radios[0].click unless tipo_de_busqueda=="multipledestinations"
|
147
151
|
itinerarios_elements[index].div(:class,'sub-cluster inbound').radios[0].click if tipo_de_busqueda=="roundtrip"
|
148
152
|
boton_comprar = itinerarios_elements[index].links(:class,/buy/).select{|boton| boton.present?}
|
149
153
|
boton_comprar.first.click
|
150
|
-
return @datos_de_itinerarios[index]
|
151
154
|
end
|
152
155
|
|
153
156
|
def datos_itinerario()
|
data/features/support/version.rb
CHANGED