FEATURE: Stop hiding “allow archiving channels” setting

This commit is contained in:
Loïc Guitaut
2022-11-10 15:38:45 +01:00
committed by Loïc Guitaut
parent 040136675b
commit 3fd0423b1b
4 changed files with 25 additions and 3 deletions
@@ -82,6 +82,8 @@ acceptance("Discourse Chat - browse channels", function (needs) {
});
test("Archived filter", async function (assert) {
this.siteSettings.chat_allow_archiving_channels = true;
await visit("/chat/browse");
await click(".chat-browse-view__filter-link.-archived");
@@ -108,4 +110,16 @@ acceptance("Discourse Chat - browse channels", function (needs) {
I18n.t("chat.empty_state.title")
);
});
test("Archiving channels is not allowed", async function (assert) {
this.siteSettings.chat_allow_archiving_channels = false;
await visit("/chat/browse");
assert.equal(
queryAll(".chat-browse-view__filter-link.-archived").length,
0
);
this.siteSettings.chat_allow_archiving_channels = true;
});
});