mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 04:43:37 +08:00
FIX: Missing action to trigger add group members modal for group owners.
https://meta.discourse.org/t/unable-to-add-members-to-a-group-as-group-owner-who-is-not-staff/85346?u=tgxworld
This commit is contained in:
parent
c74c933996
commit
6cce839f0a
|
@ -10,6 +10,7 @@
|
|||
showBulkAddModal="showBulkAddModal"}}
|
||||
{{else}}
|
||||
{{d-button icon="plus"
|
||||
action="showAddMembersModal"
|
||||
label="groups.add_members.title"
|
||||
class="group-members-add"}}
|
||||
{{/if}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { acceptance, logIn } from "helpers/qunit-helpers";
|
||||
import { acceptance, logIn, replaceCurrentUser } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Group Members");
|
||||
|
||||
|
@ -22,6 +22,22 @@ QUnit.test("Viewing Members as anon user", assert => {
|
|||
});
|
||||
});
|
||||
|
||||
QUnit.test("Viewing Members as a group owner", assert => {
|
||||
logIn();
|
||||
Discourse.reset();
|
||||
replaceCurrentUser({ admin: false, staff: false });
|
||||
|
||||
visit("/groups/discourse");
|
||||
click('.group-members-add');
|
||||
|
||||
andThen(() => {
|
||||
assert.equal(
|
||||
find('#group-add-members-user-selector').length, 1,
|
||||
'it should display the add members modal'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("Viewing Members as an admin user", assert => {
|
||||
logIn();
|
||||
Discourse.reset();
|
||||
|
|
Loading…
Reference in New Issue
Block a user