watirmark 5.29.0 → 5.29.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/watirmark/cucumber/hook_helper.rb +3 -11
- data/lib/watirmark/cucumber/hooks.rb +1 -10
- data/lib/watirmark/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdaea98d94f9811dfd4f856eac40bd367c520979
|
4
|
+
data.tar.gz: 469dd269dcc06ce7c4fc2dff6f5a0bb187cfae4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 373699cc4350cd23cf4dde6002d491cdcf2869e1fd051631c15f98c396f74e7321567e9a4148e9bf6a056e0ab24183fd79a1ed3e5af4b5cf44cddc83103c8dbf
|
7
|
+
data.tar.gz: dad1eeafee811eb4fea56345e6a15698824d12c208ce2e040a2d96324eb9b03c1a3c47fb8eab9f684b414c1e854e07f866093fb82dd7a1b17a69f5aeafe2f986
|
@@ -10,20 +10,12 @@ module HookHelper
|
|
10
10
|
end
|
11
11
|
|
12
12
|
|
13
|
-
def take_screenshot
|
14
|
-
|
15
|
-
|
16
|
-
image = "#{Time.now.to_i}-#{UUID.new.generate(:compact)}.png"
|
17
|
-
else
|
18
|
-
image = "#{feature}.png"
|
19
|
-
end
|
13
|
+
def take_screenshot
|
14
|
+
image = "#{Time.now.to_i}-#{UUID.new.generate(:compact)}.png"
|
15
|
+
path = "reports/screenshots"
|
20
16
|
file = "#{path}/#{image}"
|
21
17
|
FileUtils.mkdir_p path unless File.directory? path
|
22
18
|
begin
|
23
|
-
if Page.browser.alert.exists?
|
24
|
-
Watirmark.logger.warn("Alert is Open while taking screenshot: #{Page.browser.alert.text}")
|
25
|
-
Page.browser.alert.close
|
26
|
-
end
|
27
19
|
Page.browser.screenshot.save file
|
28
20
|
data = File.open(file, 'rb') { |f| f.read }
|
29
21
|
data = Base64.encode64(data)
|
@@ -13,16 +13,7 @@ Before do |scenario|
|
|
13
13
|
end
|
14
14
|
|
15
15
|
After do |scenario|
|
16
|
-
|
17
|
-
prepend = 'p_'
|
18
|
-
elsif scenario.failed?
|
19
|
-
prepend = 'f_'
|
20
|
-
else
|
21
|
-
prepend = 'i_'
|
22
|
-
end
|
23
|
-
folder = scenario.location.to_s[/\/features\/([^\.]*)/, 1]
|
24
|
-
feature = prepend+scenario.title.tr(' ', '_')
|
25
|
-
(file, file_type) = HookHelper.take_screenshot(folder, feature)
|
16
|
+
(file, file_type) = HookHelper.take_screenshot
|
26
17
|
embed file, file_type
|
27
18
|
HookHelper.serialize_models
|
28
19
|
end
|
data/lib/watirmark/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watirmark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.29.
|
4
|
+
version: 5.29.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hugh McGowan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: watir-webdriver
|
@@ -232,7 +232,7 @@ rubyforge_project:
|
|
232
232
|
rubygems_version: 2.4.8
|
233
233
|
signing_key:
|
234
234
|
specification_version: 4
|
235
|
-
summary: watirmark 5.29.
|
235
|
+
summary: watirmark 5.29.1
|
236
236
|
test_files:
|
237
237
|
- spec/model_traits_spec.rb
|
238
238
|
- spec/session_spec.rb
|