1) Port the file/storage manager to React. Fixes #7313

2) Allow users to delete files/folders from the storage manager. Fixes #4607
3) Allow users to search within the file/storage manager. Fixes #7389
4) Fixed an issue where new folders cannot be created in the save dialog. Fixes #7524
This commit is contained in:
Aditya Toshniwal
2022-07-19 15:27:47 +05:30
committed by Akshay Joshi
parent 4585597388
commit 4808df5e95
76 changed files with 2907 additions and 3927 deletions

View File

@@ -38,12 +38,11 @@ let pgAdmin = {
app_version_int: 1234,
},
},
FileManager: {
init: jasmine.createSpy(),
show_dialog: jasmine.createSpy(),
},
Tools: {
SQLEditor: {},
FileManager: {
show: jasmine.createSpy(),
},
}
};
@@ -360,7 +359,7 @@ describe('ERD BodyWidget', ()=>{
it('onLoadDiagram', ()=>{
bodyInstance.onLoadDiagram();
expect(pgAdmin.FileManager.show_dialog).toHaveBeenCalled();
expect(pgAdmin.Tools.FileManager.show).toHaveBeenCalled();
});
it('openFile', (done)=>{
@@ -389,9 +388,10 @@ describe('ERD BodyWidget', ()=>{
done();
});
pgAdmin.Tools.FileManager.show.calls.reset();
bodyInstance.onSaveDiagram(true);
expect(pgAdmin.FileManager.show_dialog).toHaveBeenCalledWith({
'supported_types': ['pgerd'],
expect(pgAdmin.Tools.FileManager.show.calls.argsFor(0)[0]).toEqual({
'supported_types': ['*','pgerd'],
'dialog_type': 'create_file',
'dialog_title': 'Save File',
'btn_primary': 'Save',