Sha256: 8793b0602a0269764abb141ce58b975927215e986b40425ec565b44d1ecab876
Contents?: true
Size: 1.54 KB
Versions: 9
Compression:
Stored size: 1.54 KB
Contents
Before do window = Capybara.current_session.current_window window.resize_to(1366, 768) window.maximize @page = ->(klass) { klass.new } end After do |scenario| take_screenshot(scenario) exception_message(scenario) end def exception_message(scenario) scene = scenario.failed? return unless scene == true print_reason(scenario) end def print_reason(scenario) log("\n-------------") log("\nINCONSISTENCY") log("\n-------------") log("\nš„š„š„ #{scenario.exception.message.split('(')[0]}") end AfterConfiguration do |config| config.on_event(:test_case_finished) do |event| puts "\n--------------------------------------------------------------------------------------------------" puts 'Results:' puts " - Scenario: #{event.test_case.name}" puts " - Result..: [ #{event.result.passed? ? 'ā ]' : 'ā ]'}" puts "--------------------------------------------------------------------------------------------------\n" end end at_exit do @infos = { 'Browser' => Capybara.default_driver.to_s.capitalize, 'Environment' => ENV['ENV_TYPE'], 'Data do Teste' => Time.now.strftime('%d/%B/%Y'), 'Hora do Teste' => Time.now.strftime('%H:%M:%S') } ReportBuilder.configure do |config| config.input_path = 'report/report.json' config.report_path = 'report/report' config.report_types = [:html] config.report_title = '[SaudeId] - My Title' config.additional_info = @infos config.color = 'indigo' end ReportBuilder.build_report end
Version data entries
9 entries across 9 versions & 2 rubygems