mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-847] upgrade to use application configuration service (#1986)
* migrate core lib to use server-side app config * fix unit tests * update Search tests - update tests - upgrade tests to use TestBed * update UserInfo tests * update Social tests * update tests * update unit tests * cleanup old code * update about page * update demo shell readme * dev and prod configurations
This commit is contained in:
committed by
Eugenio Romano
parent
f5b94e1bb4
commit
d5f64fa9fc
@@ -21,14 +21,7 @@ import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocompl
|
||||
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
|
||||
import { TranslationMock } from './../assets/translation.service.mock';
|
||||
import { result } from './../assets/alfresco-search.component.mock';
|
||||
import {
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoApiService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoContentService,
|
||||
AlfrescoTranslationService,
|
||||
CoreModule
|
||||
} from 'ng2-alfresco-core';
|
||||
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
||||
|
||||
describe('AlfrescoSearchControlComponent', () => {
|
||||
@@ -42,7 +35,7 @@ describe('AlfrescoSearchControlComponent', () => {
|
||||
window['componentHandler'] = componentHandler;
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
AlfrescoSearchControlComponent,
|
||||
@@ -51,10 +44,6 @@ describe('AlfrescoSearchControlComponent', () => {
|
||||
providers: [
|
||||
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
||||
AlfrescoThumbnailService,
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoApiService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoContentService,
|
||||
AlfrescoSearchService
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
@@ -65,7 +54,7 @@ describe('AlfrescoSearchControlComponent', () => {
|
||||
}));
|
||||
|
||||
it('should setup i18n folder', () => {
|
||||
let translationService = fixture.debugElement.injector.get(AlfrescoTranslationService);
|
||||
let translationService = TestBed.get(AlfrescoTranslationService);
|
||||
spyOn(translationService, 'addTranslationFolder');
|
||||
fixture.detectChanges();
|
||||
expect(translationService.addTranslationFolder)
|
||||
@@ -210,7 +199,7 @@ describe('AlfrescoSearchControlComponent', () => {
|
||||
});
|
||||
|
||||
it('should keep find-as-you-type control visible when user tabs into results', (done) => {
|
||||
let searchService = fixture.debugElement.injector.get(AlfrescoSearchService);
|
||||
let searchService = TestBed.get(AlfrescoSearchService);
|
||||
spyOn(searchService, 'getQueryNodesPromise')
|
||||
.and.returnValue(Promise.resolve(result));
|
||||
|
||||
|
Reference in New Issue
Block a user