Skip to content

Commit

Permalink
Use normal maze-runner API key in the event of selenium failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Cawllec committed Nov 26, 2024
1 parent 9f95609 commit 9574113
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/maze/plugins/bugsnag_reporting_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def test_case(test_case)
next unless event.test_case.eql?(test_case) && event.result.failed?

Bugsnag.notify(event.result.exception) do |bsg_event|

bsg_event.api_key = ENV['MAZE_SCENARIO_BUGSNAG_API_KEY']
bsg_event.api_key = ENV['MAZE_SCENARIO_BUGSNAG_API_KEY'] unless selenium_report?(event.result.exception)

unless @last_test_step.nil?

Expand Down Expand Up @@ -54,6 +53,10 @@ def test_case(test_case)

super
end

def selenium_report?(exception)
exception.class.to_s.include?('Selenium')
end
end
end
end

0 comments on commit 9574113

Please sign in to comment.