mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[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:
@@ -742,17 +742,21 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
});
|
||||
|
||||
it('button callback should load the next batch of folder results when there is no searchTerm', () => {
|
||||
const skipCount = 5;
|
||||
|
||||
component.searchTerm = '';
|
||||
fixture.detectChanges();
|
||||
|
||||
component.getNextPageOfSearch({ skipCount });
|
||||
component.getNextPageOfSearch({
|
||||
hasMoreItems: false,
|
||||
skipCount: 10,
|
||||
maxItems: 45,
|
||||
totalItems: 0
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
expect(component.searchTerm).toBe('');
|
||||
|
||||
expect(component.infiniteScroll).toBeTruthy();
|
||||
expect(component.skipCount).toBe(skipCount);
|
||||
expect(component.pagination.maxItems).toBe(45);
|
||||
expect(searchSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user