flights_gui_henry_tests 2.8.8 → 2.8.9
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/landing/landing_steps.rb +4 -4
- data/features/step_definitions/others/generic_steps.rb +1 -29
- data/features/step_definitions/results/search_steps.rb +9 -9
- data/features/support/env.rb +26 -1
- data/features/support/lib/process_manager.rb +1 -1
- data/flights_gui_henry_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: 88ce65cba96268505ac58c02e78537bbb536af66
|
4
|
+
data.tar.gz: 71a780061c73fc935f2def7ca801805bf05461e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e05149991909fe4d7f493b3c5c701e6479aed54534f3687ed08d463ec19b9e1fae13a674f56fbc957b879631f7884c81d97b7f3033ecd3afeff79cc5a2c76388
|
7
|
+
data.tar.gz: 9d625fbbe46f7c211602990d0916f0b1cd4f9e1935cd59f73d4b9fb16380d056f9365a9b66422793be788017f3f278a1db78c9986e3ab38ea68579e2f82e4378
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
When /^Ingreso a la home de "(.*)"/ do |site|
|
3
|
-
pending("No se inicializo el navegador") if
|
3
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
4
4
|
set_site(site)
|
5
5
|
@search = MockSearchRoundtrip.new($SITE,$ENV,"nil")
|
6
6
|
BROWSER.goto(@search.host)
|
@@ -15,7 +15,7 @@ When /^Ingreso a la home de "(.*)"/ do |site|
|
|
15
15
|
end
|
16
16
|
|
17
17
|
When /^Ingreso a la home de landing de "(.*)"$/ do |site|
|
18
|
-
pending("No se inicializo el navegador") if
|
18
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
19
19
|
set_site(site)
|
20
20
|
@search = MockSearchRoundtrip.new($SITE,$ENV,"nil")
|
21
21
|
begin
|
@@ -28,7 +28,7 @@ When /^Ingreso a la home de landing de "(.*)"$/ do |site|
|
|
28
28
|
end
|
29
29
|
|
30
30
|
When /^Ingreso a la home de landing$/ do
|
31
|
-
pending("No se inicializo el navegador") if
|
31
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
32
32
|
begin
|
33
33
|
li = BROWSER.li(:class,'flightsLink').present? ? BROWSER.li(:class,'flightsLink') : BROWSER.li(:class,'link-flights')
|
34
34
|
BROWSER.goto(li.links[0].href.gsub(/\/...\//,'/'))
|
@@ -40,7 +40,7 @@ When /^Ingreso a la home de landing$/ do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
When /^Genero resultados de landing en "(.*)"$/ do |site|
|
43
|
-
pending("No se inicializo el navegador") if
|
43
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
44
44
|
begin
|
45
45
|
set_site(site)
|
46
46
|
@search = MockSearchRoundtrip.new($SITE,$ENV,"nil")
|
@@ -1,29 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
Before do |scenario|
|
3
|
-
|
4
|
-
$trees = []
|
5
|
-
reintentos = 3
|
6
|
-
|
7
|
-
if $henry_params['browser']
|
8
|
-
begin
|
9
|
-
BROWSER = Watir::Browser.new init_browser($henry_params['browser'])
|
10
|
-
screen_width = BROWSER.execute_script("return screen.width;")
|
11
|
-
screen_height = BROWSER.execute_script("return screen.height;")
|
12
|
-
BROWSER.window.resize_to(screen_width, screen_height)
|
13
|
-
rescue Net::ReadTimeout, Selenium::WebDriver::Error::WebDriverError, ChildProcess::TimeoutError
|
14
|
-
BROWSER = nil
|
15
|
-
ProcessManager.kill_all_childs(Process.pid)
|
16
|
-
ProcessManager.chrome_zombies_collector
|
17
|
-
reintentos -= 1
|
18
|
-
sleep 5
|
19
|
-
if reintentos > 0
|
20
|
-
puts "Error Net::ReadTimeout - Reintentando abrir el browser..."
|
21
|
-
retry
|
22
|
-
else
|
23
|
-
@error_navegador = true
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
3
|
+
|
27
4
|
end
|
28
5
|
|
29
6
|
After do |scenario|
|
@@ -40,11 +17,6 @@ After do |scenario|
|
|
40
17
|
end
|
41
18
|
end
|
42
19
|
|
43
|
-
at_exit do
|
44
|
-
ProcessManager.kill_all_childs(Process.pid)
|
45
|
-
ProcessManager.chrome_zombies_collector
|
46
|
-
end
|
47
|
-
|
48
20
|
When /^Si (.*), (.*)$/ do |condition, paso |
|
49
21
|
doit = true
|
50
22
|
begin
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
When /^Ingreso a la pagina de resultados de "(.*)" para una busqueda "(.*)"$/ do |site,type|
|
3
|
-
pending("No se inicializo el navegador") if
|
3
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
4
4
|
set_site(site)
|
5
5
|
@search = Class.const_get("MockSearch#{type.capitalize}").new(site,$ENV,"nil")
|
6
6
|
BROWSER.goto(@search.generate_url_results_search)
|
@@ -9,7 +9,7 @@ When /^Ingreso a la pagina de resultados de "(.*)" para una busqueda "(.*)"$/ do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
When /^Ingreso a resultados que pase por "(.*)" en "(.*)" para una busqueda "(.*)" de tipo "(.*)"$/ do |site_url,site,type,cabotage|
|
12
|
-
pending("No se inicializo el navegador") if
|
12
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
13
13
|
set_site(site)
|
14
14
|
@search = Class.const_get("MockSearch#{type.capitalize}").new(site,$ENV,cabotage)
|
15
15
|
BROWSER.goto(@search.generate_url_results_search("",site_url))
|
@@ -18,7 +18,7 @@ When /^Ingreso a resultados que pase por "(.*)" en "(.*)" para una busqueda "(.*
|
|
18
18
|
end
|
19
19
|
|
20
20
|
When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" del tipo "(.*)"$/ do |site,type,cabotage|
|
21
|
-
pending("No se inicializo el navegador") if
|
21
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
22
22
|
set_site(site)
|
23
23
|
@search = Class.const_get("MockSearch#{type.capitalize}").new(site,$ENV,cabotage)
|
24
24
|
begin
|
@@ -31,7 +31,7 @@ When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" del
|
|
31
31
|
end
|
32
32
|
|
33
33
|
When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" con origen "(.*)" y destino "(.*)" de tipo "(.*)"$/ do |site,type,from,to,cabotage|
|
34
|
-
pending("No se inicializo el navegador") if
|
34
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
35
35
|
set_site(site)
|
36
36
|
@search = Class.const_get("MockSearch#{type.capitalize}").new(site,$ENV,cabotage,{"from"=>from.upcase,"to"=>to.upcase})
|
37
37
|
begin
|
@@ -44,7 +44,7 @@ When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" con
|
|
44
44
|
end
|
45
45
|
|
46
46
|
When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" con salida "(.*)", regreso "(.*)", origen "(.*)" y destino "(.*)" de tipo "(.*)"$/ do |site,type,date_from,date_to,from,to,cabotage|
|
47
|
-
pending("No se inicializo el navegador") if
|
47
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
48
48
|
set_site(site)
|
49
49
|
@search = Class.const_get("MockSearch#{type.capitalize}").new(site,$ENV,cabotage,{"from"=>from.upcase,"to"=>to.upcase})
|
50
50
|
@search.set_new_date(Date.parse(date_from),Date.parse(date_to))
|
@@ -59,7 +59,7 @@ When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" con
|
|
59
59
|
end
|
60
60
|
|
61
61
|
When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" que desambigue por "(.*)"$/ do |site,type,city|
|
62
|
-
pending("No se inicializo el navegador") if
|
62
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
63
63
|
set_site(site)
|
64
64
|
@search = Class.const_get("MockSearch#{type.capitalize}").new(site,$ENV,"true")
|
65
65
|
puts @search.generate_url_disambiguation_airports(city)
|
@@ -69,7 +69,7 @@ When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" que
|
|
69
69
|
end
|
70
70
|
|
71
71
|
When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" del tipo "(.*)" sin gui$/ do |site,type,cabotage|
|
72
|
-
pending("No se inicializo el navegador") if
|
72
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
73
73
|
set_site(site)
|
74
74
|
@search = Class.const_get("MockSearch#{type.capitalize}").new(site,$ENV,cabotage)
|
75
75
|
puts @search.generate_url_results_search
|
@@ -77,7 +77,7 @@ When /^Ingreso a la pagina de resultados en "(.*)" para una busqueda "(.*)" del
|
|
77
77
|
end
|
78
78
|
|
79
79
|
When /^Ingreso a la pagina de checkout de agencia en "(.*)" para una busqueda "(.*)" del tipo "(.*)"$/ do |site,type,cabotage|
|
80
|
-
pending("No se inicializo el navegador") if
|
80
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
81
81
|
set_site(site)
|
82
82
|
@search = Class.const_get("MockSearch#{type.capitalize}").new(site,$ENV,cabotage)
|
83
83
|
begin
|
@@ -91,7 +91,7 @@ When /^Ingreso a la pagina de checkout de agencia en "(.*)" para una busqueda "(
|
|
91
91
|
end
|
92
92
|
|
93
93
|
When /^Ingreso a la pagina de checkout en "(.*)" para una busqueda "(.*)" del tipo "(.*)"$/ do |site,type,cabotage|
|
94
|
-
pending("No se inicializo el navegador") if
|
94
|
+
pending("No se inicializo el navegador") if @@error_navegador
|
95
95
|
set_site(site)
|
96
96
|
@search = Class.const_get("MockSearch#{type.capitalize}").new(site,$ENV,cabotage)
|
97
97
|
begin
|
data/features/support/env.rb
CHANGED
@@ -58,4 +58,29 @@ begin
|
|
58
58
|
rescue
|
59
59
|
$ENV = "produccion"
|
60
60
|
browser = "firefox"
|
61
|
-
end
|
61
|
+
end
|
62
|
+
|
63
|
+
@@error_navegador = nil
|
64
|
+
$trees = []
|
65
|
+
reintentos = 2
|
66
|
+
|
67
|
+
if $henry_params['browser']
|
68
|
+
begin
|
69
|
+
BROWSER = Watir::Browser.new init_browser($henry_params['browser'])
|
70
|
+
screen_width = BROWSER.execute_script("return screen.width;")
|
71
|
+
screen_height = BROWSER.execute_script("return screen.height;")
|
72
|
+
BROWSER.window.resize_to(screen_width, screen_height)
|
73
|
+
rescue Net::ReadTimeout, Selenium::WebDriver::Error::WebDriverError, ChildProcess::TimeoutError
|
74
|
+
BROWSER = nil
|
75
|
+
ProcessManager.kill_all_childs(Process.pid)
|
76
|
+
ProcessManager.chrome_zombies_collector
|
77
|
+
reintentos -= 1
|
78
|
+
sleep 5
|
79
|
+
if reintentos > 0
|
80
|
+
puts "Error Net::ReadTimeout - Reintentando abrir el browser..."
|
81
|
+
retry
|
82
|
+
else
|
83
|
+
@@error_navegador = true
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -97,7 +97,7 @@ class ProcessManager
|
|
97
97
|
zombies_parent.each do |parent|
|
98
98
|
parent_info = process_info(parent)
|
99
99
|
##Parent == 1, si se volvió huerfano
|
100
|
-
kill_process(parent.to_i) if parent_info[:parent] == '1' and parent_info[:cmd].match(/chrome/)
|
100
|
+
kill_process(parent.to_i) if parent_info[:parent] == '1' and parent_info[:cmd] and parent_info[:cmd].match(/chrome/)
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
gem.name = "flights_gui_henry_tests" #Debe ser unico en el Gem Server, tratemos de utilizar nombre que identifiquen de forma inequivoca
|
15
15
|
|
16
16
|
gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]5
|
17
|
-
gem.version = '2.8.
|
17
|
+
gem.version = '2.8.9' #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.82')
|
20
20
|
gem.add_dependency('watir-webdriver')
|