Properly support backups in Directory format. Fixes #3309

This commit is contained in:
Khushboo Vashi
2018-06-29 15:14:37 +01:00
committed by Dave Page
parent c85ced4c6b
commit fb1ef9ac0b
15 changed files with 504 additions and 714 deletions

View File

@@ -0,0 +1,55 @@
/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2018, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////
import pgAdmin from 'sources/pgadmin';
import Alertify from 'pgadmin.alertifyjs';
import '../../../pgadmin/misc/file_manager/static/js/file_manager';
import '../../../pgadmin/misc/file_manager/static/js/select_dialogue.js';
describe('fileSelectDialog', function () {
let params;
describe('When dialog is called for select file', () => {
it('Select file dialog', function() {
params = {
'dialog_title': 'Select file',
'dialog_type': 'select_file',
};
spyOn(Alertify, 'fileSelectionDlg').and.callFake(function() {
this.resizeTo = function() {};
return this;
});
pgAdmin.FileManager.show_dialog(params);
expect(Alertify.fileSelectionDlg).toHaveBeenCalled();
});
});
describe('When dialog is called for create file', () => {
it('Select file dialog', function() {
params = {
'dialog_title': 'Create file',
'dialog_type': 'create_file',
};
spyOn(Alertify, 'createModeDlg').and.callFake(function() {
this.resizeTo = function() {};
return this;
});
pgAdmin.FileManager.show_dialog(params);
expect(Alertify.createModeDlg).toHaveBeenCalled();
});
});
});