mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Port Maintenance dialog to React. Fixes #7019
This commit is contained in:
committed by
Akshay Joshi
parent
65a6c18263
commit
ad862f4084
@@ -0,0 +1,52 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
// pgAdmin 4 - PostgreSQL Tools
|
||||
//
|
||||
// Copyright (C) 2013 - 2022, The pgAdmin Development Team
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import React from 'react';
|
||||
import '../helper/enzyme.helper';
|
||||
import { createMount } from '@material-ui/core/test-utils';
|
||||
import SchemaView from '../../../pgadmin/static/js/SchemaView';
|
||||
import MaintenanceSchema, {getVacuumSchema} from '../../../pgadmin/tools/maintenance/static/js/maintenance.ui';
|
||||
|
||||
|
||||
describe('MaintenanceSchema', ()=>{
|
||||
let mount;
|
||||
beforeAll(()=>{
|
||||
mount = createMount();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
mount.cleanUp();
|
||||
});
|
||||
let backupSchemaObj = new MaintenanceSchema(
|
||||
()=> getVacuumSchema(),
|
||||
{
|
||||
nodeInfo: {schema: {label: 'public'}, server: {version: 90400}}
|
||||
}
|
||||
);
|
||||
|
||||
it('start maintenance', ()=>{
|
||||
mount(<SchemaView
|
||||
formType='dialog'
|
||||
schema={backupSchemaObj}
|
||||
viewHelperProps={{
|
||||
mode: 'create',
|
||||
}}
|
||||
onSave={()=>{}}
|
||||
onClose={()=>{}}
|
||||
onHelp={()=>{}}
|
||||
onDataChange={()=>{}}
|
||||
confirmOnCloseReset={false}
|
||||
hasSQL={false}
|
||||
disableSqlHelp={false}
|
||||
disableDialogHelp={false}
|
||||
/>);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user