mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-12617] [ACA] Recent Files page, the document list does not refresh after a Delete action (#5377)
This commit is contained in:
@@ -146,6 +146,22 @@ describe('DocumentListDirective', () => {
|
|||||||
expect(documentListMock.stickyHeader).toBeTruthy();
|
expect(documentListMock.stickyHeader).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should set include fields', () => {
|
||||||
|
mockRouter.url = '/some-route';
|
||||||
|
documentListMock.currentFolderId = '-my-';
|
||||||
|
documentListDirective.ngOnInit();
|
||||||
|
|
||||||
|
expect(documentListMock.includeFields).toEqual(['isFavorite', 'aspectNames', 'definition', 'isLink']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set include fields supported by search api for recent files', () => {
|
||||||
|
mockRouter.url = '/some-route';
|
||||||
|
documentListMock.currentFolderId = '-recent-';
|
||||||
|
documentListDirective.ngOnInit();
|
||||||
|
|
||||||
|
expect(documentListMock.includeFields).toEqual(['aspectNames', 'isLink']);
|
||||||
|
});
|
||||||
|
|
||||||
it('should set `isLibrary` to true if selected node is a library', () => {
|
it('should set `isLibrary` to true if selected node is a library', () => {
|
||||||
mockRouter.url = '/some-route';
|
mockRouter.url = '/some-route';
|
||||||
documentListMock.currentFolderId = '-mysites-';
|
documentListMock.currentFolderId = '-mysites-';
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ import { NodeEntry } from '@alfresco/js-api';
|
|||||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||||
import { AppHookService } from '@alfresco/aca-shared';
|
import { AppHookService } from '@alfresco/aca-shared';
|
||||||
|
|
||||||
|
const INCLUDE_FIELDS = ['isFavorite', 'aspectNames', 'definition', 'isLink'];
|
||||||
|
const SEARCH_INCLUDE_FIELDS = ['aspectNames', 'isLink'];
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
standalone: true,
|
standalone: true,
|
||||||
selector: '[acaDocumentList]'
|
selector: '[acaDocumentList]'
|
||||||
@@ -60,7 +63,7 @@ export class DocumentListDirective implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.documentList.stickyHeader = true;
|
this.documentList.stickyHeader = true;
|
||||||
this.documentList.includeFields = ['isFavorite', 'aspectNames', 'definition', 'isLink'];
|
this.documentList.includeFields = this.documentList.currentFolderId === '-recent-' ? SEARCH_INCLUDE_FIELDS : INCLUDE_FIELDS;
|
||||||
this.isLibrary =
|
this.isLibrary =
|
||||||
this.documentList.currentFolderId === '-mysites-' ||
|
this.documentList.currentFolderId === '-mysites-' ||
|
||||||
// workaround for custom node list
|
// workaround for custom node list
|
||||||
|
|||||||
Reference in New Issue
Block a user