mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Allow group owners to manage members from group members page.
This commit is contained in:
31
test/javascripts/acceptance/group-index-test.js.es6
Normal file
31
test/javascripts/acceptance/group-index-test.js.es6
Normal file
@@ -0,0 +1,31 @@
|
||||
import { acceptance, logIn } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Group Members");
|
||||
|
||||
QUnit.test("Viewing Members as anon user", assert => {
|
||||
visit("/groups/discourse");
|
||||
|
||||
andThen(() => {
|
||||
assert.ok(count('.avatar-flair .fa-adjust') === 1, "it displays the group's avatar flair");
|
||||
assert.ok(count('.group-members tr') > 0, "it lists group members");
|
||||
|
||||
assert.ok(
|
||||
count('.group-member-dropdown') === 0,
|
||||
'it does not allow anon user to manage group members'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("Viewing Members as an admin user", assert => {
|
||||
logIn();
|
||||
Discourse.reset();
|
||||
|
||||
visit("/groups/discourse");
|
||||
|
||||
andThen(() => {
|
||||
assert.ok(
|
||||
count('.group-member-dropdown') > 0,
|
||||
'it allows admin user to manage group members'
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -69,10 +69,6 @@ QUnit.test("Anonymous Viewing Group", assert => {
|
||||
visit("/groups/discourse");
|
||||
|
||||
andThen(() => {
|
||||
assert.ok(count('.avatar-flair .fa-adjust') === 1, "it displays the group's avatar flair");
|
||||
assert.ok(count('.group-members tr') > 0, "it lists group members");
|
||||
assert.ok(count('.group-message-button') === 0, 'it does not show group message button');
|
||||
|
||||
assert.equal(
|
||||
count(".nav-pills li a[title='Messages']"),
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user