mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 00:37:36 -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
|
||||
"""
|
||||
# retrieve storage directory path
|
||||
last_storage = Preferences.module('file_manager').preference(
|
||||
'last_storage').get()
|
||||
try:
|
||||
last_storage = Preferences.module('file_manager').preference(
|
||||
'last_storage').get()
|
||||
except Exception as e:
|
||||
last_storage = MY_STORAGE
|
||||
|
||||
if last_storage != MY_STORAGE:
|
||||
selDirList = [sdir for sdir in current_app.config['SHARED_STORAGE']
|
||||
if sdir['name'] == last_storage]
|
||||
|
@ -158,6 +158,7 @@ describe('FileManger', ()=>{
|
||||
|
||||
it('Change Shared Storage', (done)=>{
|
||||
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({});
|
||||
setTimeout(()=>{
|
||||
ctrl.update();
|
||||
@ -171,6 +172,7 @@ describe('FileManger', ()=>{
|
||||
|
||||
it('Change Storage to My Storage', (done)=>{
|
||||
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({});
|
||||
setTimeout(()=>{
|
||||
ctrl.update();
|
||||
|
Loading…
Reference in New Issue
Block a user