mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
- expose ‘error’ event - change path only on successful navigation - extend demo shell with error handling and reporting - additional unit tests for document-list
This commit is contained in:
committed by
Eugenio Romano
parent
da70a72bba
commit
7eab89c5ef
@@ -85,15 +85,18 @@ describe('DocumentListBreadcrumb', () => {
|
||||
component.onRoutePathClick(node, null);
|
||||
});
|
||||
|
||||
it('should update document list on click', () => {
|
||||
it('should update document list on click', (done) => {
|
||||
let documentList = new DocumentList(null, null, null);
|
||||
spyOn(documentList, 'displayFolderContent').and.stub();
|
||||
spyOn(documentList, 'displayFolderContent').and.returnValue(Promise.resolve());
|
||||
|
||||
let node = <PathNode> { name: 'name', path: '/path' };
|
||||
component.target = documentList;
|
||||
|
||||
component.onRoutePathClick(node, null);
|
||||
expect(documentList.currentFolderPath).toBe(node.path);
|
||||
setTimeout(() => {
|
||||
expect(documentList.currentFolderPath).toBe(node.path);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should do nothing for same path', () => {
|
||||
|
Reference in New Issue
Block a user