mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 00:57:54 +08:00
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 { test } from "qunit";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { registerTemporaryModule } from "discourse/tests/helpers/temporary-module-helper";
|
import { registerTemporaryModule } from "discourse/tests/helpers/temporary-module-helper";
|
||||||
|
import { withSilencedDeprecationsAsync } from "discourse-common/lib/deprecated";
|
||||||
|
|
||||||
acceptance("CustomHTML template", function (needs) {
|
acceptance("CustomHTML template", function (needs) {
|
||||||
needs.hooks.beforeEach(() => {
|
needs.hooks.beforeEach(() => {
|
||||||
@ -13,11 +14,16 @@ acceptance("CustomHTML template", function (needs) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("renders custom template", async function (assert) {
|
test("renders custom template", async function (assert) {
|
||||||
|
await withSilencedDeprecationsAsync(
|
||||||
|
"discourse.custom_html_template",
|
||||||
|
async () => {
|
||||||
await visit("/static/faq");
|
await visit("/static/faq");
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
query("span.top-span").innerText,
|
query("span.top-span").innerText,
|
||||||
"TOP",
|
"TOP",
|
||||||
"it inserted the template"
|
"it inserted the template"
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user