Merge branch 'main' into add-logs
Dieser Commit ist enthalten in:
Commit
9e65fcb410
7 geänderte Dateien mit 17 neuen und 13 gelöschten Zeilen
|
@ -7,7 +7,7 @@ import userSearch from "discourse/lib/user-search";
|
|||
import I18n from "I18n";
|
||||
import Handlebars from "handlebars";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import TextField from "@ember/component/text-field";
|
||||
import TextField from "discourse/components/text-field";
|
||||
|
||||
const template = function (params) {
|
||||
const options = params.options;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import computed from "discourse-common/utils/decorators";
|
||||
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
|
||||
import I18n from "I18n";
|
||||
import TextField from "@ember/component/text-field";
|
||||
import TextField from "discourse/components/text-field";
|
||||
|
||||
export default TextField.extend({
|
||||
attributeBindings: [
|
||||
|
|
|
@ -4,6 +4,7 @@ import CustomWizardApi from "../models/custom-wizard-api";
|
|||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import { and, equal, not } from "@ember/object/computed";
|
||||
import { selectKitContent } from "../lib/wizard";
|
||||
import { underscore } from "@ember/string";
|
||||
import Controller from "@ember/controller";
|
||||
import I18n from "I18n";
|
||||
|
||||
|
@ -118,7 +119,7 @@ export default Controller.extend({
|
|||
|
||||
if (authType === "oauth_2") {
|
||||
this.set("authorizing", true);
|
||||
ajax(`/admin/wizards/apis/${name.underscore()}/authorize`)
|
||||
ajax(`/admin/wizards/apis/${underscore(name)}/authorize`)
|
||||
.catch(popupAjaxError)
|
||||
.then((result) => {
|
||||
if (result.success) {
|
||||
|
@ -187,11 +188,11 @@ export default Controller.extend({
|
|||
if (!api[rp]) {
|
||||
let key = rp.replace("auth", "");
|
||||
error = `${I18n.t(
|
||||
`admin.wizard.api.auth.${key.underscore()}`
|
||||
`admin.wizard.api.auth.${underscore(key)}`
|
||||
)} is required for ${authType}`;
|
||||
break;
|
||||
}
|
||||
data[rp.underscore()] = api[rp];
|
||||
data[underscore(rp)] = api[rp];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -221,7 +222,7 @@ export default Controller.extend({
|
|||
|
||||
this.set("updating", true);
|
||||
|
||||
ajax(`/admin/wizards/api/${name.underscore()}`, {
|
||||
ajax(`/admin/wizards/api/${underscore(name)}`, {
|
||||
type: "PUT",
|
||||
data,
|
||||
})
|
||||
|
@ -244,7 +245,7 @@ export default Controller.extend({
|
|||
|
||||
this.set("updating", true);
|
||||
|
||||
ajax(`/admin/wizards/api/${name.underscore()}`, {
|
||||
ajax(`/admin/wizards/api/${underscore(name)}`, {
|
||||
type: "DELETE",
|
||||
})
|
||||
.catch(popupAjaxError)
|
||||
|
@ -262,7 +263,7 @@ export default Controller.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
ajax(`/admin/wizards/api/${name.underscore()}/logs`, {
|
||||
ajax(`/admin/wizards/api/${underscore(name)}/logs`, {
|
||||
type: "DELETE",
|
||||
})
|
||||
.catch(popupAjaxError)
|
||||
|
|
|
@ -11,6 +11,7 @@ import {
|
|||
getUnsubscribedAdminWizards,
|
||||
getWizard,
|
||||
} from "../helpers/admin-wizard";
|
||||
import { Promise } from "rsvp";
|
||||
|
||||
acceptance("Admin | Custom Fields Unsuscribed", function (needs) {
|
||||
needs.user();
|
||||
|
@ -83,7 +84,7 @@ acceptance("Admin | Custom Fields Unsuscribed", function (needs) {
|
|||
"View, create, edit and destroy custom fields",
|
||||
{ timeout: 15000 }
|
||||
);
|
||||
await new Ember.RSVP.Promise((resolve) => setTimeout(resolve, 1000));
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
}
|
||||
|
||||
test("Navigate to custom fields tab", async (assert) => {
|
|
@ -6,6 +6,7 @@ import {
|
|||
getWizard,
|
||||
getWizardTestingLog,
|
||||
} from "../helpers/admin-wizard";
|
||||
import { Promise } from "rsvp";
|
||||
|
||||
acceptance("Admin | Manager", function (needs) {
|
||||
needs.user();
|
||||
|
@ -52,7 +53,7 @@ acceptance("Admin | Manager", function (needs) {
|
|||
{ timeout: 15000 }
|
||||
);
|
||||
// Wait an additional second after the conditions are met
|
||||
await new Ember.RSVP.Promise((resolve) => setTimeout(resolve, 1000));
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
}
|
||||
|
||||
test("viewing manager fields content", async (assert) => {
|
||||
|
|
|
@ -58,7 +58,7 @@ acceptance("Admin | Custom Wizard Standard Subscription", function (needs) {
|
|||
assert.equal(count, 5, "There should be 5 admin tabs");
|
||||
});
|
||||
|
||||
test("creting a new wizard", async (assert) => {
|
||||
test("creating a new wizard", async (assert) => {
|
||||
await visit("/admin/wizards/wizard");
|
||||
await click(".admin-wizard-controls button");
|
||||
assert.ok(
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import {
|
||||
acceptance,
|
||||
exists,
|
||||
query,
|
||||
visible,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
|
@ -71,7 +72,7 @@ acceptance("Admin | Custom Wizard Unsuscribed", function (needs) {
|
|||
assert.equal(count, 5, "There should be 5 admin tabs");
|
||||
});
|
||||
|
||||
test("creting a new wizard", async (assert) => {
|
||||
test("creating a new wizard", async (assert) => {
|
||||
await visit("/admin/wizards/wizard");
|
||||
await click(".admin-wizard-controls button");
|
||||
assert.ok(
|
||||
|
@ -441,7 +442,7 @@ acceptance("Admin | Custom Wizard Unsuscribed", function (needs) {
|
|||
assert.strictEqual(actualResultText, "Result text", "Text is correct");
|
||||
}
|
||||
const fieldsContentSet = [
|
||||
[6, "howto", "10"],
|
||||
[6, "bug", "1"],
|
||||
[7, "gazelle", "gazelle"],
|
||||
];
|
||||
for (let [
|
||||
|
|
Laden …
In neuem Issue referenzieren