DEV: Silence discourse.custom_html_template in its own test (#20414)
This commit is contained in:
parent
1a5318dbf7
commit
cf0c73d1b7
|
@ -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"
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue