mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 00:37:36 -06:00
42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
|
|
/////////////////////////////////////////////////////////////
|
|
//
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
//
|
|
// Copyright (C) 2013 - 2024, The pgAdmin Development Team
|
|
// This software is released under the PostgreSQL Licence
|
|
//
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
|
|
import {genericBeforeEach, getEditView} from '../genericFunctions';
|
|
import {getBinaryPathSchema} from '../../../pgadmin/browser/server_groups/servers/static/js/binary_path.ui';
|
|
import pgAdmin from '../fake_pgadmin';
|
|
|
|
describe('BinaryPathschema', ()=>{
|
|
|
|
let schemaObj = getBinaryPathSchema();
|
|
let getInitData = ()=>Promise.resolve({});
|
|
|
|
beforeAll(()=>{
|
|
jest.spyOn(pgAdmin.Browser.notifier, 'alert').mockImplementation(() => {});
|
|
});
|
|
|
|
|
|
|
|
beforeEach(()=>{
|
|
genericBeforeEach();
|
|
});
|
|
|
|
it('edit', async ()=>{
|
|
await getEditView(schemaObj, getInitData);
|
|
});
|
|
|
|
it('validate path', ()=>{
|
|
let validate = _.find(schemaObj.fields, (f)=>f.id=='binaryPath').validate;
|
|
let status = validate('');
|
|
expect(status).toBe(true);
|
|
});
|
|
|
|
});
|