From daa34b9e11cb2ec322201fd684c096018a79541f Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 20 Nov 2024 15:27:19 +0000 Subject: [PATCH] DEV: Unsilence d-section deprecation (#29851) --- .../discourse-common/addon/deprecation-workflow.js | 1 - .../app/templates/preferences/tracking.hbs | 2 +- .../tests/integration/components/d-section-test.gjs | 13 ++++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/discourse-common/addon/deprecation-workflow.js b/app/assets/javascripts/discourse-common/addon/deprecation-workflow.js index dc7384dcfe3..4e35373ee66 100644 --- a/app/assets/javascripts/discourse-common/addon/deprecation-workflow.js +++ b/app/assets/javascripts/discourse-common/addon/deprecation-workflow.js @@ -4,7 +4,6 @@ const DEPRECATION_WORKFLOW = [ matchId: "ember-this-fallback.this-property-fallback", }, { handler: "silence", matchId: "discourse.select-kit" }, - { handler: "silence", matchId: "discourse.d-section" }, { handler: "silence", matchId: "discourse.decorate-widget.hamburger-widget-links", diff --git a/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs b/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs index 943ddddc306..49700bff811 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs @@ -1,4 +1,4 @@ - +{{body-class "user-preferences-tracking-page"}}
diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-section-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/d-section-test.gjs index 12b46da2bc3..b29b90a0f7b 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/d-section-test.gjs +++ b/app/assets/javascripts/discourse/tests/integration/components/d-section-test.gjs @@ -2,16 +2,19 @@ import { render } from "@ember/test-helpers"; import { module, test } from "qunit"; import DSection from "discourse/components/d-section"; import { setupRenderingTest } from "discourse/tests/helpers/component-test"; +import { withSilencedDeprecationsAsync } from "discourse-common/lib/deprecated"; module("Integration | Component | d-section", function (hooks) { setupRenderingTest(hooks); test("can set classes on the body element", async function (assert) { - await render(); + await withSilencedDeprecationsAsync("discourse.d-section", async () => { + await render(); + }); assert.dom(".special").hasText("testing!"); assert.strictEqual(document.body.className, "test-page foo bar");