2024-01-12 18:12:31 +09:00
|
|
|
# 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'
|
|
|
|
|
2024-01-16 06:26:11 +09:00
|
|
|
warn 'WARN: javascript warning'
|
|
|
|
warn error.message
|
2024-01-12 18:12:31 +09:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|