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

@ -4,7 +4,6 @@ import hbs from "htmlbars-inline-precompile";
import { module, test } from "qunit";
import CoreFabricators from "discourse/lib/fabricators";
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-message", function (hooks) {
@ -64,11 +63,9 @@ module("Discourse Chat | Component | chat-message", function (hooks) {
await this.message.cook();
await render(template);
assert.true(
query(".chat-message-text")
.innerHTML.trim()
.includes("<p>what <mark>test</mark></p>")
);
assert
.dom(".chat-message-text")
.includesHtml("<p>what <mark>test</mark></p>");
});
test("Message with reply", async function (assert) {