mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
UI: redesigned settings/members (#23804)
This PR is a first step towards private groups. It redesigns settings/members area of a channel and also drops the "about" page which is now mixed into settings. This commit is also: - introducing chat-form, a small DSL to create forms, ideally I would want something in core for this - introducing a DToggleSwitch page object component to simplify testing toggles - migrating various components to gjs
This commit is contained in:
@ -1,31 +0,0 @@
|
||||
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();
|
||||
});
|
||||
}
|
||||
);
|
@ -1,25 +0,0 @@
|
||||
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
import I18n from "I18n";
|
||||
import { module, test } from "qunit";
|
||||
import { render } from "@ember/test-helpers";
|
||||
|
||||
module(
|
||||
"Discourse Chat | Component | chat-channel-settings-view",
|
||||
function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test("display retention info", async function (assert) {
|
||||
this.set("channel", ChatChannel.create({ chatable_type: "Category" }));
|
||||
|
||||
await render(hbs`<ChatChannelSettingsView @channel={{this.channel}} />`);
|
||||
|
||||
assert.dom(".chat-retention-info").hasText(
|
||||
I18n.t("chat.retention_reminders.public", {
|
||||
count: this.siteSettings.chat_channel_retention_days,
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user