diff --git a/projects/aca-content/src/lib/store/effects/node.effects.spec.ts b/projects/aca-content/src/lib/store/effects/node.effects.spec.ts index 8f47bf3b8..a1dae25e6 100644 --- a/projects/aca-content/src/lib/store/effects/node.effects.spec.ts +++ b/projects/aca-content/src/lib/store/effects/node.effects.spec.ts @@ -381,19 +381,19 @@ describe('NodeEffects', () => { describe('managePermissions$', () => { it('should manage permissions from the payload', () => { - spyOn(router, 'navigate').and.stub(); + spyOn(router, 'navigateByUrl').and.stub(); const node: any = { entry: { isFile: true, id: 'fileId' } }; store.dispatch(new ManagePermissionsAction(node)); - expect(router.navigate).toHaveBeenCalledWith(['personal-files/details', 'fileId', 'permissions']); + expect(router.navigateByUrl).toHaveBeenCalledWith('personal-files/details/fileId/permissions'); }); it('should manage permissions from the active selection', () => { spyOn(store, 'select').and.returnValue(of({ isEmpty: false, last: { entry: { id: 'fileId' } } })); - spyOn(router, 'navigate').and.stub(); + spyOn(router, 'navigateByUrl').and.stub(); store.dispatch(new ManagePermissionsAction(null)); - expect(router.navigate).toHaveBeenCalledWith(['personal-files/details', 'fileId', 'permissions']); + expect(router.navigateByUrl).toHaveBeenCalledWith('personal-files/details/fileId/permissions'); }); it('should do nothing if invoking manage permissions with no data', () => { diff --git a/projects/aca-content/src/lib/store/effects/node.effects.ts b/projects/aca-content/src/lib/store/effects/node.effects.ts index 152947137..b7c9ca254 100644 --- a/projects/aca-content/src/lib/store/effects/node.effects.ts +++ b/projects/aca-content/src/lib/store/effects/node.effects.ts @@ -50,7 +50,8 @@ import { ExpandInfoDrawerAction, ManageRulesAction, ShowLoaderAction, - ToggleInfoDrawerAction + ToggleInfoDrawerAction, + NavigateUrlAction } from '@alfresco/aca-shared/store'; import { ContentManagementService } from '../../services/content-management.service'; import { RenditionService } from '@alfresco/adf-content-services'; @@ -285,7 +286,7 @@ export class NodeEffects { map((action) => { if (action?.payload) { const route = 'personal-files/details'; - this.store.dispatch(new NavigateRouteAction([route, action.payload.entry.id, 'permissions'])); + this.store.dispatch(new NavigateUrlAction([route, action.payload.entry.id, 'permissions'].join('/'))); } else { this.store .select(getAppSelection) @@ -293,7 +294,7 @@ export class NodeEffects { .subscribe((selection) => { if (selection && !selection.isEmpty) { const route = 'personal-files/details'; - this.store.dispatch(new NavigateRouteAction([route, selection.last.entry.id, 'permissions'])); + this.store.dispatch(new NavigateUrlAction([route, selection.last.entry.id, 'permissions'].join('/'))); } }); }