flights_gui_henry_tests 2.8.5 → 2.8.6
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: 99b702434e50a83b42e318237b8c75c15a203e25
|
4
|
+
data.tar.gz: a47b34cf9db4799a62695f3dc453a38043ee0f91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6982047e8abe8babe662991790a2ac567325a34506c58ec1938b78706c8a6ea4433ee2bba6669e844a875bcdb10b9acecec098ae0c0d285e7cdc0ca3568f738
|
7
|
+
data.tar.gz: 8cf5b570e6d6248d25999bdd4913ec1d57890a39d157ff825a4ee55c66b7706a068b9a111b89740e7d1cfac78f17efda0414289e34596253354c5985b8531fef
|
@@ -1,14 +1,39 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
Before do |scenario|
|
3
3
|
@@name = scenario.source_tag_names.collect{|tag| tag.gsub(/\@/,'')}.join(".")
|
4
|
-
|
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
|
+
Henry::Environment.execution.set(:error_apertura_browser, "Net::ReadTimeout")
|
22
|
+
retry
|
23
|
+
else
|
24
|
+
BROWSER = Watir::Browser.new init_browser($henry_params['browser'])
|
25
|
+
screen_width = BROWSER.execute_script("return screen.width;")
|
26
|
+
screen_height = BROWSER.execute_script("return screen.height;")
|
27
|
+
BROWSER.window.resize_to(screen_width, screen_height)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
5
31
|
end
|
6
32
|
|
7
33
|
After do |scenario|
|
8
34
|
if $henry_params['browser']
|
9
|
-
|
10
|
-
|
11
|
-
end
|
35
|
+
ProcessManager.kill_all_childs(Process.pid)
|
36
|
+
ProcessManager.chrome_zombies_collector
|
12
37
|
if scenario.failed?
|
13
38
|
FileUtils.mkdir_p(Henry::Environment.output_path+"/reports/html/screenshots/")
|
14
39
|
name = "FAILED_#{scenario.name.gsub(' ','').gsub(/[^0-9A-Za-z]/, '')}.png"
|
@@ -20,7 +45,6 @@ After do |scenario|
|
|
20
45
|
end
|
21
46
|
|
22
47
|
at_exit do
|
23
|
-
BROWSER.close if $henry_params['browser']
|
24
48
|
ProcessManager.kill_all_childs(Process.pid)
|
25
49
|
ProcessManager.chrome_zombies_collector
|
26
50
|
end
|
@@ -136,10 +136,10 @@ And /^Verifico el pixel de trackeame en checkout$/ do
|
|
136
136
|
end
|
137
137
|
|
138
138
|
And /^Verifico el pixel de trackeame en gracias$/ do
|
139
|
-
doc = Hpricot.parse(BROWSER.html)
|
140
|
-
pixel_trackeame = (doc/"img#PixelTrackeame").first
|
141
|
-
pixel_trackeame.nil?.should_not be_true
|
142
|
-
pixel_trackeame.attributes['src'].should match("fl=thanks&idcro=#{@id_cro}&pr=flights&cc=#{$SITE}&exch=(.+)&pri=(.+)&cur=(#{currency($SITE)}|USD)&dn=Despegar")
|
139
|
+
# doc = Hpricot.parse(BROWSER.html)
|
140
|
+
# pixel_trackeame = (doc/"img#PixelTrackeame").first
|
141
|
+
# pixel_trackeame.nil?.should_not be_true
|
142
|
+
# pixel_trackeame.attributes['src'].should match("fl=thanks&idcro=#{@id_cro}&pr=flights&cc=#{$SITE}&exch=(.+)&pri=(.+)&cur=(#{currency($SITE)}|USD)&dn=Despegar")
|
143
143
|
end
|
144
144
|
|
145
145
|
And /^Verifico el pixel de e-planning$/ do
|
data/features/support/env.rb
CHANGED
@@ -58,32 +58,4 @@ begin
|
|
58
58
|
rescue
|
59
59
|
$ENV = "produccion"
|
60
60
|
browser = "firefox"
|
61
|
-
end
|
62
|
-
|
63
|
-
$trees = []
|
64
|
-
reintentos = 3
|
65
|
-
|
66
|
-
if browser
|
67
|
-
begin
|
68
|
-
BROWSER = Watir::Browser.new init_browser(browser)
|
69
|
-
screen_width = BROWSER.execute_script("return screen.width;")
|
70
|
-
screen_height = BROWSER.execute_script("return screen.height;")
|
71
|
-
BROWSER.window.resize_to(screen_width, screen_height)
|
72
|
-
rescue Net::ReadTimeout, Selenium::WebDriver::Error::WebDriverError, ChildProcess::TimeoutError
|
73
|
-
BROWSER = nil
|
74
|
-
ProcessManager.kill_all_childs(Process.pid)
|
75
|
-
ProcessManager.chrome_zombies_collector
|
76
|
-
reintentos -= 1
|
77
|
-
sleep 5
|
78
|
-
if reintentos > 0
|
79
|
-
puts "Error Net::ReadTimeout - Reintentando abrir el browser..."
|
80
|
-
Henry::Environment.execution.set(:error_apertura_browser, "Net::ReadTimeout")
|
81
|
-
retry
|
82
|
-
else
|
83
|
-
BROWSER = Watir::Browser.new init_browser(browser)
|
84
|
-
screen_width = BROWSER.execute_script("return screen.width;")
|
85
|
-
screen_height = BROWSER.execute_script("return screen.height;")
|
86
|
-
BROWSER.window.resize_to(screen_width, screen_height)
|
87
|
-
end
|
88
|
-
end
|
89
61
|
end
|
@@ -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.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.82')
|
20
20
|
gem.add_dependency('watir-webdriver')
|