mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 12:08:06 +01:00
18 lines
483 B
Ruby
18 lines
483 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.configure do |config|
|
|
config.after(:each, :js, 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
|