granular dependencies (#200)

This commit is contained in:
Cilibiu Bogdan
2018-02-24 09:52:10 +02:00
committed by Denys Vuika
parent 4d7b6d3271
commit 9bbc11b0b0
7 changed files with 117 additions and 51 deletions

View File

@@ -23,11 +23,18 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { Observable } from 'rxjs/Rx';
import { MaterialModule } from '../../common/material.module';
import { CoreModule, PeopleContentService } from '@alfresco/adf-core';
import { HttpClientModule } from '@angular/common/http';
import { TranslateModule } from '@ngx-translate/core';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MatMenuModule } from '@angular/material';
import {
TranslationService, TranslationMock, AlfrescoApiService,
AppConfigService, StorageService, PeopleContentService
} from '@alfresco/adf-core';
import { CurrentUserComponent } from './current-user.component';
@@ -44,13 +51,23 @@ describe('CurrentUserComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
MaterialModule,
CoreModule,
HttpClientModule,
TranslateModule.forRoot(),
NoopAnimationsModule,
MatMenuModule,
RouterTestingModule
],
declarations: [
CurrentUserComponent
]
],
providers: [
{ provide: TranslationService, useClass: TranslationMock },
AlfrescoApiService,
AppConfigService,
StorageService,
PeopleContentService
],
schemas: [ NO_ERRORS_SCHEMA ]
})
.compileComponents()
.then(() => {