mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-6587] ACA: Viewer does not update after restoring version and the toolbar disappears (#3669)
* [ACS-6587] update after restoring version * [ACS-6587] update tests * [ACS-6587] add tests and fixes * resolve conflicts content-management.service.spec.ts
This commit is contained in:
@@ -34,7 +34,7 @@ import {
|
||||
NavigateToParentFolder,
|
||||
NodeActionTypes,
|
||||
PurgeDeletedNodesAction,
|
||||
ReloadDocumentListAction,
|
||||
RefreshPreviewAction,
|
||||
RestoreDeletedNodesAction,
|
||||
SetSelectedNodesAction,
|
||||
ShareNodeAction,
|
||||
@@ -1608,10 +1608,11 @@ describe('ContentManagementService', () => {
|
||||
expect(spyOnOpenUploadNewVersionDialog['calls'].argsFor(0)[2]).toEqual(elementToFocusSelector);
|
||||
});
|
||||
|
||||
it('should dispatch ReloadDocumentListAction if dialog emit refresh action', () => {
|
||||
spyOnOpenUploadNewVersionDialog.and.returnValue(of({ action: NewVersionUploaderDataAction.refresh }));
|
||||
it('should dispatch RefreshPreviewAction if dialog emit refresh action', () => {
|
||||
spyOnOpenUploadNewVersionDialog.and.returnValue(of({ action: NewVersionUploaderDataAction.refresh, node: fakeNodeIsFile }));
|
||||
contentManagementService.manageVersions(fakeNodeIsFile);
|
||||
expect(spyOnDispatch).toHaveBeenCalledOnceWith(new ReloadDocumentListAction());
|
||||
|
||||
expect(spyOnDispatch).toHaveBeenCalledOnceWith(new RefreshPreviewAction(fakeNodeIsFile));
|
||||
});
|
||||
|
||||
it('should dispatch ReloadDocumentListAction if dialog emit view action', () => {
|
||||
|
@@ -32,6 +32,7 @@ import {
|
||||
NavigateRouteAction,
|
||||
NavigateToParentFolder,
|
||||
NodeInfo,
|
||||
RefreshPreviewAction,
|
||||
ReloadDocumentListAction,
|
||||
SetSelectedNodesAction,
|
||||
ShowLoaderAction,
|
||||
@@ -581,7 +582,7 @@ export class ContentManagementService {
|
||||
next: (newVersionUploaderData: NewVersionUploaderData) => {
|
||||
switch (newVersionUploaderData.action) {
|
||||
case NewVersionUploaderDataAction.refresh:
|
||||
this.store.dispatch(new ReloadDocumentListAction());
|
||||
this.store.dispatch(new RefreshPreviewAction(newVersionUploaderData.node));
|
||||
break;
|
||||
case NewVersionUploaderDataAction.view:
|
||||
this.store.dispatch(
|
||||
|
Reference in New Issue
Block a user