mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
FEATURE: Add groups page.
This commit is contained in:
@@ -3,6 +3,20 @@ import { acceptance, logIn } from "helpers/qunit-helpers";
|
||||
acceptance("Groups");
|
||||
|
||||
test("Browsing Groups", () => {
|
||||
visit("/groups");
|
||||
|
||||
andThen(() => {
|
||||
equal(count('.groups-table-row'), 18, 'it displays visible groups');
|
||||
});
|
||||
|
||||
click("a[href='/groups/discourse/members']");
|
||||
|
||||
andThen(() => {
|
||||
equal(find('.group-header').text().trim(), 'Awesome Team', "it displays the group page");
|
||||
});
|
||||
});
|
||||
|
||||
test("Viewing Group", () => {
|
||||
visit("/groups/discourse");
|
||||
|
||||
andThen(() => {
|
||||
@@ -34,7 +48,7 @@ test("Browsing Groups", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("Admin Browsing Groups", () => {
|
||||
test("Admin Viewing Group", () => {
|
||||
logIn();
|
||||
Discourse.reset();
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -242,6 +242,10 @@ export default function() {
|
||||
slug: request.params.slug } });
|
||||
});
|
||||
|
||||
this.get("groups", () => {
|
||||
return response(200, fixturesByUrl['/groups.json']);
|
||||
});
|
||||
|
||||
this.get("/groups/discourse/topics.json", () => {
|
||||
return response(200, fixturesByUrl['/groups/discourse/posts.json']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user