DEV: Fix build due to 3a4f4abdc9
(#26151)
This commit is contained in:
parent
e5020617c1
commit
63dd08ad59
|
@ -7,6 +7,7 @@ import { queryAll } from "discourse/tests/helpers/qunit-helpers";
|
|||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import I18n from "discourse-i18n";
|
||||
import AdminSchemaThemeSettingEditor from "admin/components/schema-theme-setting/editor";
|
||||
import ThemeSettings from "admin/models/theme-settings";
|
||||
|
||||
class TreeFromDOM {
|
||||
constructor() {
|
||||
|
@ -294,7 +295,9 @@ module(
|
|||
});
|
||||
|
||||
test("input fields are rendered even if they're not present in the data", async function (assert) {
|
||||
const schema = {
|
||||
const setting = ThemeSettings.create({
|
||||
setting: "objects_setting",
|
||||
objects_schema: {
|
||||
name: "something",
|
||||
identifier: "id",
|
||||
properties: {
|
||||
|
@ -305,8 +308,8 @@ module(
|
|||
type: "string",
|
||||
},
|
||||
},
|
||||
};
|
||||
const data = [
|
||||
},
|
||||
value: [
|
||||
{
|
||||
id: "bu1",
|
||||
name: "Big U",
|
||||
|
@ -314,9 +317,11 @@ module(
|
|||
{
|
||||
id: "fi2",
|
||||
},
|
||||
];
|
||||
],
|
||||
});
|
||||
|
||||
await render(<template>
|
||||
<AdminSchemaThemeSettingEditor @schema={{schema}} @data={{data}} />
|
||||
<AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
|
||||
</template>);
|
||||
|
||||
const inputFields = new InputFieldsFromDOM();
|
||||
|
@ -414,9 +419,10 @@ module(
|
|||
});
|
||||
|
||||
test("input fields of type float", async function (assert) {
|
||||
const [schema, data] = schemaAndData(3);
|
||||
const setting = schemaAndData(3);
|
||||
|
||||
await render(<template>
|
||||
<AdminSchemaThemeSettingEditor @schema={{schema}} @data={{data}} />
|
||||
<AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
|
||||
</template>);
|
||||
|
||||
const inputFields = new InputFieldsFromDOM();
|
||||
|
@ -501,9 +507,10 @@ module(
|
|||
});
|
||||
|
||||
test("input fields of type category", async function (assert) {
|
||||
const [schema, data] = schemaAndData(3);
|
||||
const setting = schemaAndData(3);
|
||||
|
||||
await render(<template>
|
||||
<AdminSchemaThemeSettingEditor @schema={{schema}} @data={{data}} />
|
||||
<AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
|
||||
</template>);
|
||||
|
||||
const inputFields = new InputFieldsFromDOM();
|
||||
|
@ -530,9 +537,10 @@ module(
|
|||
});
|
||||
|
||||
test("input fields of type tag", async function (assert) {
|
||||
const [schema, data] = schemaAndData(3);
|
||||
const setting = schemaAndData(3);
|
||||
|
||||
await render(<template>
|
||||
<AdminSchemaThemeSettingEditor @schema={{schema}} @data={{data}} />
|
||||
<AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
|
||||
</template>);
|
||||
|
||||
const inputFields = new InputFieldsFromDOM();
|
||||
|
@ -567,9 +575,10 @@ module(
|
|||
]);
|
||||
});
|
||||
|
||||
const [schema, data] = schemaAndData(3);
|
||||
const setting = schemaAndData(3);
|
||||
|
||||
await render(<template>
|
||||
<AdminSchemaThemeSettingEditor @schema={{schema}} @data={{data}} />
|
||||
<AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
|
||||
</template>);
|
||||
|
||||
const inputFields = new InputFieldsFromDOM();
|
||||
|
|
Loading…
Reference in New Issue