Allow parameters for group and username filters on directory (#5815)

This commit is contained in:
Joe Buhlig
2018-05-16 09:20:17 -05:00
committed by Régis Hanol
parent 489e7f220d
commit 3cd4c82c49
5 changed files with 59 additions and 9 deletions

View File

@ -2,12 +2,24 @@ import { acceptance } from "helpers/qunit-helpers";
acceptance("User Directory");
QUnit.test("Visit Page", async assert => {
await visit("/users");
await visit("/u");
assert.ok($('body.users-page').length, "has the body class");
assert.ok(exists('.directory table tr'), "has a list of users");
});
QUnit.test("Visit All Time", async assert => {
await visit("/users?period=all");
await visit("/u?period=all");
assert.ok(exists('.time-read'), "has time read column");
});
QUnit.test("Visit Without Usernames", async assert => {
await visit("/u?exclude_usernames=system");
assert.ok($('body.users-page').length, "has the body class");
assert.ok(exists('.directory table tr'), "has a list of users");
});
QUnit.test("Visit With Group Filter", async assert => {
await visit("/u?group=trust_level_0");
assert.ok($('body.users-page').length, "has the body class");
assert.ok(exists('.directory table tr'), "has a list of users");
});