import { NgModule } from '@angular/core' ; import { TranslateService , TranslatePipe } from '@ngx-translate/core' ; import { NoopAnimationsModule } from '@angular/platform-browser/animations' ; import { TranslationService , TranslationMock , AuthenticationService , DiscoveryApiService , AlfrescoApiService , PipeModule , AlfrescoApiServiceMock } from '@alfresco/adf-core' ; import { RepositoryInfo } from '@alfresco/js-api' ; import { HttpClientModule } from '@angular/common/http' ; import { StoreModule } from '@ngrx/store' ; import { appReducer } from '../store/reducers/app.reducer' ; import { RouterTestingModule } from '@angular/router/testing' ; import { EffectsModule } from '@ngrx/effects' ; import { MaterialModule } from '../material.module' ; import { INITIAL_STATE } from '../store/initial-state' ; import { TranslatePipeMock } from './translate-pipe.directive' ; import { TranslateServiceMock } from './translation.service' ; import { BehaviorSubject , Observable , of } from 'rxjs' ; @ NgModule ( { imports : [ NoopAnimationsModule , HttpClientModule , RouterTestingModule , MaterialModule , StoreModule . forRoot ( { app : appReducer } , { initialState : INITIAL_STATE , runtimeChecks : { strictStateImmutability : false , strictActionImmutability : false } } ) , EffectsModule . forRoot ( [ ] ) , PipeModule ] , declarations : [ TranslatePipeMock ] , exports : [ TranslatePipeMock , RouterTestingModule , MaterialModule , PipeModule ] , providers : [ { provide : AlfrescoApiService , useClass : AlfrescoApiServiceMock } , { provide : TranslationService , useClass : TranslationMock } , { provide : TranslateService , useClass : TranslateServiceMock } , { provide : TranslatePipe , useClass : TranslatePipeMock } , { provide : DiscoveryApiService , useValue : { ecmProductInfo$ : new BehaviorSubject < RepositoryInfo > ( null ) , getEcmProductInfo ( ) { return of ( new RepositoryInfo ( { version : '10.0.0' } ) ) ; } } } , { provide : AuthenticationService , useValue : { isEcmLoggedIn ( ) { return true ; } , getRedirect ( ) { return null ; } , setRedirect ( ) { } , isOauth ( ) { return false ; } , isOAuthWithoutSilentLogin ( ) { return false ; } } } ] } ) export class AppTestingModule { }