Skip to content
Snippets Groups Projects
Commit 70b2c8c6 authored by Ben Bosman's avatar Ben Bosman
Browse files

go back to the setup where mockUploadConfigResponseNotRequired starts from a clone

parent 3e51fd85
Branches
Tags
No related merge requests found
......@@ -1336,104 +1336,9 @@ export const mockUploadConfigResponse = {
self: 'https://rest.api/dspace-spring-rest/api/config/submissionuploads/upload'
};
export const mockUploadConfigResponseNotRequired = {
accessConditionOptions: [
{
name: 'openaccess',
groupUUID: '123456-g',
hasStartDate: false,
hasEndDate: false
},
{
name: 'lease',
groupUUID: '123456-g',
hasStartDate: false,
hasEndDate: true,
maxEndDate: '2019-07-12T14:40:06.308+0000'
},
{
name: 'embargo',
groupUUID: '123456-g',
hasStartDate: true,
hasEndDate: false,
maxStartDate: '2022-01-12T14:40:06.308+0000'
},
{
name: 'administrator',
groupUUID: '0f2773dd-1741-475f-80e7-ccdef153d655',
hasStartDate: false,
hasEndDate: false
}
],
metadata: {
rows: [
{
fields: [
{
input: {
type: 'onebox'
},
label: 'Title',
mandatory: true,
repeatable: false,
mandatoryMessage: 'You must enter a main title for this item.',
hints: 'Enter the name of the file.',
selectableMetadata: [
{
metadata: 'dc.title',
label: null,
authority: null,
closed: null
}
],
languageCodes: []
}
]
},
{
fields: [
{
input: {
type: 'textarea'
},
label: 'Description',
mandatory: false,
repeatable: true,
hints: 'Enter a description for the file',
selectableMetadata: [
{
metadata: 'dc.description',
label: null,
authority: null,
closed: null
}
],
languageCodes: []
}
]
}
],
name: 'bitstream-metadata',
type: 'submissionform',
_links: {
self: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/bitstream-metadata'
},
self: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/bitstream-metadata'
},
required: false,
maxSize: 536870912,
name: 'upload',
type: 'submissionupload',
_links: {
metadata: 'https://rest.api/dspace-spring-rest/api/config/submissionuploads/upload/metadata',
self: 'https://rest.api/dspace-spring-rest/api/config/submissionuploads/upload'
},
self: 'https://rest.api/dspace-spring-rest/api/config/submissionuploads/upload'
};
// Clone the object and change one property
// export const mockUploadConfigResponseNotRequired = JSON.parse(JSON.stringify(mockUploadConfigResponse));
// mockUploadConfigResponseNotRequired.required = false;
export const mockUploadConfigResponseNotRequired = JSON.parse(JSON.stringify(mockUploadConfigResponse));
mockUploadConfigResponseNotRequired.required = false;
export const mockAccessConditionOptions = [
{
......
......@@ -273,7 +273,7 @@ describe('SubmissionSectionUploadComponent test suite', () => {
});
it('should properly read the section status', () => {
it('should properly read the section status when required is true', () => {
submissionServiceStub.getSubmissionObject.and.returnValue(observableOf(submissionState));
collectionDataService.findById.and.returnValue(createSuccessfulRemoteDataObject$(mockCollection));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment