discourse/test/javascripts/acceptance/groups-test.js.es6

43 lines
1.0 KiB
Plaintext
Raw Normal View History

import { acceptance, logIn } from "helpers/qunit-helpers";
acceptance("Groups");
test("Browsing Groups", () => {
visit("/groups/discourse");
andThen(() => {
2016-06-02 09:21:43 -04:00
ok(count('.group-members tr') > 0, "it lists group members");
});
2016-06-02 09:21:43 -04:00
visit("/groups/discourse/posts");
andThen(() => {
2016-06-02 09:21:43 -04:00
ok(count('.user-stream .item') > 0, "it lists stream items");
});
visit("/groups/discourse/topics");
andThen(() => {
ok(count('.user-stream .item') > 0, "it lists stream items");
});
visit("/groups/discourse/mentions");
andThen(() => {
ok(count('.user-stream .item') > 0, "it lists stream items");
});
visit("/groups/discourse/messages");
andThen(() => {
ok($('.action-list li').length === 4, 'it should not show messages tab');
ok(count('.user-stream .item') > 0, "it lists stream items");
});
});
test("Messages tab", () => {
logIn();
Discourse.reset();
visit("/groups/discourse");
andThen(() => {
ok($('.action-list li').length === 5, 'it should show messages tab if user is admin');
});
});