mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1137] Spike - Improving speed of unit tests (#193)
* improve tests * improve tests * improve tests * improve tests
This commit is contained in:
committed by
Cilibiu Bogdan
parent
5234a875e7
commit
ed2f91ee7c
@@ -23,14 +23,21 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
|
||||
import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import {
|
||||
AlfrescoApiService, UserPreferencesService, TranslationService, TranslationMock,
|
||||
AppConfigService, StorageService, CookieService, NotificationService
|
||||
} from '@alfresco/adf-core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
|
||||
import { CommonModule } from '../../common/common.module';
|
||||
import { PreviewComponent } from './preview.component';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { ContentManagementService } from '../../common/services/content-management.service';
|
||||
import { MatSnackBarModule } from '@angular/material';
|
||||
|
||||
describe('PreviewComponent', () => {
|
||||
|
||||
@@ -44,12 +51,25 @@ describe('PreviewComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
HttpClientModule,
|
||||
RouterTestingModule,
|
||||
CommonModule
|
||||
TranslateModule.forRoot(),
|
||||
MatSnackBarModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
AlfrescoApiService,
|
||||
AppConfigService,
|
||||
StorageService,
|
||||
CookieService,
|
||||
NotificationService,
|
||||
UserPreferencesService,
|
||||
ContentManagementService
|
||||
],
|
||||
declarations: [
|
||||
PreviewComponent
|
||||
]
|
||||
],
|
||||
schemas: [ NO_ERRORS_SCHEMA ]
|
||||
})
|
||||
.compileComponents().then(() => {
|
||||
fixture = TestBed.createComponent(PreviewComponent);
|
||||
|
Reference in New Issue
Block a user