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 cf16cc9317b3880b1ca28309bc7189e2e5d6d9b8..477d42a0a1430772decdf9c6e0ac0c8e1dfeffcc 100644 --- a/src/app/submission/sections/form/section-form.component.spec.ts +++ b/src/app/submission/sections/form/section-form.component.spec.ts @@ -12,7 +12,7 @@ import { SubmissionServiceStub } from '../../../shared/testing/submission-servic import { getMockTranslateService } from '../../../shared/mocks/mock-translate.service'; import { SectionsService } from '../sections.service'; import { SectionsServiceStub } from '../../../shared/testing/sections-service-stub'; -import { FormSectionComponent } from './section-form.component'; +import { SubmissionSectionformComponent } from './section-form.component'; import { FormBuilderService } from '../../../shared/form/builder/form-builder.service'; import { getMockFormBuilderService } from '../../../shared/mocks/mock-form-builder-service'; import { getMockFormOperationsService } from '../../../shared/mocks/mock-form-operations-service'; @@ -132,11 +132,11 @@ const dynamicFormControlEvent: DynamicFormControlEvent = { type: DynamicFormControlEventType.Change }; -describe('FormSectionComponent test suite', () => { +describe('SubmissionSectionformComponent test suite', () => { - let comp: FormSectionComponent; + let comp: SubmissionSectionformComponent; let compAsAny: any; - let fixture: ComponentFixture<FormSectionComponent>; + let fixture: ComponentFixture<SubmissionSectionformComponent>; let submissionServiceStub: SubmissionServiceStub; let sectionsServiceStub: SectionsServiceStub; let notificationsServiceStub: NotificationsServiceStub; @@ -163,7 +163,7 @@ describe('FormSectionComponent test suite', () => { ], declarations: [ FormComponent, - FormSectionComponent, + SubmissionSectionformComponent, TestComponent ], providers: [ @@ -180,7 +180,7 @@ describe('FormSectionComponent test suite', () => { { provide: 'sectionDataProvider', useValue: sectionObject }, { provide: 'submissionIdProvider', useValue: submissionId }, ChangeDetectorRef, - FormSectionComponent + SubmissionSectionformComponent ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents().then(); @@ -203,7 +203,7 @@ describe('FormSectionComponent test suite', () => { testFixture.destroy(); }); - it('should create FormSectionComponent', inject([FormSectionComponent], (app: FormSectionComponent) => { + it('should create SubmissionSectionformComponent', inject([SubmissionSectionformComponent], (app: SubmissionSectionformComponent) => { expect(app).toBeDefined(); @@ -212,7 +212,7 @@ describe('FormSectionComponent test suite', () => { describe('', () => { beforeEach(() => { - fixture = TestBed.createComponent(FormSectionComponent); + fixture = TestBed.createComponent(SubmissionSectionformComponent); comp = fixture.componentInstance; compAsAny = comp; submissionServiceStub = TestBed.get(SubmissionService); diff --git a/src/app/submission/sections/form/section-form.component.ts b/src/app/submission/sections/form/section-form.component.ts index 048f109f54ed789418acdb2de3e85cf9808c7f32..ef817a75680ca6c15ec3bb9aab3f6990f225ea6c 100644 --- a/src/app/submission/sections/form/section-form.component.ts +++ b/src/app/submission/sections/form/section-form.component.ts @@ -38,7 +38,7 @@ import { WorkspaceitemSectionFormObject } from '../../../core/submission/models/ templateUrl: './section-form.component.html', }) @renderSectionFor(SectionsType.SubmissionForm) -export class FormSectionComponent extends SectionModelComponent { +export class SubmissionSectionformComponent extends SectionModelComponent { /** * The form id diff --git a/src/app/submission/sections/license/section-license.component.spec.ts b/src/app/submission/sections/license/section-license.component.spec.ts index a84e8a891d29988dd9826cd02c47e16a9cc53ca1..6d8f82c0f8cae7b0043fe6d484941ec18cc95ce7 100644 --- a/src/app/submission/sections/license/section-license.component.spec.ts +++ b/src/app/submission/sections/license/section-license.component.spec.ts @@ -29,7 +29,7 @@ import { } from '../../../shared/mocks/mock-submission'; import { FormComponent } from '../../../shared/form/form.component'; import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder/json-patch-operation-path-combiner'; -import { LicenseSectionComponent } from './section-license.component'; +import { SubmissionSectionLicenseComponent } from './section-license.component'; import { CollectionDataService } from '../../../core/data/collection-data.service'; import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder'; import { SectionFormOperationsService } from '../form/section-form-operations.service'; @@ -78,11 +78,11 @@ const dynamicFormControlEvent: DynamicFormControlEvent = { type: DynamicFormControlEventType.Change }; -describe('LicenseSectionComponent test suite', () => { +describe('SubmissionSectionLicenseComponent test suite', () => { - let comp: LicenseSectionComponent; + let comp: SubmissionSectionLicenseComponent; let compAsAny: any; - let fixture: ComponentFixture<LicenseSectionComponent>; + let fixture: ComponentFixture<SubmissionSectionLicenseComponent>; let submissionServiceStub: SubmissionServiceStub; let sectionsServiceStub: SectionsServiceStub; let formService: any; @@ -124,7 +124,7 @@ describe('LicenseSectionComponent test suite', () => { ], declarations: [ FormComponent, - LicenseSectionComponent, + SubmissionSectionLicenseComponent, TestComponent ], providers: [ @@ -141,7 +141,7 @@ describe('LicenseSectionComponent test suite', () => { { provide: 'submissionIdProvider', useValue: submissionId }, ChangeDetectorRef, FormBuilderService, - LicenseSectionComponent + SubmissionSectionLicenseComponent ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents().then(); @@ -164,7 +164,7 @@ describe('LicenseSectionComponent test suite', () => { testFixture.destroy(); }); - it('should create LicenseSectionComponent', inject([LicenseSectionComponent], (app: LicenseSectionComponent) => { + it('should create SubmissionSectionLicenseComponent', inject([SubmissionSectionLicenseComponent], (app: SubmissionSectionLicenseComponent) => { expect(app).toBeDefined(); @@ -173,7 +173,7 @@ describe('LicenseSectionComponent test suite', () => { describe('', () => { beforeEach(() => { - fixture = TestBed.createComponent(LicenseSectionComponent); + fixture = TestBed.createComponent(SubmissionSectionLicenseComponent); comp = fixture.componentInstance; compAsAny = comp; submissionServiceStub = TestBed.get(SubmissionService); diff --git a/src/app/submission/sections/license/section-license.component.ts b/src/app/submission/sections/license/section-license.component.ts index f4dae0565b2c8e30af2147f735b55b3db779cef7..940460c83d4fe1dd517152fa89e601e08650234c 100644 --- a/src/app/submission/sections/license/section-license.component.ts +++ b/src/app/submission/sections/license/section-license.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectorRef, Component, Inject, ViewChild } from '@angular/core'; import { Observable, Subscription } from 'rxjs'; -import { distinctUntilChanged, filter, find, flatMap, map, startWith, take, tap } from 'rxjs/operators'; +import { distinctUntilChanged, filter, find, flatMap, map, startWith, take } from 'rxjs/operators'; import { DynamicCheckboxModel, DynamicFormControlEvent, @@ -38,7 +38,7 @@ import { FormComponent } from '../../../shared/form/form.component'; templateUrl: './section-license.component.html', }) @renderSectionFor(SectionsType.License) -export class LicenseSectionComponent extends SectionModelComponent { +export class SubmissionSectionLicenseComponent extends SectionModelComponent { /** * The form id diff --git a/src/app/submission/sections/upload/accessConditions/section-upload-access-conditions.component.html b/src/app/submission/sections/upload/accessConditions/submission-section-upload-access-conditions.component.html similarity index 100% rename from src/app/submission/sections/upload/accessConditions/section-upload-access-conditions.component.html rename to src/app/submission/sections/upload/accessConditions/submission-section-upload-access-conditions.component.html diff --git a/src/app/submission/sections/upload/accessConditions/section-upload-access-conditions.component.ts b/src/app/submission/sections/upload/accessConditions/submission-section-upload-access-conditions.component.ts similarity index 88% rename from src/app/submission/sections/upload/accessConditions/section-upload-access-conditions.component.ts rename to src/app/submission/sections/upload/accessConditions/submission-section-upload-access-conditions.component.ts index f13f730452289056215951e69c9251d457901482..43b0a7da3f8d075a276b1375d30b0ec6b1ad8e58 100644 --- a/src/app/submission/sections/upload/accessConditions/section-upload-access-conditions.component.ts +++ b/src/app/submission/sections/upload/accessConditions/submission-section-upload-access-conditions.component.ts @@ -12,10 +12,10 @@ import { RemoteData } from '../../../../core/data/remote-data'; * This component represents a badge that describe an access condition */ @Component({ - selector: 'ds-section-upload-access-conditions', - templateUrl: './section-upload-access-conditions.component.html', + selector: 'ds-submission-section-upload-access-conditions', + templateUrl: './submission-section-upload-access-conditions.component.html', }) -export class SectionUploadAccessConditionsComponent implements OnInit { +export class SubmissionSectionUploadAccessConditionsComponent implements OnInit { /** * The list of resource policy diff --git a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.spec.ts b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.spec.ts index acc4e5edcd5cf2885387655ba608bd7b70a6a959..4774b22924577ce1f5e5815f9532e27efb04e659 100644 --- a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.spec.ts +++ b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.spec.ts @@ -15,7 +15,7 @@ import { createTestComponent } from '../../../../../shared/testing/utils'; import { FormBuilderService } from '../../../../../shared/form/builder/form-builder.service'; import { SubmissionServiceStub } from '../../../../../shared/testing/submission-service-stub'; import { SubmissionService } from '../../../../submission.service'; -import { UploadSectionFileEditComponent } from './section-upload-file-edit.component'; +import { SubmissionSectionUploadFileEditComponent } from './section-upload-file-edit.component'; import { POLICY_DEFAULT_WITH_LIST } from '../../section-upload.component'; import { mockGroup, @@ -32,11 +32,11 @@ import { MOCK_SUBMISSION_CONFIG } from '../../../../../shared/testing/mock-submi import { getMockFormService } from '../../../../../shared/mocks/mock-form-service'; import { Group } from '../../../../../core/eperson/models/group.model'; -describe('UploadSectionFileEditComponent test suite', () => { +describe('SubmissionSectionUploadFileEditComponent test suite', () => { - let comp: UploadSectionFileEditComponent; + let comp: SubmissionSectionUploadFileEditComponent; let compAsAny: any; - let fixture: ComponentFixture<UploadSectionFileEditComponent>; + let fixture: ComponentFixture<SubmissionSectionUploadFileEditComponent>; let submissionServiceStub: SubmissionServiceStub; let formbuilderService: any; @@ -66,7 +66,7 @@ describe('UploadSectionFileEditComponent test suite', () => { ], declarations: [ FormComponent, - UploadSectionFileEditComponent, + SubmissionSectionUploadFileEditComponent, TestComponent ], providers: [ @@ -75,7 +75,7 @@ describe('UploadSectionFileEditComponent test suite', () => { { provide: SubmissionService, useClass: SubmissionServiceStub }, FormBuilderService, ChangeDetectorRef, - UploadSectionFileEditComponent + SubmissionSectionUploadFileEditComponent ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents().then(); @@ -88,7 +88,7 @@ describe('UploadSectionFileEditComponent test suite', () => { // synchronous beforeEach beforeEach(() => { const html = ` - <ds-submission-upload-section-file-edit [availableAccessConditionGroups]="availableAccessConditionGroups" + <ds-submission-section-upload-file-edit [availableAccessConditionGroups]="availableAccessConditionGroups" [availableAccessConditionOptions]="availableAccessConditionOptions" [collectionId]="collectionId" [collectionPolicyType]="collectionPolicyType" @@ -97,7 +97,7 @@ describe('UploadSectionFileEditComponent test suite', () => { [fileId]="fileId" [fileIndex]="fileIndex" [formId]="formId" - [sectionId]="sectionId"></ds-submission-upload-section-file-edit>`; + [sectionId]="sectionId"></ds-submission-section-upload-file-edit>`; testFixture = createTestComponent(html, TestComponent) as ComponentFixture<TestComponent>; testComp = testFixture.componentInstance; @@ -107,7 +107,7 @@ describe('UploadSectionFileEditComponent test suite', () => { testFixture.destroy(); }); - it('should create UploadSectionFileEditComponent', inject([UploadSectionFileEditComponent], (app: UploadSectionFileEditComponent) => { + it('should create SubmissionSectionUploadFileEditComponent', inject([SubmissionSectionUploadFileEditComponent], (app: SubmissionSectionUploadFileEditComponent) => { expect(app).toBeDefined(); @@ -116,7 +116,7 @@ describe('UploadSectionFileEditComponent test suite', () => { describe('', () => { beforeEach(() => { - fixture = TestBed.createComponent(UploadSectionFileEditComponent); + fixture = TestBed.createComponent(SubmissionSectionUploadFileEditComponent); comp = fixture.componentInstance; compAsAny = comp; submissionServiceStub = TestBed.get(SubmissionService); diff --git a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts index 9f1b49c2218c94dd4b102c8ecfee707dcc2d431d..b2575d1d5830a9898f2f8ca8599061d8da6b5b89 100644 --- a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts +++ b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts @@ -43,10 +43,10 @@ import { Group } from '../../../../../core/eperson/models/group.model'; * This component represents the edit form for bitstream */ @Component({ - selector: 'ds-submission-upload-section-file-edit', + selector: 'ds-submission-section-upload-file-edit', templateUrl: './section-upload-file-edit.component.html', }) -export class UploadSectionFileEditComponent implements OnChanges { +export class SubmissionSectionUploadFileEditComponent implements OnChanges { /** * The list of available access condition @@ -272,8 +272,8 @@ export class UploadSectionFileEditComponent implements OnChanges { /** * Dispatch form model update when changing an access condition * - * @param formModel - * The form model + * @param event + * The event emitted */ public onChange(event: DynamicFormControlEvent) { if (event.model.id === 'name') { diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.html b/src/app/submission/sections/upload/file/section-upload-file.component.html index 2e12cc4f5e4b8394a130513d24e475a483e6b64d..ea23340e9ac948a797af69b478645700699cf499 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.html +++ b/src/app/submission/sections/upload/file/section-upload-file.component.html @@ -34,9 +34,9 @@ </ng-container> </div> <div class="clearfix"></div> - <ds-submission-upload-section-file-view *ngIf="readMode" - [fileData]="fileData"></ds-submission-upload-section-file-view> - <ds-submission-upload-section-file-edit *ngIf="!readMode" + <ds-submission-section-upload-file-view *ngIf="readMode" + [fileData]="fileData"></ds-submission-section-upload-file-view> + <ds-submission-section-upload-file-edit *ngIf="!readMode" [availableAccessConditionGroups]="availableAccessConditionGroups" [availableAccessConditionOptions]="availableAccessConditionOptions" [collectionId]="collectionId" @@ -46,7 +46,7 @@ [fileId]="fileId" [fileIndex]="fileIndex" [formId]="formId" - [sectionId]="sectionId"></ds-submission-upload-section-file-edit> + [sectionId]="sectionId"></ds-submission-section-upload-file-edit> </div> </div> </ng-container> diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts b/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts index ff2b3071f3c6dc49405990653ad494580144ae43..f87aa7d7030eb1b35db29415cde11156551b3302 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts +++ b/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts @@ -15,7 +15,7 @@ import { NgbModal, NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { JsonPatchOperationsBuilder } from '../../../../core/json-patch/builder/json-patch-operations-builder'; import { SubmissionJsonPatchOperationsServiceStub } from '../../../../shared/testing/submission-json-patch-operations-service-stub'; import { SubmissionJsonPatchOperationsService } from '../../../../core/submission/submission-json-patch-operations.service'; -import { UploadSectionFileComponent } from './section-upload-file.component'; +import { SubmissionSectionUploadFileComponent } from './section-upload-file.component'; import { SubmissionServiceStub } from '../../../../shared/testing/submission-service-stub'; import { mockFileFormData, @@ -36,7 +36,7 @@ import { JsonPatchOperationPathCombiner } from '../../../../core/json-patch/buil import { getMockSectionUploadService } from '../../../../shared/mocks/mock-section-upload.service'; import { FormFieldMetadataValueObject } from '../../../../shared/form/builder/models/form-field-metadata-value.model'; import { Group } from '../../../../core/eperson/models/group.model'; -import { UploadSectionFileEditComponent } from './edit/section-upload-file-edit.component'; +import { SubmissionSectionUploadFileEditComponent } from './edit/section-upload-file-edit.component'; function getMockFileService(): FileService { return jasmine.createSpyObj('FileService', { @@ -45,11 +45,11 @@ function getMockFileService(): FileService { }); } -describe('UploadSectionFileComponent test suite', () => { +describe('SubmissionSectionUploadFileComponent test suite', () => { - let comp: UploadSectionFileComponent; + let comp: SubmissionSectionUploadFileComponent; let compAsAny: any; - let fixture: ComponentFixture<UploadSectionFileComponent>; + let fixture: ComponentFixture<SubmissionSectionUploadFileComponent>; let submissionServiceStub: SubmissionServiceStub; let uploadService: any; let fileService: any; @@ -90,7 +90,7 @@ describe('UploadSectionFileComponent test suite', () => { ], declarations: [ FileSizePipe, - UploadSectionFileComponent, + SubmissionSectionUploadFileComponent, TestComponent ], providers: [ @@ -103,8 +103,8 @@ describe('UploadSectionFileComponent test suite', () => { { provide: SectionUploadService, useValue: getMockSectionUploadService() }, ChangeDetectorRef, NgbModal, - UploadSectionFileComponent, - UploadSectionFileEditComponent + SubmissionSectionUploadFileComponent, + SubmissionSectionUploadFileEditComponent ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents().then(); @@ -136,7 +136,7 @@ describe('UploadSectionFileComponent test suite', () => { testFixture.destroy(); }); - it('should create UploadSectionFileComponent', inject([UploadSectionFileComponent], (app: UploadSectionFileComponent) => { + it('should create SubmissionSectionUploadFileComponent', inject([SubmissionSectionUploadFileComponent], (app: SubmissionSectionUploadFileComponent) => { expect(app).toBeDefined(); @@ -145,7 +145,7 @@ describe('UploadSectionFileComponent test suite', () => { describe('', () => { beforeEach(() => { - fixture = TestBed.createComponent(UploadSectionFileComponent); + fixture = TestBed.createComponent(SubmissionSectionUploadFileComponent); comp = fixture.componentInstance; compAsAny = comp; submissionServiceStub = TestBed.get(SubmissionService); @@ -235,7 +235,7 @@ describe('UploadSectionFileComponent test suite', () => { })); it('should save Bitstream File data properly when form is valid', fakeAsync(() => { - compAsAny.fileEditComp = TestBed.get(UploadSectionFileEditComponent); + compAsAny.fileEditComp = TestBed.get(SubmissionSectionUploadFileEditComponent); compAsAny.fileEditComp.formRef = {formGroup: null}; compAsAny.pathCombiner = pathCombiner; const event = new Event('click', null); @@ -290,7 +290,7 @@ describe('UploadSectionFileComponent test suite', () => { })); it('should not save Bitstream File data properly when form is not valid', fakeAsync(() => { - compAsAny.fileEditComp = TestBed.get(UploadSectionFileEditComponent); + compAsAny.fileEditComp = TestBed.get(SubmissionSectionUploadFileEditComponent); compAsAny.fileEditComp.formRef = {formGroup: null}; compAsAny.pathCombiner = pathCombiner; const event = new Event('click', null); diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.ts b/src/app/submission/sections/upload/file/section-upload-file.component.ts index 4d8f8119d78ac3d71110e4fa1848cfcaff9b488e..9923c358e7f31d7c1bfc6f1b99f8626be5349ff1 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.ts +++ b/src/app/submission/sections/upload/file/section-upload-file.component.ts @@ -20,7 +20,7 @@ import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service import { SubmissionJsonPatchOperationsService } from '../../../../core/submission/submission-json-patch-operations.service'; import { SubmissionObject } from '../../../../core/submission/models/submission-object.model'; import { WorkspaceitemSectionUploadObject } from '../../../../core/submission/models/workspaceitem-section-upload.model'; -import { UploadSectionFileEditComponent } from './edit/section-upload-file-edit.component'; +import { SubmissionSectionUploadFileEditComponent } from './edit/section-upload-file-edit.component'; import { Group } from '../../../../core/eperson/models/group.model'; /** @@ -31,7 +31,7 @@ import { Group } from '../../../../core/eperson/models/group.model'; styleUrls: ['./section-upload-file.component.scss'], templateUrl: './section-upload-file.component.html', }) -export class UploadSectionFileComponent implements OnChanges, OnInit { +export class SubmissionSectionUploadFileComponent implements OnChanges, OnInit { /** * The list of available access condition @@ -138,10 +138,10 @@ export class UploadSectionFileComponent implements OnChanges, OnInit { protected subscriptions: Subscription[] = []; /** - * The [[UploadSectionFileEditComponent]] reference - * @type {UploadSectionFileEditComponent} + * The [[SubmissionSectionUploadFileEditComponent]] reference + * @type {SubmissionSectionUploadFileEditComponent} */ - @ViewChild(UploadSectionFileEditComponent) fileEditComp: UploadSectionFileEditComponent; + @ViewChild(SubmissionSectionUploadFileEditComponent) fileEditComp: SubmissionSectionUploadFileEditComponent; /** * Initialize instance variables diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html index 7f5250778c74327d14002fc2a065f3e551e08c50..65b4b6379b1234a577e0f2dd1a5569f07af2241d 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html @@ -25,5 +25,5 @@ </ng-container> <span class="clearfix"></span> - <ds-section-upload-access-conditions [accessConditions]="fileData.accessConditions"></ds-section-upload-access-conditions> + <ds-submission-section-upload-access-conditions [accessConditions]="fileData.accessConditions"></ds-submission-section-upload-access-conditions> </div> diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.spec.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.spec.ts index af2bb587ac763e3eeed57fac01d0b480bff73eb5..87b025e6a982ff640e5ef2fcf18354fa6b819672 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.spec.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.spec.ts @@ -6,15 +6,15 @@ import { TranslateModule } from '@ngx-translate/core'; import { createTestComponent } from '../../../../../shared/testing/utils'; import { mockUploadFiles } from '../../../../../shared/mocks/mock-submission'; import { FormComponent } from '../../../../../shared/form/form.component'; -import { UploadSectionFileViewComponent } from './section-upload-file-view.component'; +import { SubmissionSectionUploadFileViewComponent } from './section-upload-file-view.component'; import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe'; import { Metadata } from '../../../../../core/shared/metadata.utils'; -describe('UploadSectionFileViewComponent test suite', () => { +describe('SubmissionSectionUploadFileViewComponent test suite', () => { - let comp: UploadSectionFileViewComponent; + let comp: SubmissionSectionUploadFileViewComponent; let compAsAny: any; - let fixture: ComponentFixture<UploadSectionFileViewComponent>; + let fixture: ComponentFixture<SubmissionSectionUploadFileViewComponent>; const fileData: any = mockUploadFiles[0]; @@ -26,11 +26,11 @@ describe('UploadSectionFileViewComponent test suite', () => { declarations: [ TruncatePipe, FormComponent, - UploadSectionFileViewComponent, + SubmissionSectionUploadFileViewComponent, TestComponent ], providers: [ - UploadSectionFileViewComponent + SubmissionSectionUploadFileViewComponent ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents().then(); @@ -43,7 +43,7 @@ describe('UploadSectionFileViewComponent test suite', () => { // synchronous beforeEach beforeEach(() => { const html = ` - <ds-submission-upload-section-file-view [fileData]="fileData"></ds-submission-upload-section-file-view>`; + <ds-submission-section-upload-file-view [fileData]="fileData"></ds-submission-section-upload-file-view>`; testFixture = createTestComponent(html, TestComponent) as ComponentFixture<TestComponent>; testComp = testFixture.componentInstance; @@ -53,7 +53,7 @@ describe('UploadSectionFileViewComponent test suite', () => { testFixture.destroy(); }); - it('should create UploadSectionFileViewComponent', inject([UploadSectionFileViewComponent], (app: UploadSectionFileViewComponent) => { + it('should create SubmissionSectionUploadFileViewComponent', inject([SubmissionSectionUploadFileViewComponent], (app: SubmissionSectionUploadFileViewComponent) => { expect(app).toBeDefined(); @@ -62,7 +62,7 @@ describe('UploadSectionFileViewComponent test suite', () => { describe('', () => { beforeEach(() => { - fixture = TestBed.createComponent(UploadSectionFileViewComponent); + fixture = TestBed.createComponent(SubmissionSectionUploadFileViewComponent); comp = fixture.componentInstance; compAsAny = comp; }); diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index cafd3c7947313a953bf6d86c078107f0e0d4fb49..bb2fea20f83d5930f3341adf4709f0f4880e08ea 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -9,10 +9,10 @@ import { MetadataMap, MetadataValue } from '../../../../../core/shared/metadata. * This component allow to show bitstream's metadata */ @Component({ - selector: 'ds-submission-upload-section-file-view', + selector: 'ds-submission-section-upload-file-view', templateUrl: './section-upload-file-view.component.html', }) -export class UploadSectionFileViewComponent implements OnInit { +export class SubmissionSectionUploadFileViewComponent implements OnInit { /** * The bitstream's metadata data diff --git a/src/app/submission/sections/upload/section-upload.component.html b/src/app/submission/sections/upload/section-upload.component.html index afe8f3314ad1d81d1e37bd8507280994bce9f2b2..d63bc1b7d6007f23398f577d8a53efccb8032a67 100644 --- a/src/app/submission/sections/upload/section-upload.component.html +++ b/src/app/submission/sections/upload/section-upload.component.html @@ -22,7 +22,7 @@ {{ 'submission.sections.upload.header.policy.default.withlist' | translate:{ "collectionName": collectionName } }} </ng-container> <span class="clearfix"></span> - <ds-section-upload-access-conditions [accessConditions]="collectionDefaultAccessConditions"></ds-section-upload-access-conditions> + <ds-submission-section-upload-access-conditions [accessConditions]="collectionDefaultAccessConditions"></ds-submission-section-upload-access-conditions> </ds-alert> </div> </div> diff --git a/src/app/submission/sections/upload/section-upload.component.spec.ts b/src/app/submission/sections/upload/section-upload.component.spec.ts index 345b78d3581cd3dab1a3146c86afbef267e26fbd..be8f0969643d1241756a8762bb9526d9935adc87 100644 --- a/src/app/submission/sections/upload/section-upload.component.spec.ts +++ b/src/app/submission/sections/upload/section-upload.component.spec.ts @@ -24,7 +24,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { CommonModule } from '@angular/common'; import { SubmissionUploadsConfigService } from '../../../core/config/submission-uploads-config.service'; import { SectionUploadService } from './section-upload.service'; -import { UploadSectionComponent } from './section-upload.component'; +import { SubmissionSectionUploadComponent } from './section-upload.component'; import { CollectionDataService } from '../../../core/data/collection-data.service'; import { GroupEpersonService } from '../../../core/eperson/group-eperson.service'; import { cold, hot } from 'jasmine-marbles'; @@ -71,11 +71,11 @@ const sectionObject: SectionDataObject = { sectionType: SectionsType.Upload }; -describe('UploadSectionComponent test suite', () => { +describe('SubmissionSectionUploadComponent test suite', () => { - let comp: UploadSectionComponent; + let comp: SubmissionSectionUploadComponent; let compAsAny: any; - let fixture: ComponentFixture<UploadSectionComponent>; + let fixture: ComponentFixture<SubmissionSectionUploadComponent>; let submissionServiceStub: SubmissionServiceStub; let sectionsServiceStub: SectionsServiceStub; let collectionDataService: any; @@ -114,7 +114,7 @@ describe('UploadSectionComponent test suite', () => { TranslateModule.forRoot() ], declarations: [ - UploadSectionComponent, + SubmissionSectionUploadComponent, TestComponent ], providers: [ @@ -127,7 +127,7 @@ describe('UploadSectionComponent test suite', () => { { provide: 'sectionDataProvider', useValue: sectionObject }, { provide: 'submissionIdProvider', useValue: submissionId }, ChangeDetectorRef, - UploadSectionComponent + SubmissionSectionUploadComponent ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents().then(); @@ -150,7 +150,7 @@ describe('UploadSectionComponent test suite', () => { testFixture.destroy(); }); - it('should create UploadSectionComponent', inject([UploadSectionComponent], (app: UploadSectionComponent) => { + it('should create SubmissionSectionUploadComponent', inject([SubmissionSectionUploadComponent], (app: SubmissionSectionUploadComponent) => { expect(app).toBeDefined(); @@ -159,7 +159,7 @@ describe('UploadSectionComponent test suite', () => { describe('', () => { beforeEach(() => { - fixture = TestBed.createComponent(UploadSectionComponent); + fixture = TestBed.createComponent(SubmissionSectionUploadComponent); comp = fixture.componentInstance; compAsAny = comp; submissionServiceStub = TestBed.get(SubmissionService); diff --git a/src/app/submission/sections/upload/section-upload.component.ts b/src/app/submission/sections/upload/section-upload.component.ts index 3145cb8301d51c218c9245fd979857d319864a51..61a44fe46a07d3dddd8856ca4741dacfb254a885 100644 --- a/src/app/submission/sections/upload/section-upload.component.ts +++ b/src/app/submission/sections/upload/section-upload.component.ts @@ -42,7 +42,7 @@ export interface AccessConditionGroupsMapEntry { templateUrl: './section-upload.component.html', }) @renderSectionFor(SectionsType.Upload) -export class UploadSectionComponent extends SectionModelComponent { +export class SubmissionSectionUploadComponent extends SectionModelComponent { /** * The AlertType enumeration diff --git a/src/app/submission/submission.module.ts b/src/app/submission/submission.module.ts index 1b29f43a5165454b20fa44ab32c05ecca7c9e2e9..f3893344fe4cfbc521ed89ff2d421c23b56e4f7d 100644 --- a/src/app/submission/submission.module.ts +++ b/src/app/submission/submission.module.ts @@ -3,7 +3,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { CoreModule } from '../core/core.module'; import { SharedModule } from '../shared/shared.module'; -import { FormSectionComponent } from './sections/form/section-form.component'; +import { SubmissionSectionformComponent } from './sections/form/section-form.component'; import { SectionsDirective } from './sections/sections.directive'; import { SectionsService } from './sections/sections.service'; import { SubmissionFormCollectionComponent } from './form/collection/submission-form-collection.component'; @@ -16,16 +16,16 @@ import { StoreModule } from '@ngrx/store'; import { EffectsModule } from '@ngrx/effects'; import { submissionReducers } from './submission.reducers'; import { submissionEffects } from './submission.effects'; -import { UploadSectionComponent } from './sections/upload/section-upload.component'; +import { SubmissionSectionUploadComponent } from './sections/upload/section-upload.component'; import { SectionUploadService } from './sections/upload/section-upload.service'; import { SubmissionUploadFilesComponent } from './form/submission-upload-files/submission-upload-files.component'; -import { LicenseSectionComponent } from './sections/license/section-license.component'; +import { SubmissionSectionLicenseComponent } from './sections/license/section-license.component'; import { SubmissionUploadsConfigService } from '../core/config/submission-uploads-config.service'; import { SubmissionEditComponent } from './edit/submission-edit.component'; -import { UploadSectionFileComponent } from './sections/upload/file/section-upload-file.component'; -import { UploadSectionFileEditComponent } from './sections/upload/file/edit/section-upload-file-edit.component'; -import { UploadSectionFileViewComponent } from './sections/upload/file/view/section-upload-file-view.component'; -import { SectionUploadAccessConditionsComponent } from './sections/upload/accessConditions/section-upload-access-conditions.component'; +import { SubmissionSectionUploadFileComponent } from './sections/upload/file/section-upload-file.component'; +import { SubmissionSectionUploadFileEditComponent } from './sections/upload/file/edit/section-upload-file-edit.component'; +import { SubmissionSectionUploadFileViewComponent } from './sections/upload/file/view/section-upload-file-view.component'; +import { SubmissionSectionUploadAccessConditionsComponent } from './sections/upload/accessConditions/submission-section-upload-access-conditions.component'; import { SubmissionSubmitComponent } from './submit/submission-submit.component'; @NgModule({ @@ -38,10 +38,10 @@ import { SubmissionSubmitComponent } from './submit/submission-submit.component' TranslateModule ], declarations: [ - SectionUploadAccessConditionsComponent, - UploadSectionComponent, - FormSectionComponent, - LicenseSectionComponent, + SubmissionSectionUploadAccessConditionsComponent, + SubmissionSectionUploadComponent, + SubmissionSectionformComponent, + SubmissionSectionLicenseComponent, SectionsDirective, SectionContainerComponent, SubmissionEditComponent, @@ -51,14 +51,14 @@ import { SubmissionSubmitComponent } from './submit/submission-submit.component' SubmissionFormFooterComponent, SubmissionSubmitComponent, SubmissionUploadFilesComponent, - UploadSectionFileComponent, - UploadSectionFileEditComponent, - UploadSectionFileViewComponent + SubmissionSectionUploadFileComponent, + SubmissionSectionUploadFileEditComponent, + SubmissionSectionUploadFileViewComponent ], entryComponents: [ - UploadSectionComponent, - FormSectionComponent, - LicenseSectionComponent, + SubmissionSectionUploadComponent, + SubmissionSectionformComponent, + SubmissionSectionLicenseComponent, SectionContainerComponent], exports: [ SubmissionEditComponent,