mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 04:53:06 +00:00
[835] Auto-save in new Item Submission form breaks the form
Section metadata dispatched to the store and retrieved in subscription. Added test case for hasMetadataEnrichment.
This commit is contained in:
@@ -301,6 +301,15 @@ describe('SubmissionSectionformComponent test suite', () => {
|
||||
expect(comp.hasMetadataEnrichment(newSectionData)).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should return false when metadata has Metadata Enrichment but not belonging to sectionMetadata', () => {
|
||||
const newSectionData = {
|
||||
'dc.title': [new FormFieldMetadataValueObject('test')]
|
||||
};
|
||||
compAsAny.formData = newSectionData;
|
||||
compAsAny.sectionMetadata = [];
|
||||
expect(comp.hasMetadataEnrichment(newSectionData)).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should update form properly', () => {
|
||||
spyOn(comp, 'initForm');
|
||||
spyOn(comp, 'checksForErrors');
|
||||
|
Reference in New Issue
Block a user