mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 08:03:40 +08:00
d65a839577
For sites that are configured to mute some or all categories and tags for users by default, groups can now be configured to set members' notification level to normal from the group manage UI.
34 lines
960 B
JavaScript
34 lines
960 B
JavaScript
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers";
|
|
|
|
acceptance("Managing Group Category Notification Defaults");
|
|
QUnit.test("As an anonymous user", async assert => {
|
|
await visit("/g/discourse/manage/categories");
|
|
|
|
assert.ok(
|
|
count(".group-members tr") > 0,
|
|
"it should redirect to members page for an anonymous user"
|
|
);
|
|
});
|
|
|
|
acceptance("Managing Group Category Notification Defaults", { loggedIn: true });
|
|
|
|
QUnit.test("As an admin", async assert => {
|
|
await visit("/g/discourse/manage/categories");
|
|
|
|
assert.ok(
|
|
find(".groups-notifications-form .category-selector").length === 5,
|
|
"it should display category inputs"
|
|
);
|
|
});
|
|
|
|
QUnit.test("As a group owner", async assert => {
|
|
updateCurrentUser({ moderator: false, admin: false });
|
|
|
|
await visit("/g/discourse/manage/categories");
|
|
|
|
assert.ok(
|
|
find(".groups-notifications-form .category-selector").length === 5,
|
|
"it should display category inputs"
|
|
);
|
|
});
|