DEV: Update visible/invisible uses to qunit-dom (#29672)

This commit is contained in:
Jarek Radosz
2024-11-10 01:41:50 +01:00
committed by GitHub
parent de6d575d40
commit f9e58938ce
13 changed files with 196 additions and 261 deletions

View File

@ -3,7 +3,6 @@ import { click, 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 { visible } from "discourse/tests/helpers/qunit-helpers";
module("Discourse Chat | Component | collapser", function (hooks) {
setupRenderingTest(hooks);
@ -23,16 +22,12 @@ module("Discourse Chat | Component | collapser", function (hooks) {
</Collapser>
`);
const openButton = ".chat-message-collapser-closed";
const closeButton = ".chat-message-collapser-opened";
const body = ".cat";
assert.dom(".cat").isVisible();
assert.true(visible(body));
await click(".chat-message-collapser-opened");
assert.dom(".cat").isNotVisible();
await click(closeButton);
assert.false(visible(body));
await click(openButton);
assert.true(visible(body));
await click(".chat-message-collapser-closed");
assert.dom(".cat").isVisible();
});
});