mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-11973] Fix: context menu disappears during bulk upload (#5236)
* [11973] Fix: context menu disappears during bulk upload * sonar & copilot fix * [ACS-11973] cr fix
This commit is contained in:
+7
@@ -226,6 +226,13 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
reloadWithoutResettingSelection(): void {
|
||||
if (this.isOutletPreviewUrl()) {
|
||||
return;
|
||||
}
|
||||
this.documentListService.reloadSilently();
|
||||
}
|
||||
|
||||
trackByActionId(_: number, action: ContentActionRef) {
|
||||
return action.id;
|
||||
}
|
||||
|
||||
@@ -157,6 +157,23 @@ describe('PageComponent', () => {
|
||||
expect(store.dispatch['calls'].mostRecent().args[0]).toEqual(new SetSelectedNodesAction([node]));
|
||||
});
|
||||
|
||||
it('should call documentListService.reloadSilently()', () => {
|
||||
spyOn(documentListService, 'reloadSilently');
|
||||
|
||||
component.reloadWithoutResettingSelection();
|
||||
|
||||
expect(documentListService.reloadSilently).toHaveBeenCalledWith();
|
||||
});
|
||||
|
||||
it('should not call documentListService.reloadSilently() when url contains viewer outlet', () => {
|
||||
window.history.pushState({}, null, `${locationHref}#test(viewer:view)`);
|
||||
spyOn(documentListService, 'reloadSilently');
|
||||
|
||||
component.reloadWithoutResettingSelection();
|
||||
|
||||
expect(documentListService.reloadSilently).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should call ViewNodeAction on showPreview for selected node', () => {
|
||||
spyOn(store, 'dispatch');
|
||||
const node = {
|
||||
|
||||
Reference in New Issue
Block a user