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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 869eb50af6ffc0f094ab946ce3a02e65300f0cf5
4
- data.tar.gz: cb1343978e8f19130cefe1da8ddaa3b9e1a9b469
3
+ metadata.gz: fdaea98d94f9811dfd4f856eac40bd367c520979
4
+ data.tar.gz: 469dd269dcc06ce7c4fc2dff6f5a0bb187cfae4c
5
5
  SHA512:
6
- metadata.gz: 31406663981f396d3660f6785f46a5f63c75dab98d847a7262c5fd3b35a9c2efda3ed5210efba9b6f171f646182d930494f3cc8781fe29a645e87b45f861a5d9
7
- data.tar.gz: 54971e2d3debcb65fca67e92faab264b339601f528c57af641f065b888a17e5574af87ca13748f9188b272af2e1499853f2de5dcbd388e446b7650131412bb99
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(folder='', feature='')
14
- path = "reports/screenshots/#{folder}"
15
- if folder.empty?
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
- if scenario.passed?
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
@@ -1,5 +1,5 @@
1
1
  module Watirmark
2
2
  module Version
3
- STRING = '5.29.0'
3
+ STRING = '5.29.1'
4
4
  end
5
5
  end
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.0
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-13 00:00:00.000000000 Z
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.0
235
+ summary: watirmark 5.29.1
236
236
  test_files:
237
237
  - spec/model_traits_spec.rb
238
238
  - spec/session_spec.rb