DEV: Use the new hasHtml/includesHtml from qunit-dom (#29680)

This commit is contained in:
Jarek Radosz
2024-11-11 13:06:12 +01:00
committed by GitHub
parent 95fa997e4b
commit e68905510d
35 changed files with 404 additions and 495 deletions

View File

@ -3,7 +3,6 @@ import { render } from "@ember/test-helpers";
import hbs from "htmlbars-inline-precompile";
import { module, test } from "qunit";
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
import { query } from "discourse/tests/helpers/qunit-helpers";
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
module("Discourse Chat | Component | chat-thread-list-item", function (hooks) {
@ -17,9 +16,8 @@ module("Discourse Chat | Component | chat-thread-list-item", function (hooks) {
<Chat::ThreadList::Item @thread={{this.thread}} />
`);
assert.equal(
query(".chat-thread-list-item__title").innerHTML.trim(),
"&lt;style&gt;body { background: red;}&lt;/style&gt;"
);
assert
.dom(".chat-thread-list-item__title")
.hasHtml("&lt;style&gt;body { background: red;}&lt;/style&gt;");
});
});