diff --git a/src/app/admin/admin-ldn-services/ldn-service-form/ldn-service-form.component.spec.ts b/src/app/admin/admin-ldn-services/ldn-service-form/ldn-service-form.component.spec.ts index 78ae74ad1e..017683fcf1 100644 --- a/src/app/admin/admin-ldn-services/ldn-service-form/ldn-service-form.component.spec.ts +++ b/src/app/admin/admin-ldn-services/ldn-service-form/ldn-service-form.component.spec.ts @@ -88,8 +88,7 @@ describe('LdnServiceFormEditComponent', () => { activatedRoute = new MockActivatedRoute(routeParams, routeUrlSegments); await TestBed.configureTestingModule({ - imports: [ReactiveFormsModule, TranslateModule.forRoot(), NgbDropdownModule], - declarations: [LdnServiceFormComponent], + imports: [ReactiveFormsModule, TranslateModule.forRoot(), NgbDropdownModule, LdnServiceFormComponent], providers: [ { provide: LdnServicesService, useValue: ldnServicesService }, { provide: LdnItemfiltersService, useValue: ldnItemfiltersService }, diff --git a/src/app/admin/admin-ldn-services/ldn-services-directory/ldn-services-directory.component.spec.ts b/src/app/admin/admin-ldn-services/ldn-services-directory/ldn-services-directory.component.spec.ts index 672d825fbb..f7e33a1d7a 100644 --- a/src/app/admin/admin-ldn-services/ldn-services-directory/ldn-services-directory.component.spec.ts +++ b/src/app/admin/admin-ldn-services/ldn-services-directory/ldn-services-directory.component.spec.ts @@ -35,8 +35,7 @@ describe('LdnServicesOverviewComponent', () => { paginationService = new PaginationServiceStub(); ldnServicesService = jasmine.createSpyObj('LdnServicesService', ['findAll', 'delete', 'patch']); await TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [LdnServicesOverviewComponent], + imports: [TranslateModule.forRoot(), LdnServicesOverviewComponent], providers: [ { provide: LdnServicesService, diff --git a/src/app/admin/admin-notifications/admin-notifications-publication-claim-page/admin-notifications-publication-claim-page.component.spec.ts b/src/app/admin/admin-notifications/admin-notifications-publication-claim-page/admin-notifications-publication-claim-page.component.spec.ts index 5c76042a0e..4755a712fe 100644 --- a/src/app/admin/admin-notifications/admin-notifications-publication-claim-page/admin-notifications-publication-claim-page.component.spec.ts +++ b/src/app/admin/admin-notifications/admin-notifications-publication-claim-page/admin-notifications-publication-claim-page.component.spec.ts @@ -15,9 +15,9 @@ describe('NotificationsSuggestionTargetsPageComponent', () => { TestBed.configureTestingModule({ imports: [ CommonModule, - TranslateModule.forRoot() + TranslateModule.forRoot(), + NotificationsSuggestionTargetsPageComponent ], - declarations: [NotificationsSuggestionTargetsPageComponent], providers: [ NotificationsSuggestionTargetsPageComponent ], diff --git a/src/app/admin/admin-reports/filtered-collections/filtered-collections.component.spec.ts b/src/app/admin/admin-reports/filtered-collections/filtered-collections.component.spec.ts index 29a304837d..498b31ef1f 100644 --- a/src/app/admin/admin-reports/filtered-collections/filtered-collections.component.spec.ts +++ b/src/app/admin/admin-reports/filtered-collections/filtered-collections.component.spec.ts @@ -28,7 +28,6 @@ describe('FiltersComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [FilteredCollectionsComponent], imports: [ NgbAccordionModule, TranslateModule.forRoot({ @@ -37,7 +36,8 @@ describe('FiltersComponent', () => { useClass: TranslateLoaderMock } }), - HttpClientTestingModule + HttpClientTestingModule, + FilteredCollectionsComponent ], providers: [ FormBuilder, diff --git a/src/app/admin/admin-reports/filters-section/filters-section.component.spec.ts b/src/app/admin/admin-reports/filters-section/filters-section.component.spec.ts index abb77703a0..ccf55977d6 100644 --- a/src/app/admin/admin-reports/filters-section/filters-section.component.spec.ts +++ b/src/app/admin/admin-reports/filters-section/filters-section.component.spec.ts @@ -12,14 +12,14 @@ describe('FiltersComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [FiltersComponent], imports: [ TranslateModule.forRoot({ loader: { provide: TranslateLoader, useClass: TranslateLoaderMock } - }) + }), + FiltersComponent ], providers: [ FormBuilder diff --git a/src/app/browse-by/browse-by-page/browse-by-page.component.spec.ts b/src/app/browse-by/browse-by-page/browse-by-page.component.spec.ts index 97ee576a88..395e8fdcce 100644 --- a/src/app/browse-by/browse-by-page/browse-by-page.component.spec.ts +++ b/src/app/browse-by/browse-by-page/browse-by-page.component.spec.ts @@ -40,9 +40,8 @@ describe('BrowseByPageComponent', () => { themeService = getMockThemeService(); await TestBed.configureTestingModule({ - imports: [BrowseBySwitcherComponent], - declarations: [BrowseByPageComponent, - DynamicComponentLoaderDirective], + imports: [BrowseBySwitcherComponent, BrowseByPageComponent], + declarations: [DynamicComponentLoaderDirective], providers: [ BrowseByTestComponent, { provide: ActivatedRoute, useValue: activatedRoute }, diff --git a/src/app/item-page/simple/field-components/specific-field/img/item-page-img-field.component.spec.ts b/src/app/item-page/simple/field-components/specific-field/img/item-page-img-field.component.spec.ts index 55ba54474f..31077276c5 100644 --- a/src/app/item-page/simple/field-components/specific-field/img/item-page-img-field.component.spec.ts +++ b/src/app/item-page/simple/field-components/specific-field/img/item-page-img-field.component.spec.ts @@ -36,12 +36,11 @@ describe('ItemPageImgFieldComponent', () => { provide: TranslateLoader, useClass: TranslateLoaderMock } - }), GenericItemPageFieldComponent, MetadataValuesComponent], + }), GenericItemPageFieldComponent, MetadataValuesComponent, ItemPageImgFieldComponent], providers: [ { provide: APP_CONFIG, useValue: environment }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub } ], - declarations: [ItemPageImgFieldComponent], schemas: [NO_ERRORS_SCHEMA] }) .overrideComponent(GenericItemPageFieldComponent, { diff --git a/src/app/notifications/qa/events/ePerson-data/ePerson-data.component.spec.ts b/src/app/notifications/qa/events/ePerson-data/ePerson-data.component.spec.ts index 0daa8f1e5f..3213ddecc3 100644 --- a/src/app/notifications/qa/events/ePerson-data/ePerson-data.component.spec.ts +++ b/src/app/notifications/qa/events/ePerson-data/ePerson-data.component.spec.ts @@ -13,7 +13,7 @@ describe('EPersonDataComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [EPersonDataComponent], + imports: [EPersonDataComponent], providers: [{ provide: EPersonDataService, useValue: ePersonDataService diff --git a/src/app/notifications/suggestions-popup/suggestions-popup.component.spec.ts b/src/app/notifications/suggestions-popup/suggestions-popup.component.spec.ts index 25aa568d84..fac9473de8 100644 --- a/src/app/notifications/suggestions-popup/suggestions-popup.component.spec.ts +++ b/src/app/notifications/suggestions-popup/suggestions-popup.component.spec.ts @@ -27,8 +27,7 @@ describe('SuggestionsPopupComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [SuggestionsPopupComponent], + imports: [TranslateModule.forRoot(), SuggestionsPopupComponent], providers: [ { provide: SuggestionTargetsStateService, useValue: suggestionStateService }, { provide: SuggestionsService, useValue: suggestionService }, diff --git a/src/app/quality-assurance-notifications-pages/notifications-suggestion-targets-page/notifications-suggestion-targets-page.component.spec.ts b/src/app/quality-assurance-notifications-pages/notifications-suggestion-targets-page/notifications-suggestion-targets-page.component.spec.ts index 385d46f49f..fea495d361 100644 --- a/src/app/quality-assurance-notifications-pages/notifications-suggestion-targets-page/notifications-suggestion-targets-page.component.spec.ts +++ b/src/app/quality-assurance-notifications-pages/notifications-suggestion-targets-page/notifications-suggestion-targets-page.component.spec.ts @@ -16,9 +16,9 @@ describe('NotificationsSuggestionTargetsPageComponent', () => { TestBed.configureTestingModule({ imports: [ CommonModule, - TranslateModule.forRoot() + TranslateModule.forRoot(), + NotificationsSuggestionTargetsPageComponent ], - declarations: [NotificationsSuggestionTargetsPageComponent], providers: [ AdminNotificationsPublicationClaimPageComponent ],