[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:
Mykyta Maliarchuk
2026-06-25 10:24:17 +02:00
committed by GitHub
parent c9e3338ccf
commit b2149441f0
11 changed files with 151 additions and 36 deletions
@@ -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 = {