discourse/plugins/chat/test/javascripts/components/chat-channel-settings-saved-indicator-test.js
Joffrey JAFFEUX 68c4f16a73
FEATURE: channels can allow/disallow @all/@here mentions (#19317)
The settings tab of each category channel should now present the option to allow or disallow channel wide mentions: @here and @all.

When disallowed, using these mentions in the channel should have no effect.
2022-12-05 17:03:51 +01:00

32 lines
873 B
JavaScript

import { module, test } from "qunit";
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
import { render, settled } from "@ember/test-helpers";
import { hbs } from "ember-cli-htmlbars";
module(
"Discourse Chat | Component | chat-channel-settings-saved-indicator",
function (hooks) {
setupRenderingTest(hooks);
test("when property changes", async function (assert) {
await render(
hbs`<ChatChannelSettingsSavedIndicator @property={{this.property}} />`
);
assert
.dom(".chat-channel-settings-saved-indicator.is-active")
.doesNotExist();
this.set("property", 1);
assert.dom(".chat-channel-settings-saved-indicator.is-active").exists();
await settled();
assert
.dom(".chat-channel-settings-saved-indicator.is-active")
.doesNotExist();
});
}
);