Skip to content
Snippets Groups Projects
Commit 825464bb authored by Giuseppe Digilio's avatar Giuseppe Digilio
Browse files

Fixed test

parent 2473ef30
No related branches found
No related tags found
No related merge requests found
......@@ -266,6 +266,7 @@ describe('FormSectionComponent test suite', () => {
it('should set a section Error when init form model fails', () => {
formBuilderService.modelFromConfiguration.and.throwError('test');
translateService.instant.and.returnValue('test');
const sectionData = {};
const sectionError: SubmissionSectionError = {
message: 'test' + 'Error: test',
......
......@@ -201,9 +201,9 @@ export class FormSectionComponent extends SectionModelComponent {
sectionData,
this.submissionService.getSubmissionScope());
} 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 = {
message: msg + e.toString(),
message: msg,
path: '/sections/' + this.sectionData.id
};
this.sectionService.setSectionError(this.submissionId, this.sectionData.id, sectionError);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment