[ADF-4042] fix reset pagination issue when enter in a folder (#4281)

* fix reset pagination issue when enter in a folder

* fix pagination new folder issue and infintie pagiantion
This commit is contained in:
Eugenio Romano
2019-02-07 21:30:46 +00:00
committed by GitHub
parent 9915935714
commit 8fa335aced
6 changed files with 83 additions and 56 deletions

View File

@@ -1295,4 +1295,24 @@ describe('DocumentList', () => {
rootFolderId: 'fake-id'
}, ['test-include']);
});
it('should reset the pagination when enter in a new folder', () => {
let folder = new FolderNode();
documentList.navigationMode = DocumentListComponent.SINGLE_CLICK_NAVIGATION;
documentList.updatePagination({
maxItems: 10,
skipCount: 10
});
spyOn(documentListService, 'getFolder').and.callThrough();
documentList.onNodeClick(folder);
expect(documentListService.getFolder).toHaveBeenCalledWith(null, {
maxItems: 25,
skipCount: 0,
rootFolderId: 'folder-id',
where: undefined
}, undefined);
});
});