Skip to content

Commit

Permalink
misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shayanaijaz committed Sep 13, 2023
1 parent c44e68d commit 96d3533
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const DataFilesCopyModal = React.memo(() => {
srcApi: params.api,
destApi: modalParams.api,
destSystem: system,
destPath: path,
destPath: path || '/',
name,
callback: reloadPage,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const DataFilesModalButtonCell = ({
operationOnlyForFolders,
disabled,
}) => {
const onClick = () => operationCallback(system, path || '/', name);
const onClick = () => operationCallback(system, path, name);
const formatSupportsOperation =
!operationOnlyForFolders || format === 'folder';
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,19 @@ describe('DataFilesCopyModal', () => {
expect(projectLink).toBeDefined();
expect(store.getActions()).toEqual([
{ type: 'GET_SYSTEM_MONITOR' },
{ type: 'PROJECTS_GET_LISTING', payload: { queryString: null, modal: 'copy' } },
{
type: 'PROJECTS_GET_LISTING',
payload: { queryString: null, modal: 'copy' },
},
]);
fireEvent.click(projectLink);

expect(store.getActions()).toEqual([
{ type: 'GET_SYSTEM_MONITOR' },
{ type: 'PROJECTS_GET_LISTING', payload: { queryString: null, modal: 'copy' } },
{
type: 'PROJECTS_GET_LISTING',
payload: { queryString: null, modal: 'copy' },
},
{
type: 'FETCH_FILES',
payload: {
Expand Down

0 comments on commit 96d3533

Please sign in to comment.