mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 19:43:04 +00:00
Fixed test
This commit is contained in:
@@ -266,6 +266,7 @@ describe('FormSectionComponent test suite', () => {
|
|||||||
|
|
||||||
it('should set a section Error when init form model fails', () => {
|
it('should set a section Error when init form model fails', () => {
|
||||||
formBuilderService.modelFromConfiguration.and.throwError('test');
|
formBuilderService.modelFromConfiguration.and.throwError('test');
|
||||||
|
translateService.instant.and.returnValue('test');
|
||||||
const sectionData = {};
|
const sectionData = {};
|
||||||
const sectionError: SubmissionSectionError = {
|
const sectionError: SubmissionSectionError = {
|
||||||
message: 'test' + 'Error: test',
|
message: 'test' + 'Error: test',
|
||||||
|
@@ -201,9 +201,9 @@ export class FormSectionComponent extends SectionModelComponent {
|
|||||||
sectionData,
|
sectionData,
|
||||||
this.submissionService.getSubmissionScope());
|
this.submissionService.getSubmissionScope());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const msg = this.translate.instant('error.submission.sections.init-form-error');
|
const msg: string = this.translate.instant('error.submission.sections.init-form-error') + e.toString();
|
||||||
const sectionError: SubmissionSectionError = {
|
const sectionError: SubmissionSectionError = {
|
||||||
message: msg + e.toString(),
|
message: msg,
|
||||||
path: '/sections/' + this.sectionData.id
|
path: '/sections/' + this.sectionData.id
|
||||||
};
|
};
|
||||||
this.sectionService.setSectionError(this.submissionId, this.sectionData.id, sectionError);
|
this.sectionService.setSectionError(this.submissionId, this.sectionData.id, sectionError);
|
||||||
|
Reference in New Issue
Block a user