mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Port Import/Export dialog to React. Fixes #7017.
This commit is contained in:
committed by
Akshay Joshi
parent
1013d7ccdd
commit
c983aae881
@@ -0,0 +1,50 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 ImportExportSchema, {getFileInfoSchema, getMiscellaneousSchema} from '../../../pgadmin/tools/import_export/static/js/import_export.ui';
|
||||
|
||||
describe('ImportExportSchema', ()=>{
|
||||
let mount;
|
||||
beforeAll(()=>{
|
||||
mount = createMount();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
mount.cleanUp();
|
||||
});
|
||||
|
||||
let importExportSchemaObj = new ImportExportSchema(
|
||||
()=>getFileInfoSchema(),
|
||||
()=>getMiscellaneousSchema(),
|
||||
{columns: ()=>[]}
|
||||
);
|
||||
|
||||
it('start import export', ()=>{
|
||||
mount(<SchemaView
|
||||
formType='dialog'
|
||||
schema={importExportSchemaObj}
|
||||
viewHelperProps={{
|
||||
mode: 'create',
|
||||
}}
|
||||
onSave={()=>{/*This is intentional (SonarQube)*/}}
|
||||
onClose={()=>{/*This is intentional (SonarQube)*/}}
|
||||
onHelp={()=>{/*This is intentional (SonarQube)*/}}
|
||||
onDataChange={()=>{/*This is intentional (SonarQube)*/}}
|
||||
confirmOnCloseReset={false}
|
||||
hasSQL={false}
|
||||
disableSqlHelp={false}
|
||||
disableDialogHelp={false}
|
||||
/>);
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user