From 8ef59729a10fd77121507dcf9ef5138ff9037d39 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 25 Jun 2024 09:57:40 -0400 Subject: [PATCH] Ignore intermittent chrome/manifest/icon interaction failure (#30793) --- spec/support/javascript_errors.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/support/javascript_errors.rb b/spec/support/javascript_errors.rb index 28a43b3b8a..7645285362 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|