DEV: Silence discourse.custom_html_template in its own test (#20414)

This commit is contained in:
David Taylor 2023-02-22 09:29:36 +00:00 committed by GitHub
parent 1a5318dbf7
commit cf0c73d1b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 5 deletions

View File

@ -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"
);
}
);
});
});