diff --git a/spec/support/javascript_errors.rb b/spec/support/javascript_errors.rb index 28a43b3b8..764528536 100644 --- a/spec/support/javascript_errors.rb +++ b/spec/support/javascript_errors.rb @@ -2,7 +2,14 @@ RSpec.configure do |config| config.after(:each, :js, type: :system) do - errors = page.driver.browser.logs.get(:browser) + # Classes of intermittent ignorable errors + ignored_errors = [ + /Error while trying to use the following icon from the Manifest/, # https://github.com/mastodon/mastodon/pull/30793 + ] + errors = page.driver.browser.logs.get(:browser).reject do |error| + ignored_errors.any? { |pattern| pattern.match(error.message) } + end + if errors.present? aggregate_failures 'javascript errrors' do errors.each do |error|