From 74252e9d135af219d5fcae3c2758c4f7edb75532 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sun, 9 Aug 2020 14:02:07 +0100 Subject: [PATCH 1/2] Suppress Selenium warnings in test log output. --- spec/spec_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9e42ff6191..e50b4ea4b7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -181,6 +181,10 @@ RSpec.configure do |config| config.include JsonSpec::Helpers + # Suppress Selenium deprecation warnings. Stops a flood of pointless warnings filling the + # test output. We can remove this in the future after upgrading Rails, Rack, and Capybara. + Selenium::WebDriver.logger.level = :error + # Profiling # # This code shouldn't be run in normal circumstances. But if you want to know From 0edeb82c32eee867796ae6637541624fc1307407 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Tue, 11 Aug 2020 14:02:49 +0200 Subject: [PATCH 2/2] Update spec/spec_helper.rb Co-authored-by: Maikel --- spec/spec_helper.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e50b4ea4b7..d4130a9d2d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -183,7 +183,13 @@ RSpec.configure do |config| # Suppress Selenium deprecation warnings. Stops a flood of pointless warnings filling the # test output. We can remove this in the future after upgrading Rails, Rack, and Capybara. - Selenium::WebDriver.logger.level = :error + if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 0 + Selenium::WebDriver.logger.level = :error + else + ActiveSupport::Deprecation.warn( + "Suppressing Selenium deprecation warnings is not needed any more." + ) + end # Profiling #