mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 18:00:39 -06:00
DEV: Unsilence d-section deprecation (#29851)
This commit is contained in:
parent
6f7c581a80
commit
daa34b9e11
@ -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",
|
||||
|
@ -1,4 +1,4 @@
|
||||
<DSection @pageClass="user-preferences-tracking" />
|
||||
{{body-class "user-preferences-tracking-page"}}
|
||||
|
||||
<div class="user-preferences__tracking-topics-wrapper">
|
||||
<label class="control-label">{{i18n "user.topics_settings"}}</label>
|
||||
|
@ -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(<template>
|
||||
<DSection @pageClass="test" @bodyClass="foo bar" class="special">
|
||||
testing!
|
||||
</DSection>
|
||||
</template>);
|
||||
await withSilencedDeprecationsAsync("discourse.d-section", async () => {
|
||||
await render(<template>
|
||||
<DSection @pageClass="test" @bodyClass="foo bar" class="special">
|
||||
testing!
|
||||
</DSection>
|
||||
</template>);
|
||||
});
|
||||
|
||||
assert.dom(".special").hasText("testing!");
|
||||
assert.strictEqual(document.body.className, "test-page foo bar");
|
||||
|
Loading…
Reference in New Issue
Block a user