From 7f233f178c03abf04d5e53adfda153fc64ad328a Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Wed, 27 Jul 2022 15:30:45 +0100 Subject: [PATCH] Apply prettier and eslint --- .../controllers/admin-wizards-api-show.js.es6 | 6 ------ test/javascripts/acceptance/field-test.js | 8 ++++---- test/javascripts/acceptance/step-test.js | 10 +++++----- test/javascripts/acceptance/wizard-test.js | 12 ++++++------ 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 b/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 index a820c664..3b40b209 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 @@ -128,7 +128,6 @@ export default Controller.extend({ const api = this.get("api"); const name = api.name; const authType = api.authType; - let refreshList = false; // eslint-disable-line let error; if (!name || !authType) { @@ -143,11 +142,6 @@ export default Controller.extend({ data["title"] = api.title; } - const originalTitle = this.get("api.originalTitle"); - if (api.get("isNew") || (originalTitle && api.title !== originalTitle)) { - refreshList = true; // eslint-disable-line - } - if (api.get("isNew")) { data["new"] = true; } diff --git a/test/javascripts/acceptance/field-test.js b/test/javascripts/acceptance/field-test.js index b7181f6f..5eecce4f 100644 --- a/test/javascripts/acceptance/field-test.js +++ b/test/javascripts/acceptance/field-test.js @@ -3,8 +3,8 @@ import { test } from "qunit"; import { acceptance, count, - query, exists, + query, visible, } from "discourse/tests/helpers/qunit-helpers"; import { allFieldsWizard } from "../helpers/wizard"; @@ -13,11 +13,11 @@ import usersJson from "../fixtures/users"; acceptance("Field | Fields", function (needs) { needs.pretender((server, helper) => { - server.get("/w/wizard.json", (request) => helper.response(allFieldsWizard)); - server.get("/tags/filter/search", (request) => + server.get("/w/wizard.json", () => helper.response(allFieldsWizard)); + server.get("/tags/filter/search", () => helper.response({ results: tagsJson["tags"] }) ); - server.get("/u/search/users", (request) => helper.response(usersJson)); + server.get("/u/search/users", () => helper.response(usersJson)); }); test("Text", async function (assert) { diff --git a/test/javascripts/acceptance/step-test.js b/test/javascripts/acceptance/step-test.js index 3d7e56a6..df302853 100644 --- a/test/javascripts/acceptance/step-test.js +++ b/test/javascripts/acceptance/step-test.js @@ -3,15 +3,15 @@ import { test } from "qunit"; import { acceptance, count, - query, exists, + query, visible, } from "discourse/tests/helpers/qunit-helpers"; -import { stepNotPermitted, wizard, update } from "../helpers/wizard"; +import { stepNotPermitted, update, wizard } from "../helpers/wizard"; acceptance("Step | Not permitted", function (needs) { needs.pretender((server, helper) => { - server.get("/w/wizard.json", (request) => + server.get("/w/wizard.json", () => helper.response(stepNotPermitted) ); }); @@ -24,8 +24,8 @@ acceptance("Step | Not permitted", function (needs) { acceptance("Step | Step", function (needs) { needs.pretender((server, helper) => { - server.get("/w/wizard.json", (request) => helper.response(wizard)); - server.put("/w/wizard/steps/:step_id", (request) => + server.get("/w/wizard.json", () => helper.response(wizard)); + server.put("/w/wizard/steps/:step_id", () => helper.response(update) ); }); diff --git a/test/javascripts/acceptance/wizard-test.js b/test/javascripts/acceptance/wizard-test.js index b81a94ad..a2f9e20a 100644 --- a/test/javascripts/acceptance/wizard-test.js +++ b/test/javascripts/acceptance/wizard-test.js @@ -1,10 +1,10 @@ -import { visit, settled } from "@ember/test-helpers"; +import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, count, - query, exists, + query, } from "discourse/tests/helpers/qunit-helpers"; import { wizard, @@ -15,7 +15,7 @@ import { acceptance("Wizard | Not logged in", function (needs) { needs.pretender((server, helper) => { - server.get("/w/wizard.json", (request) => helper.response(wizardNoUser)); + server.get("/w/wizard.json", () => helper.response(wizardNoUser)); }); test("Wizard no access requires login", async function (assert) { @@ -27,7 +27,7 @@ acceptance("Wizard | Not logged in", function (needs) { acceptance("Wizard | Not permitted", function (needs) { needs.user(); needs.pretender((server, helper) => { - server.get("/w/wizard.json", (request) => + server.get("/w/wizard.json", () => helper.response(wizardNotPermitted) ); }); @@ -41,7 +41,7 @@ acceptance("Wizard | Not permitted", function (needs) { acceptance("Wizard | Completed", function (needs) { needs.user(); needs.pretender((server, helper) => { - server.get("/w/wizard.json", (request) => helper.response(wizardCompleted)); + server.get("/w/wizard.json", () => helper.response(wizardCompleted)); }); test("Wizard no access completed", async function (assert) { @@ -53,7 +53,7 @@ acceptance("Wizard | Completed", function (needs) { acceptance("Wizard | Wizard", function (needs) { needs.user(); needs.pretender((server, helper) => { - server.get("/w/wizard.json", (request) => { + server.get("/w/wizard.json", () => { return helper.response(wizard); }); });