mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
* fix dropdown visibility #1593 * fix test search workaround material2 issue 1913
This commit is contained in:
committed by
Denys Vuika
parent
4814e95e30
commit
04f343b28f
@@ -116,6 +116,8 @@ describe('AlfrescoSearchComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
afterEach(() => { fixture.detectChanges(); });
|
||||
|
||||
it('should not have a search term by default', () => {
|
||||
expect(component.searchTerm).toBe('');
|
||||
});
|
||||
@@ -124,8 +126,11 @@ describe('AlfrescoSearchComponent', () => {
|
||||
let injector = ReflectiveInjector.resolveAndCreate([
|
||||
{provide: ActivatedRoute, useValue: {params: Observable.from([{q: 'exampleTerm692'}])}}
|
||||
]);
|
||||
|
||||
let search = new AlfrescoSearchComponent(null, null, injector.get(ActivatedRoute));
|
||||
|
||||
search.ngOnInit();
|
||||
|
||||
expect(search.searchTerm).toBe('exampleTerm692');
|
||||
});
|
||||
|
||||
@@ -140,14 +145,18 @@ describe('AlfrescoSearchComponent', () => {
|
||||
{provide: ActivatedRoute, useValue: {params: Observable.from([{}])}}
|
||||
]);
|
||||
let search = new AlfrescoSearchComponent(injector.get(AlfrescoSearchService), null, injector.get(ActivatedRoute));
|
||||
|
||||
search.ngOnInit();
|
||||
|
||||
expect(search.searchTerm).toBeNull();
|
||||
});
|
||||
|
||||
it('should setup i18n folder', () => {
|
||||
let translationService = fixture.debugElement.injector.get(AlfrescoTranslationService);
|
||||
spyOn(translationService, 'addTranslationFolder');
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(translationService.addTranslationFolder).toHaveBeenCalledWith('ng2-alfresco-search', 'node_modules/ng2-alfresco-search/src');
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user