mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Allow navigation to folders from search results (#1209)
* Allow navigation to folders from search results - Uses router to pass ID of the folder - Modified document list component to accept folder ID without path - Current limitations - Breadcrumb cannot currently be shown when navigating via folder id - Clicking between folders does not update the current route * Allow root folder ID to be changed and have documentlist reload - e.g switching from Company home to My Files * New tests for navigating to folders based on ID Refs #666
This commit is contained in:
@@ -214,7 +214,7 @@ describe('AlfrescoSearchAutocompleteComponent', () => {
|
||||
searchService = fixture.debugElement.injector.get(AlfrescoSearchService);
|
||||
});
|
||||
|
||||
it('should emit file select when file item clicked', (done) => {
|
||||
it('should emit fileSelect event when file item clicked', (done) => {
|
||||
|
||||
spyOn(searchService, 'getQueryNodesPromise')
|
||||
.and.returnValue(Promise.resolve(result));
|
||||
@@ -231,7 +231,7 @@ describe('AlfrescoSearchAutocompleteComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should not emit preview if a non-file item is clicked', (done) => {
|
||||
it('should emit fileSelect event if when folder item clicked', (done) => {
|
||||
|
||||
spyOn(searchService, 'getQueryNodesPromise')
|
||||
.and.returnValue(Promise.resolve(folderResult));
|
||||
@@ -240,7 +240,7 @@ describe('AlfrescoSearchAutocompleteComponent', () => {
|
||||
component.resultsLoad.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
(<any> element.querySelector('#result_row_0')).click();
|
||||
expect(component.fileSelect.emit).not.toHaveBeenCalled();
|
||||
expect(component.fileSelect.emit).toHaveBeenCalled();
|
||||
done();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user