mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
27286998f7
commit
3768dc030e
@@ -443,7 +443,7 @@ describe('SubmissionSectionFormComponent test suite', () => {
|
|||||||
compAsAny.formData = {};
|
compAsAny.formData = {};
|
||||||
compAsAny.sectionMetadata = ['dc.title'];
|
compAsAny.sectionMetadata = ['dc.title'];
|
||||||
|
|
||||||
comp.updateForm({data: sectionData, errorsToShow: sectionError} as any);
|
comp.updateForm({ data: sectionData, errorsToShow: sectionError } as any);
|
||||||
|
|
||||||
expect(comp.isUpdating).toBeFalsy();
|
expect(comp.isUpdating).toBeFalsy();
|
||||||
expect(comp.initForm).toHaveBeenCalled();
|
expect(comp.initForm).toHaveBeenCalled();
|
||||||
@@ -460,7 +460,7 @@ describe('SubmissionSectionFormComponent test suite', () => {
|
|||||||
};
|
};
|
||||||
const sectionState = {
|
const sectionState = {
|
||||||
data: sectionData,
|
data: sectionData,
|
||||||
errorsToShow: [{path: '/test', message: 'test'}],
|
errorsToShow: [{ path: '/test', message: 'test' }],
|
||||||
} as any;
|
} as any;
|
||||||
comp.sectionData.data = {};
|
comp.sectionData.data = {};
|
||||||
comp.sectionData.errorsToShow = [];
|
comp.sectionData.errorsToShow = [];
|
||||||
@@ -478,9 +478,9 @@ describe('SubmissionSectionFormComponent test suite', () => {
|
|||||||
spyOn(comp, 'initForm');
|
spyOn(comp, 'initForm');
|
||||||
spyOn(comp, 'checksForErrors');
|
spyOn(comp, 'checksForErrors');
|
||||||
const sectionData: any = {};
|
const sectionData: any = {};
|
||||||
const sectionErrors: any = [{ path: '/test', message: 'test'}];
|
const sectionErrors: any = [{ path: '/test', message: 'test' }];
|
||||||
|
|
||||||
comp.updateForm({data: sectionData, errorsToShow: sectionErrors} as any);
|
comp.updateForm({ data: sectionData, errorsToShow: sectionErrors } as any);
|
||||||
|
|
||||||
expect(comp.initForm).not.toHaveBeenCalled();
|
expect(comp.initForm).not.toHaveBeenCalled();
|
||||||
expect(comp.checksForErrors).toHaveBeenCalled();
|
expect(comp.checksForErrors).toHaveBeenCalled();
|
||||||
|
Reference in New Issue
Block a user