@tomino/dynamic-form-semantic-ui
Version:
Semantic UI form renderer based on dynamic form generation
56 lines • 1.49 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const form_query_data_1 = require("./form_query_data");
const common_1 = require("./common");
const schema = {
type: 'object',
properties: {
description: {
type: 'string'
}
},
required: ['name']
};
const formDefinition = form_query_data_1.create.stack({
elements: [
{
props: {
label: 'Description',
icon: 'doctor',
color: 'red',
content: { source: 'description' }
},
control: 'Comment'
},
{
props: {
label: 'Description',
icon: 'comment outline',
color: 'yellow',
content: 'Direct description',
header: 'This is header'
},
control: 'Comment'
}
]
});
const data = {
description: 'Some Description'
};
describe('Comment', () => {
it('renders standard', () => {
common_1.testStandard(formDefinition, schema, data);
});
it('renders editor', () => {
common_1.testEditor(formDefinition, schema, data);
});
return {
component: common_1.prepareComponent(formDefinition, schema, data, {
addEditor: true,
showToolBox: false,
showStandard: true,
validate: true
})
};
});
//# sourceMappingURL=comment_view.test.js.map