A platform for community discussion. Free, open, simple.
DEV: Suppress an expected deprecation in the summary (#39786)
Jarek Radosz0efc11ef4935
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rbindex 2af96476fd0..fc0581eac05 100644--- a/spec/rails_helper.rb+++ b/spec/rails_helper.rb@@ -1053,10 +1053,13 @@ RSpec.configure do |config|expect(deprecation_error).to be_nil, deprecation_error+ expected_deprecations = RSpec.current_example.metadata[:expected_js_deprecations] || []+$playwright_logger&.logs&.each do |log|next if log[:level] != "count"deprecation_id = log[:message][/^deprecation_id:(.+?):\s*\d+$/, 1]next if deprecation_id.nil?+ next if expected_deprecations.include?(deprecation_id)deprecations = RSpec.current_example.metadata[:js_deprecations] ||= Hash.new(0)deprecations[deprecation_id] += 1diff --git a/spec/system/ember_deprecation_spec.rb b/spec/system/ember_deprecation_spec.rbindex 50a45b64247..dd9c89cce0d 100644--- a/spec/system/ember_deprecation_spec.rb+++ b/spec/system/ember_deprecation_spec.rb@@ -54,7 +54,8 @@ describe "JS Deprecation Handling" doexpect(message).to have_text(SiteSetting.warn_critical_js_deprecations_message)end- it "emits ember-this-fallback deprecation for theme .hbs connectors using property fallback" do+ it "emits ember-this-fallback deprecation for theme .hbs connectors using property fallback",+ expected_js_deprecations: %w[ember-this-fallback.this-property-fallback] dot = Fabricate(:theme, name: "Theme With Hbs Connector")t.set_field(target: :extra_js,