mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-459] Copy & move further features (#2187)
* Adding current folder to list by default * Fix documentlist component's rowFilter and imageResolver * Adding rowfilter to not show the current node in the list * Removing unpermitted nodes from the selectable ones (not visually) * Restore documentlist original behaviour (rowFilter and imageResolver) * Select event interface works with array from this point on * Introducing the one and only, mighty Breadcrumb * Breadcrumb position fix * Extract hightlight transform functionality from highlight pipe * Highlight part I. * Showing breadcrumb with the new redesigned functionality * Rebase fix * Error and success callback for the new content actions * Tests for HighlightDirective * Update documentation * Until proper pagination we use this temporary fix * Fix node unselection on folder change * Fix accessibility support in dropdown breadcrumb
This commit is contained in:
committed by
Mario Romano
parent
a8024bbdf5
commit
e93a771366
@@ -728,20 +728,33 @@ describe('DocumentList', () => {
|
||||
expect(element.querySelector('alfresco-pagination')).toBe(null);
|
||||
});
|
||||
|
||||
it('should set row filter for underlying adapter', () => {
|
||||
it('should set row filter and reload contents if currentFolderId is set when setting rowFilter', () => {
|
||||
let filter = <RowFilter> {};
|
||||
documentList.currentFolderId = 'id';
|
||||
spyOn(documentList.data, 'setFilter').and.callThrough();
|
||||
spyOn(documentListService, 'getFolder');
|
||||
|
||||
documentList.ngOnChanges({rowFilter: new SimpleChange(null, filter, true)});
|
||||
|
||||
documentList.rowFilter = filter;
|
||||
expect(documentList.data.setFilter).toHaveBeenCalledWith(filter);
|
||||
expect(documentListService.getFolder).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should NOT reload contents if currentFolderId is NOT set when setting rowFilter', () => {
|
||||
documentList.currentFolderId = null;
|
||||
spyOn(documentListService, 'getFolder');
|
||||
|
||||
documentList.ngOnChanges({rowFilter: new SimpleChange(null, <RowFilter> {}, true)});
|
||||
|
||||
expect(documentListService.getFolder).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should set image resolver for underlying adapter', () => {
|
||||
let resolver = <ImageResolver> {};
|
||||
spyOn(documentList.data, 'setImageResolver').and.callThrough();
|
||||
|
||||
documentList.imageResolver = resolver;
|
||||
documentList.ngOnChanges({imageResolver: new SimpleChange(null, resolver, true)});
|
||||
|
||||
expect(documentList.data.setImageResolver).toHaveBeenCalledWith(resolver);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user