mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Fixed jasmine and API test cases for import/export servers.
This commit is contained in:
parent
e797eb17eb
commit
05f3efbc97
@ -272,8 +272,12 @@ def filename_with_file_manager_path(_file, create_file=False,
|
|||||||
Filename to use for backup with full path taken from preference
|
Filename to use for backup with full path taken from preference
|
||||||
"""
|
"""
|
||||||
# retrieve storage directory path
|
# retrieve storage directory path
|
||||||
last_storage = Preferences.module('file_manager').preference(
|
try:
|
||||||
'last_storage').get()
|
last_storage = Preferences.module('file_manager').preference(
|
||||||
|
'last_storage').get()
|
||||||
|
except Exception as e:
|
||||||
|
last_storage = MY_STORAGE
|
||||||
|
|
||||||
if last_storage != MY_STORAGE:
|
if last_storage != MY_STORAGE:
|
||||||
selDirList = [sdir for sdir in current_app.config['SHARED_STORAGE']
|
selDirList = [sdir for sdir in current_app.config['SHARED_STORAGE']
|
||||||
if sdir['name'] == last_storage]
|
if sdir['name'] == last_storage]
|
||||||
|
@ -158,6 +158,7 @@ describe('FileManger', ()=>{
|
|||||||
|
|
||||||
it('Change Shared Storage', (done)=>{
|
it('Change Shared Storage', (done)=>{
|
||||||
networkMock.onPost('/file_manager/init').reply(200, {'data': configData});
|
networkMock.onPost('/file_manager/init').reply(200, {'data': configData});
|
||||||
|
networkMock.onPost(`/file_manager/save_last_dir/${transId}`).reply(200, {'success':1,'errormsg':'','info':'','result':null,'data':null});
|
||||||
let ctrl = ctrlMount({});
|
let ctrl = ctrlMount({});
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
ctrl.update();
|
ctrl.update();
|
||||||
@ -171,6 +172,7 @@ describe('FileManger', ()=>{
|
|||||||
|
|
||||||
it('Change Storage to My Storage', (done)=>{
|
it('Change Storage to My Storage', (done)=>{
|
||||||
networkMock.onPost('/file_manager/init').reply(200, {'data': configData});
|
networkMock.onPost('/file_manager/init').reply(200, {'data': configData});
|
||||||
|
networkMock.onPost(`/file_manager/save_last_dir/${transId}`).reply(200, {'success':1,'errormsg':'','info':'','result':null,'data':null});
|
||||||
let ctrl = ctrlMount({});
|
let ctrl = ctrlMount({});
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
ctrl.update();
|
ctrl.update();
|
||||||
|
Loading…
Reference in New Issue
Block a user