rajatthareja/ReportBuilder

Embedded reports broken in version 1.0

Closed this issue · 2 comments

After upgrading from 0.1.6 to 1.0, the embedded screenshots no longer display in the report. I'm using the following code to embed the images:
In hooks.rb -

After do |scenario|
  if !@settings.debug && scenario.failed? && !@browser.nil?
    encoded_image = @browser.screenshot.base64
    embed("data:image/png;base64,#{encoded_image}","image/png")
  end
end

In the report builder script file -

require 'report_builder'

html_report_name = ARGV[0]
app_id = ARGV[1]

ReportBuilder.configure do |config|
  config.json_path = '.'
  config.report_path = html_report_name.gsub(/\.html/,'')
  config.report_types = [:html]
  config.report_tabs = [:features, :scenarios, :errors]
  config.report_title = "title - #{app_id}"
end

ReportBuilder.build_report

When I get a set of files that I can upload without disclosing customer data I will.

Embedded screenshot stopped working for me after 0.1.4, and still don't work for me in 1.0.0. In 1.0.0 it displays like �O�(����Agg'DQtz9�V;�}�h4������G,@��h���>������J%��������0RM """"""""""""�����J���f�(���j��2� mmmN-��j�V�G�e���s6H}...

@abaird Thanks for reporting, Issue is fixed now. 16de74f

@rockwig Please provide more details and raise a new issue.