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

View File

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