2021-08-04 10:22:52 +00:00
|
|
|
/////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
2023-01-02 06:23:55 +00:00
|
|
|
// Copyright (C) 2013 - 2023, The pgAdmin Development Team
|
2021-08-04 10:22:52 +00:00
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
|
2023-10-23 12:13:17 +00:00
|
|
|
|
2021-08-04 10:22:52 +00:00
|
|
|
import RuleSchema from '../../../pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/static/js/rule.ui';
|
2022-01-28 11:50:34 +00:00
|
|
|
import {genericBeforeEach, getCreateView, getEditView, getPropertiesView} from '../genericFunctions';
|
2021-08-04 10:22:52 +00:00
|
|
|
|
|
|
|
describe('RuleSchema', ()=>{
|
2023-10-23 12:13:17 +00:00
|
|
|
|
2021-08-04 10:22:52 +00:00
|
|
|
let schemaObj = new RuleSchema(
|
|
|
|
{
|
|
|
|
nodeInfo: {schema: {label: 'public'}, server: {version: 90400}},
|
|
|
|
nodeData: {label: 'Test'}
|
|
|
|
},
|
|
|
|
);
|
|
|
|
let getInitData = ()=>Promise.resolve({});
|
|
|
|
|
|
|
|
|
2023-10-23 12:13:17 +00:00
|
|
|
|
|
|
|
|
2021-08-04 10:22:52 +00:00
|
|
|
|
|
|
|
beforeEach(()=>{
|
2022-01-28 11:50:34 +00:00
|
|
|
genericBeforeEach();
|
2021-08-04 10:22:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-23 12:13:17 +00:00
|
|
|
it('create', async ()=>{
|
|
|
|
await getCreateView(schemaObj);
|
2021-08-04 10:22:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-23 12:13:17 +00:00
|
|
|
it('edit', async ()=>{
|
|
|
|
await getEditView(schemaObj, getInitData);
|
2021-08-04 10:22:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-23 12:13:17 +00:00
|
|
|
it('properties', async ()=>{
|
|
|
|
await getPropertiesView(schemaObj, getInitData);
|
2021-08-04 10:22:52 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|