From 8b0c18629e22fde4c14e66a821735af94f7fd124 Mon Sep 17 00:00:00 2001 From: Suzana Dirla Date: Tue, 5 Mar 2019 11:28:10 +0200 Subject: [PATCH] [ACA-2228] Add PipeModule to AppTestingModule (#993) - fixes unit tests after upgrade to 3.1.0-beta4 --- .../favorite-libraries.component.spec.ts | 4 ---- src/app/components/favorites/favorites.component.spec.ts | 4 ---- src/app/components/files/files.component.spec.ts | 6 ------ src/app/components/libraries/libraries.component.spec.ts | 4 ---- .../recent-files/recent-files.component.spec.ts | 4 ---- .../shared-files/shared-files.component.spec.ts | 4 ---- src/app/components/trashcan/trashcan.component.spec.ts | 4 ---- src/app/testing/app-testing.module.ts | 8 +++++--- 8 files changed, 5 insertions(+), 33 deletions(-) diff --git a/src/app/components/favorite-libraries/favorite-libraries.component.spec.ts b/src/app/components/favorite-libraries/favorite-libraries.component.spec.ts index a1b7f44038..17b5ae9123 100644 --- a/src/app/components/favorite-libraries/favorite-libraries.component.spec.ts +++ b/src/app/components/favorite-libraries/favorite-libraries.component.spec.ts @@ -29,8 +29,6 @@ import { UserPreferencesService } from '@alfresco/adf-core'; import { Router } from '@angular/router'; import { AlfrescoApiService, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DataTableComponent, AppConfigPipe @@ -71,8 +69,6 @@ describe('FavoriteLibrariesComponent', () => { ], declarations: [ DataTableComponent, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DocumentListComponent, FavoriteLibrariesComponent, diff --git a/src/app/components/favorites/favorites.component.spec.ts b/src/app/components/favorites/favorites.component.spec.ts index 06c7f5bf4d..635c01fb73 100644 --- a/src/app/components/favorites/favorites.component.spec.ts +++ b/src/app/components/favorites/favorites.component.spec.ts @@ -28,8 +28,6 @@ import { Router } from '@angular/router'; import { TestBed, ComponentFixture } from '@angular/core/testing'; import { AlfrescoApiService, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DataTableComponent, AppConfigPipe @@ -75,8 +73,6 @@ describe('FavoritesComponent', () => { imports: [AppTestingModule], declarations: [ DataTableComponent, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DocumentListComponent, FavoritesComponent, diff --git a/src/app/components/files/files.component.spec.ts b/src/app/components/files/files.component.spec.ts index 67af80e6fa..6a7f487379 100644 --- a/src/app/components/files/files.component.spec.ts +++ b/src/app/components/files/files.component.spec.ts @@ -32,9 +32,6 @@ import { import { NO_ERRORS_SCHEMA } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { - TimeAgoPipe, - NodeNameTooltipPipe, - FileSizePipe, NodeFavoriteDirective, DataTableComponent, UploadService, @@ -62,11 +59,8 @@ describe('FilesComponent', () => { declarations: [ FilesComponent, DataTableComponent, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DocumentListComponent, - FileSizePipe, AppConfigPipe ], providers: [ diff --git a/src/app/components/libraries/libraries.component.spec.ts b/src/app/components/libraries/libraries.component.spec.ts index afc63620b3..b6b6c7d34f 100644 --- a/src/app/components/libraries/libraries.component.spec.ts +++ b/src/app/components/libraries/libraries.component.spec.ts @@ -28,8 +28,6 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { Router } from '@angular/router'; import { AlfrescoApiService, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DataTableComponent, AppConfigPipe @@ -61,8 +59,6 @@ describe('LibrariesComponent', () => { imports: [AppTestingModule, EffectsModule.forRoot([LibraryEffects])], declarations: [ DataTableComponent, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DocumentListComponent, LibrariesComponent, diff --git a/src/app/components/recent-files/recent-files.component.spec.ts b/src/app/components/recent-files/recent-files.component.spec.ts index 607fe386e7..160ccc092d 100644 --- a/src/app/components/recent-files/recent-files.component.spec.ts +++ b/src/app/components/recent-files/recent-files.component.spec.ts @@ -27,8 +27,6 @@ import { TestBed, ComponentFixture } from '@angular/core/testing'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { AlfrescoApiService, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DataTableComponent, AppConfigPipe @@ -57,8 +55,6 @@ describe('RecentFilesComponent', () => { imports: [AppTestingModule], declarations: [ DataTableComponent, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DocumentListComponent, RecentFilesComponent, diff --git a/src/app/components/shared-files/shared-files.component.spec.ts b/src/app/components/shared-files/shared-files.component.spec.ts index 5c37680c74..1327af3ee9 100644 --- a/src/app/components/shared-files/shared-files.component.spec.ts +++ b/src/app/components/shared-files/shared-files.component.spec.ts @@ -27,8 +27,6 @@ import { TestBed, ComponentFixture } from '@angular/core/testing'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { AlfrescoApiService, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DataTableComponent, AppConfigPipe @@ -57,8 +55,6 @@ describe('SharedFilesComponent', () => { imports: [AppTestingModule], declarations: [ DataTableComponent, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DocumentListComponent, SharedFilesComponent, diff --git a/src/app/components/trashcan/trashcan.component.spec.ts b/src/app/components/trashcan/trashcan.component.spec.ts index 58b36725e3..b5854ea79d 100644 --- a/src/app/components/trashcan/trashcan.component.spec.ts +++ b/src/app/components/trashcan/trashcan.component.spec.ts @@ -26,8 +26,6 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { TestBed, ComponentFixture } from '@angular/core/testing'; import { AlfrescoApiService, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DataTableComponent, AppConfigPipe @@ -56,8 +54,6 @@ describe('TrashcanComponent', () => { imports: [AppTestingModule], declarations: [ DataTableComponent, - TimeAgoPipe, - NodeNameTooltipPipe, NodeFavoriteDirective, DocumentListComponent, TrashcanComponent, diff --git a/src/app/testing/app-testing.module.ts b/src/app/testing/app-testing.module.ts index 511b2890c3..1eaafbe20a 100644 --- a/src/app/testing/app-testing.module.ts +++ b/src/app/testing/app-testing.module.ts @@ -41,7 +41,8 @@ import { ContentService, ThumbnailService, UploadService, - AlfrescoApiMock + AlfrescoApiMock, + PipeModule } from '@alfresco/adf-core'; import { HttpClientModule } from '@angular/common/http'; import { TranslateServiceMock } from './translation.service'; @@ -63,10 +64,11 @@ import { MaterialModule } from '../material.module'; RouterTestingModule, MaterialModule, StoreModule.forRoot({ app: appReducer }, { initialState: INITIAL_STATE }), - EffectsModule.forRoot([]) + EffectsModule.forRoot([]), + PipeModule ], declarations: [TranslatePipeMock], - exports: [TranslatePipeMock, RouterTestingModule, MaterialModule], + exports: [TranslatePipeMock, RouterTestingModule, MaterialModule, PipeModule], providers: [ { provide: AlfrescoApiService, useClass: AlfrescoApiMock }, { provide: TranslationService, useClass: TranslationMock },