Added support to select/deselect objects in the Backup dialog. #642

This commit is contained in:
Nikhil Mohite
2023-09-13 11:07:28 +05:30
committed by GitHub
parent 8c91d40932
commit aa973fc8ae
18 changed files with 715 additions and 34 deletions

View File

@@ -37,7 +37,8 @@ describe('BackupSchema', ()=>{
},
{server: {version: 11000}},
pgAdmin.pgBrowser,
'backup_objects'
'backup_objects',
[]
);
it('create object backup', ()=>{
@@ -61,6 +62,43 @@ describe('BackupSchema', ()=>{
});
let backupSelectedSchemaObj = new BackupSchema(
()=> getSectionSchema(),
()=> getTypeObjSchema(),
()=> getSaveOptSchema({nodeInfo: {server: {version: 11000}}}),
()=> getDisabledOptionSchema({nodeInfo: {server: {version: 11000}}}),
()=> getMiscellaneousSchema({nodeInfo: {server: {version: 11000}}}),
{
role: ()=>[],
encoding: ()=>[],
},
{server: {version: 11000}},
pgAdmin.pgBrowser,
'backup_objects',
[{'id': 'public','name': 'public','icon': 'icon-schema', 'children': [{'id': 'public_table','name': 'table','icon': 'icon-coll-table','children': [{'id': 'public_test','name': 'test','icon': 'icon-table','schema': 'public','type': 'table','_name': 'public.test'}],'type': 'table','is_collection': true}],'is_schema': true}]
);
it('create selected object backup', ()=>{
mount(<Theme>
<SchemaView
formType='dialog'
schema={backupSelectedSchemaObj}
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}
/>
</Theme>);
});
let backupServerSchemaObj = new BackupSchema(
()=> getSectionSchema(),
()=> getTypeObjSchema(),
@@ -73,7 +111,8 @@ describe('BackupSchema', ()=>{
},
{server: {version: 11000}},
{serverInfo: {}},
'server'
'server',
[]
);
it('create server backup', ()=>{