mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
@@ -110,6 +110,21 @@ describe('AlfrescoSearchAutocompleteComponent', () => {
|
||||
updateSearchTerm('searchTerm');
|
||||
});
|
||||
|
||||
it('should limit the number of returned search results to the configured maximum', (done) => {
|
||||
|
||||
spyOn(searchService, 'getSearchNodesPromise')
|
||||
.and.returnValue(Promise.resolve(results));
|
||||
|
||||
component.resultsEmitter.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
expect(element.querySelectorAll('table[data-automation-id="autocomplete_results"] tbody tr').length).toBe(2);
|
||||
done();
|
||||
});
|
||||
|
||||
component.maxResults = 2;
|
||||
updateSearchTerm('searchTerm');
|
||||
});
|
||||
|
||||
it('should display the correct thumbnail for result items', (done) => {
|
||||
|
||||
spyOn(searchService, 'getSearchNodesPromise')
|
||||
|
Reference in New Issue
Block a user