From a573c507b4a77094ee3cbd1bb90586eba6489f69 Mon Sep 17 00:00:00 2001 From: lotte Date: Thu, 11 Jul 2019 13:35:08 +0200 Subject: [PATCH] resolved prod build issues --- .../browse-by-metadata-page.component.spec.ts | 7 ++++--- src/app/shared/alert/alert.component.spec.ts | 2 +- .../dynamic-relation-group.component.spec.ts | 3 ++- src/app/shared/form/builder/form-builder.service.spec.ts | 2 +- src/app/shared/form/builder/parsers/row-parser.spec.ts | 2 +- .../shared/notifications/notifications.reducers.spec.ts | 2 +- .../sections/form/section-form.component.spec.ts | 2 +- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.spec.ts b/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.spec.ts index 4252503cc3..927effd303 100644 --- a/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.spec.ts +++ b/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.spec.ts @@ -22,6 +22,7 @@ import { Community } from '../../core/shared/community.model'; import { MockRouter } from '../../shared/mocks/mock-router'; import { ResourceType } from '../../core/shared/resource-type'; import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; +import { BrowseEntry } from '../../core/shared/browse-entry.model'; describe('BrowseByMetadataPageComponent', () => { let comp: BrowseByMetadataPageComponent; @@ -41,21 +42,21 @@ describe('BrowseByMetadataPageComponent', () => { const mockEntries = [ { - type: ResourceType.BrowseEntry, + type: BrowseEntry.type, authority: null, value: 'John Doe', language: 'en', count: 1 }, { - type: ResourceType.BrowseEntry, + type: BrowseEntry.type, authority: null, value: 'James Doe', language: 'en', count: 3 }, { - type: ResourceType.BrowseEntry, + type: BrowseEntry.type, authority: null, value: 'Fake subject', language: 'en', diff --git a/src/app/shared/alert/alert.component.spec.ts b/src/app/shared/alert/alert.component.spec.ts index 33f48c08ee..e235e27b28 100644 --- a/src/app/shared/alert/alert.component.spec.ts +++ b/src/app/shared/alert/alert.component.spec.ts @@ -66,7 +66,7 @@ describe('AlertComponent test suite', () => { compAsAny = comp; comp.content = 'test alert'; comp.dismissible = true; - comp.value = AlertType.Info; + comp.type = AlertType.Info; fixture.detectChanges(); }); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts index 200cc08aae..6d5839f867 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts @@ -8,7 +8,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DsDynamicRelationGroupComponent } from './dynamic-relation-group.components'; import { DynamicRelationGroupModel, DynamicRelationGroupModelConfig } from './dynamic-relation-group.model'; -import { FormRowModel, SubmissionFormsModel } from '../../../../../../core/config/models/config-submission-forms.model'; +import { SubmissionFormsModel } from '../../../../../../core/config/models/config-submission-forms.model'; import { FormFieldModel } from '../../../models/form-field.model'; import { FormBuilderService } from '../../../form-builder.service'; import { FormService } from '../../../../form.service'; @@ -25,6 +25,7 @@ import { AuthorityServiceStub } from '../../../../../testing/authority-service-s import { MOCK_SUBMISSION_CONFIG } from '../../../../../testing/mock-submission-config'; import { Store, StoreModule } from '@ngrx/store'; import { MockStore } from '../../../../../testing/mock-store'; +import { FormRowModel } from '../../../../../../core/config/models/config-submission-form.model'; export let FORM_GROUP_TEST_MODEL_CONFIG; diff --git a/src/app/shared/form/builder/form-builder.service.spec.ts b/src/app/shared/form/builder/form-builder.service.spec.ts index b092b87a5a..58a1696a92 100644 --- a/src/app/shared/form/builder/form-builder.service.spec.ts +++ b/src/app/shared/form/builder/form-builder.service.spec.ts @@ -39,7 +39,6 @@ import { DynamicListRadioGroupModel } from './ds-dynamic-form-ui/models/list/dyn import { AuthorityOptions } from '../../../core/integration/models/authority-options.model'; import { FormFieldModel } from './models/form-field.model'; import { - FormRowModel, SubmissionFormsModel } from '../../../core/config/models/config-submission-forms.model'; import { FormBuilderService } from './form-builder.service'; @@ -49,6 +48,7 @@ import { FormFieldMetadataValueObject } from './models/form-field-metadata-value import { DynamicConcatModel } from './ds-dynamic-form-ui/models/ds-dynamic-concat.model'; import { DynamicLookupNameModel } from './ds-dynamic-form-ui/models/lookup/dynamic-lookup-name.model'; import { DynamicRowArrayModel } from './ds-dynamic-form-ui/models/ds-dynamic-row-array-model'; +import { FormRowModel } from '../../../core/config/models/config-submission-form.model'; describe('FormBuilderService test suite', () => { diff --git a/src/app/shared/form/builder/parsers/row-parser.spec.ts b/src/app/shared/form/builder/parsers/row-parser.spec.ts index 3f10b71279..58b1d1de99 100644 --- a/src/app/shared/form/builder/parsers/row-parser.spec.ts +++ b/src/app/shared/form/builder/parsers/row-parser.spec.ts @@ -1,8 +1,8 @@ import { FormFieldModel } from '../models/form-field.model'; -import { FormRowModel } from '../../../../core/config/models/config-submission-forms.model'; import { RowParser } from './row-parser'; import { DynamicRowGroupModel } from '../ds-dynamic-form-ui/models/ds-dynamic-row-group-model'; import { DynamicRowArrayModel } from '../ds-dynamic-form-ui/models/ds-dynamic-row-array-model'; +import { FormRowModel } from '../../../../core/config/models/config-submission-form.model'; describe('RowParser test suite', () => { diff --git a/src/app/shared/notifications/notifications.reducers.spec.ts b/src/app/shared/notifications/notifications.reducers.spec.ts index 96d97f3dd3..b54072925a 100644 --- a/src/app/shared/notifications/notifications.reducers.spec.ts +++ b/src/app/shared/notifications/notifications.reducers.spec.ts @@ -123,7 +123,7 @@ describe('Notifications reducer', () => { cdr.detectChanges(); const action = new NewNotificationAction(notification); - action.value = 'NothingToDo, return only the state'; + action.type = 'NothingToDo, return only the state'; const lastState = notificationsReducer(stateBis, action); expect(lastState.length).toEqual(1); diff --git a/src/app/submission/sections/form/section-form.component.spec.ts b/src/app/submission/sections/form/section-form.component.spec.ts index 477d42a0a1..eb56a92113 100644 --- a/src/app/submission/sections/form/section-form.component.spec.ts +++ b/src/app/submission/sections/form/section-form.component.spec.ts @@ -34,7 +34,6 @@ import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormComponent } from '../../../shared/form/form.component'; import { FormFieldModel } from '../../../shared/form/builder/models/form-field.model'; -import { FormRowModel } from '../../../core/config/models/config-submission-forms.model'; import { ConfigData } from '../../../core/config/config-data'; import { PageInfo } from '../../../core/shared/page-info.model'; import { FormFieldMetadataValueObject } from '../../../shared/form/builder/models/form-field-metadata-value.model'; @@ -43,6 +42,7 @@ import { DsDynamicInputModel } from '../../../shared/form/builder/ds-dynamic-for import { SubmissionSectionError } from '../../objects/submission-objects.reducer'; import { DynamicFormControlEvent, DynamicFormControlEventType } from '@ng-dynamic-forms/core'; import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder/json-patch-operation-path-combiner'; +import { FormRowModel } from '../../../core/config/models/config-submission-form.model'; function getMockSubmissionFormsConfigService(): SubmissionFormsConfigService { return jasmine.createSpyObj('FormOperationsService', {