mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Display button to message group on group page.
https://meta.discourse.org/t/make-it-easier-to-send-a-message-to-groups/65065
This commit is contained in:
@@ -42,12 +42,13 @@ QUnit.test("Browsing Groups", assert => {
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("Viewing Group", assert => {
|
||||
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');
|
||||
});
|
||||
|
||||
click(".nav-pills li a[title='Activity']");
|
||||
@@ -80,6 +81,20 @@ QUnit.test("Viewing Group", assert => {
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("User Viewing Group", assert => {
|
||||
logIn();
|
||||
Discourse.reset();
|
||||
|
||||
visit("/groups/discourse");
|
||||
|
||||
click('.group-message-button');
|
||||
|
||||
andThen(() => {
|
||||
assert.ok(count('#reply-control') === 1, 'it opens the composer');
|
||||
assert.equal(find('.ac-wrap .item').text(), 'discourse', 'it prefills the group name');
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("Admin Viewing Group", assert => {
|
||||
logIn();
|
||||
Discourse.reset();
|
||||
@@ -102,4 +117,4 @@ QUnit.test("Admin Viewing Group", assert => {
|
||||
'it should show messages tab if user is admin'
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,11 +6,12 @@ export default {
|
||||
"name":"discourse",
|
||||
"full_name":"Awesome Team",
|
||||
"user_count":8,
|
||||
"alias_level":0,
|
||||
"alias_level":99,
|
||||
"visible":true,
|
||||
"public":true,
|
||||
"flair_url": 'fa-adjust',
|
||||
"is_group_owner":true
|
||||
"is_group_owner":true,
|
||||
"mentionable":true
|
||||
}
|
||||
},
|
||||
"/groups/discourse/counts.json":{
|
||||
|
||||
Reference in New Issue
Block a user