From cf0c73d1b774e6804bb6b42b9b0dee303f526ee5 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 22 Feb 2023 09:29:36 +0000 Subject: [PATCH] DEV: Silence discourse.custom_html_template in its own test (#20414) --- .../acceptance/custom-html-template-test.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js index d141fd61a0d..71d65351bb7 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js @@ -3,6 +3,7 @@ import { hbs } from "ember-cli-htmlbars"; import { test } from "qunit"; import { visit } from "@ember/test-helpers"; import { registerTemporaryModule } from "discourse/tests/helpers/temporary-module-helper"; +import { withSilencedDeprecationsAsync } from "discourse-common/lib/deprecated"; acceptance("CustomHTML template", function (needs) { needs.hooks.beforeEach(() => { @@ -13,11 +14,16 @@ acceptance("CustomHTML template", function (needs) { }); test("renders custom template", async function (assert) { - await visit("/static/faq"); - assert.strictEqual( - query("span.top-span").innerText, - "TOP", - "it inserted the template" + await withSilencedDeprecationsAsync( + "discourse.custom_html_template", + async () => { + await visit("/static/faq"); + assert.strictEqual( + query("span.top-span").innerText, + "TOP", + "it inserted the template" + ); + } ); }); });