mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1488] reset selection on Document List data change (#2341)
* reset selection on data change * unit tests * fix unit tests
This commit is contained in:
committed by
Eugenio Romano
parent
3c1729b960
commit
43277148b2
@@ -183,6 +183,21 @@ describe('DocumentList', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should reset selection upon reload', () => {
|
||||
spyOn(documentList, 'resetSelection').and.callThrough();
|
||||
|
||||
documentList.reload();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(documentList.resetSelection).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should reset selection on loading folder by node id', () => {
|
||||
spyOn(documentList, 'resetSelection').and.callThrough();
|
||||
documentList.loadFolderByNodeId('-trashcan-');
|
||||
expect(documentList.resetSelection).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should empty template be present when no element are present', (done) => {
|
||||
documentList.currentFolderId = '1d26e465-dea3-42f3-b415-faa8364b9692';
|
||||
documentList.folderNode = new NodeMinimal();
|
||||
|
Reference in New Issue
Block a user