2021-07-12 05:25:41 -05:00
|
|
|
/////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
2024-01-01 02:43:48 -06:00
|
|
|
// Copyright (C) 2013 - 2024, The pgAdmin Development Team
|
2021-07-12 05:25:41 -05:00
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
|
2023-10-23 07:13:17 -05:00
|
|
|
|
2021-07-12 05:25:41 -05:00
|
|
|
import FTSTemplateSchema from '../../../pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/static/js/fts_template.ui';
|
2022-01-28 05:50:34 -06:00
|
|
|
import {genericBeforeEach, getCreateView, getEditView, getPropertiesView} from '../genericFunctions';
|
2021-07-12 05:25:41 -05:00
|
|
|
|
|
|
|
describe('FTSTemplateSchema', ()=>{
|
2023-10-23 07:13:17 -05:00
|
|
|
|
2021-07-12 05:25:41 -05:00
|
|
|
let schemaObj = new FTSTemplateSchema(
|
|
|
|
{
|
|
|
|
schemaList: ()=> [],
|
|
|
|
initFunctionList: ()=> [{ label: '', value: ''}, { label: 'lb1', value: 'val1'}],
|
|
|
|
lexisFunctionList: ()=> [{ label: '', value: ''}, { label: 'lb1', value: 'val1'}],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
schema: 123
|
|
|
|
}
|
|
|
|
);
|
|
|
|
let getInitData = ()=>Promise.resolve({});
|
|
|
|
|
|
|
|
|
2023-10-23 07:13:17 -05:00
|
|
|
|
|
|
|
|
2021-07-12 05:25:41 -05:00
|
|
|
|
|
|
|
beforeEach(()=>{
|
2022-01-28 05:50:34 -06:00
|
|
|
genericBeforeEach();
|
2021-07-12 05:25:41 -05:00
|
|
|
});
|
|
|
|
|
2023-10-23 07:13:17 -05:00
|
|
|
it('create', async ()=>{
|
|
|
|
await getCreateView(schemaObj);
|
2021-07-12 05:25:41 -05:00
|
|
|
});
|
|
|
|
|
2023-10-23 07:13:17 -05:00
|
|
|
it('edit', async ()=>{
|
|
|
|
await getEditView(schemaObj, getInitData);
|
2021-07-12 05:25:41 -05:00
|
|
|
});
|
|
|
|
|
2023-10-23 07:13:17 -05:00
|
|
|
it('properties', async ()=>{
|
|
|
|
await getPropertiesView(schemaObj, getInitData);
|
2021-07-12 05:25:41 -05:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|