discourse/plugins/chat/test/javascripts/components/channel-title-test.gjs
Jarek Radosz 893fcf714b
DEV: Remove plugin names from test titles (#39418)
Those are now automatically included in testem's output.
2026-04-21 19:19:52 +02:00

26 lines
945 B
Text
Vendored

import { getOwner } from "@ember/owner";
import { render } from "@ember/test-helpers";
import { module, test } from "qunit";
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
import ChannelTitle from "discourse/plugins/chat/discourse/components/channel-title";
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
module("Component | <ChannelTitle />", function (hooks) {
setupRenderingTest(hooks);
test("icon", async function (assert) {
const channel = new ChatFabricators(getOwner(this)).channel();
await render(<template><ChannelTitle @channel={{channel}} /></template>);
assert.dom(".chat-channel-icon").exists();
});
test("label", async function (assert) {
const channel = new ChatFabricators(getOwner(this)).channel();
await render(<template><ChannelTitle @channel={{channel}} /></template>);
assert.dom(".chat-channel-name").exists();
});
});