[ACS-6712] Fixed an issue where the details panel would not expand from the viewer (#4045)

This commit is contained in:
Mykyta Maliarchuk
2024-08-22 14:22:57 +02:00
committed by GitHub
parent 3b6cc7ba5a
commit 360970da85
2 changed files with 19 additions and 10 deletions

View File

@@ -38,6 +38,7 @@ import {
ManageAspectsAction,
ManagePermissionsAction,
MoveNodesAction,
NavigateUrlAction,
PrintFileAction,
PurgeDeletedNodesAction,
RestoreDeletedNodesAction,
@@ -546,5 +547,21 @@ describe('NodeEffects', () => {
})
);
});
it('should redirect to correct url', () => {
spyOn(store, 'dispatch').and.callThrough();
Object.defineProperties(router, {
events: {
value: of(new NavigationEnd(1, 'test/(viewer:view/node-id)', ''))
},
navigateByUrl: {
value: jasmine.createSpy('navigateByUrl')
}
});
const node: any = { entry: { isFile: true, id: 'node-id' } };
store.dispatch(new ExpandInfoDrawerAction(node));
expect(store.dispatch).toHaveBeenCalledWith(new NavigateUrlAction('personal-files/details/node-id'));
});
});
});