FEATURE: Add groups page.

This commit is contained in:
Guo Xiang Tan
2016-12-14 17:27:47 +08:00
parent 0c9499874d
commit 4b940dc8bd
15 changed files with 177 additions and 5 deletions
+15 -1
View File
@@ -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']);
});