You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
glitchier-soc/spec/support/javascript_errors.rb

19 lines
478 B

# frozen_string_literal: true
RSpec.configure do |config|
config.after(:each, type: :system) do
errors = page.driver.browser.logs.get(:browser)
if errors.present?
aggregate_failures 'javascript errrors' do
errors.each do |error|
expect(error.level).to_not eq('SEVERE'), error.message
next unless error.level == 'WARNING'
warn 'WARN: javascript warning'
warn error.message
end
end
end
end
end