DEV: Fix linting (#127)

This commit is contained in:
Penar Musaraj 2020-12-30 15:56:00 -05:00 committed by GitHub
parent b824e19e91
commit 11f7dee7f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 44 deletions

View File

@ -7,7 +7,7 @@ const QUICK_ACCESS_ASSIGNMENTS_TAB = ".widget-link.assigned";
acceptance("Quick access assignments panel", function (needs) {
needs.user();
needs.settings({ assign_enabled: true, assigns_user_url_path: "/"});
needs.pretender((server, helper) => {
const messagesPath = "/topics/messages-assigned/eviltrout.json";
const assigns = AssignedTopics[messagesPath];

View File

@ -1,57 +1,56 @@
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance, waitFor, updateCurrentUser } from "discourse/tests/helpers/qunit-helpers";
import {
acceptance,
waitFor,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
import { skip, test } from "qunit";
acceptance("Search - Full Page", function (needs) {
needs.settings({ assign_enabled: true });
needs.user();
test(
"update in:assigned filter through advanced search ui",
async (assert) => {
updateCurrentUser({ can_assign: true });
const inSelector = selectKit(".search-advanced-options .select-kit#in");
test("update in:assigned filter through advanced search ui", async (assert) => {
updateCurrentUser({ can_assign: true });
const inSelector = selectKit(".search-advanced-options .select-kit#in");
await visit("/search");
await visit("/search");
await fillIn(".search-query", "none");
await inSelector.expand();
await inSelector.selectRowByValue("assigned");
assert.equal(
inSelector.header().label(),
"are assigned",
'has "are assigned" populated'
);
assert.equal(
find(".search-query").val(),
"none in:assigned",
'has updated search term to "none in:assinged"'
);
}
);
await fillIn(".search-query", "none");
await inSelector.expand();
await inSelector.selectRowByValue("assigned");
assert.equal(
inSelector.header().label(),
"are assigned",
'has "are assigned" populated'
);
assert.equal(
find(".search-query").val(),
"none in:assigned",
'has updated search term to "none in:assinged"'
);
});
test(
"update in:unassigned filter through advanced search ui",
async (assert) => {
updateCurrentUser({ can_assign: true });
const inSelector = selectKit(".search-advanced-options .select-kit#in");
test("update in:unassigned filter through advanced search ui", async (assert) => {
updateCurrentUser({ can_assign: true });
const inSelector = selectKit(".search-advanced-options .select-kit#in");
await visit("/search");
await visit("/search");
await fillIn(".search-query", "none");
await inSelector.expand();
await inSelector.selectRowByValue("unassigned");
assert.equal(
inSelector.header().label(),
"are unassigned",
'has "are unassigned" populated'
);
assert.equal(
find(".search-query").val(),
"none in:unassigned",
'has updated search term to "none in:unassinged"'
);
}
);
await fillIn(".search-query", "none");
await inSelector.expand();
await inSelector.selectRowByValue("unassigned");
assert.equal(
inSelector.header().label(),
"are unassigned",
'has "are unassigned" populated'
);
assert.equal(
find(".search-query").val(),
"none in:unassigned",
'has updated search term to "none in:unassinged"'
);
});
skip("update assigned to through advanced search ui", async (assert) => {
updateCurrentUser({ can_assign: true });