mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3930] fix infinite pagination (#4275)
* refactoring infinite pagination * fix lint * fix import reuqest pagination from core * fix failing unit test
This commit is contained in:
@@ -1269,6 +1269,24 @@ describe('DocumentList', () => {
|
||||
documentList.ngOnChanges({ currentFolderId: new SimpleChange(null, '-root-', false) });
|
||||
|
||||
expect(documentListService.getFolder).toHaveBeenCalledWith(null, {
|
||||
where: undefined,
|
||||
maxItems: 25,
|
||||
skipCount: 0,
|
||||
rootFolderId: 'fake-id'
|
||||
}, ['test-include']);
|
||||
});
|
||||
|
||||
it('should add where in the server request when present', () => {
|
||||
fixture.detectChanges();
|
||||
documentList.currentFolderId = 'fake-id';
|
||||
documentList.includeFields = ['test-include'];
|
||||
documentList.where = '(isFolder=true)';
|
||||
spyOn(documentListService, 'getFolder').and.callThrough();
|
||||
|
||||
documentList.ngOnChanges({ currentFolderId: new SimpleChange(null, '-root-', false) });
|
||||
|
||||
expect(documentListService.getFolder).toHaveBeenCalledWith(null, {
|
||||
where: '(isFolder=true)',
|
||||
maxItems: 25,
|
||||
skipCount: 0,
|
||||
rootFolderId: 'fake-id'
|
||||
|
Reference in New Issue
Block a user