Apply prettier and eslint
Dieser Commit ist enthalten in:
Ursprung
f3aed50927
Commit
7f233f178c
4 geänderte Dateien mit 15 neuen und 21 gelöschten Zeilen
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
Laden …
In neuem Issue referenzieren