2024-01-12 09:12:31 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
2024-05-10 13:36:09 +01:00
|
|
|
config.after(:each, :js, type: :system) do
|
2024-01-12 09:12:31 +00:00
|
|
|
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'
|
|
|
|
|
2024-01-15 21:26:11 +00:00
|
|
|
warn 'WARN: javascript warning'
|
|
|
|
warn error.message
|
2024-01-12 09:12:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|