mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 03:23:07 +00:00
Fixed build error
This commit is contained in:
@@ -3,17 +3,20 @@ import {
|
|||||||
CancelSubmissionFormAction,
|
CancelSubmissionFormAction,
|
||||||
ChangeSubmissionCollectionAction,
|
ChangeSubmissionCollectionAction,
|
||||||
CompleteInitSubmissionFormAction,
|
CompleteInitSubmissionFormAction,
|
||||||
DeleteSectionErrorsAction, DeleteUploadedFileAction,
|
DeleteSectionErrorsAction,
|
||||||
|
DeleteUploadedFileAction,
|
||||||
DepositSubmissionAction,
|
DepositSubmissionAction,
|
||||||
DepositSubmissionErrorAction,
|
DepositSubmissionErrorAction,
|
||||||
DepositSubmissionSuccessAction,
|
DepositSubmissionSuccessAction,
|
||||||
DisableSectionAction,
|
DisableSectionAction,
|
||||||
DiscardSubmissionAction,
|
DiscardSubmissionAction,
|
||||||
DiscardSubmissionSuccessAction, EditFileDataAction,
|
DiscardSubmissionSuccessAction,
|
||||||
|
EditFileDataAction,
|
||||||
EnableSectionAction,
|
EnableSectionAction,
|
||||||
InertSectionErrorsAction,
|
InertSectionErrorsAction,
|
||||||
InitSectionAction,
|
InitSectionAction,
|
||||||
InitSubmissionFormAction, NewUploadedFileAction,
|
InitSubmissionFormAction,
|
||||||
|
NewUploadedFileAction,
|
||||||
RemoveSectionErrorsAction,
|
RemoveSectionErrorsAction,
|
||||||
ResetSubmissionFormAction,
|
ResetSubmissionFormAction,
|
||||||
SaveAndDepositSubmissionAction,
|
SaveAndDepositSubmissionAction,
|
||||||
@@ -32,7 +35,8 @@ import {
|
|||||||
import { SectionsType } from '../sections/sections-type';
|
import { SectionsType } from '../sections/sections-type';
|
||||||
import {
|
import {
|
||||||
mockSubmissionCollectionId,
|
mockSubmissionCollectionId,
|
||||||
mockSubmissionDefinitionResponse, mockSubmissionId,
|
mockSubmissionDefinitionResponse,
|
||||||
|
mockSubmissionId,
|
||||||
mockSubmissionSelfUrl,
|
mockSubmissionSelfUrl,
|
||||||
mockSubmissionState
|
mockSubmissionState
|
||||||
} from '../../shared/mocks/mock-submission';
|
} from '../../shared/mocks/mock-submission';
|
||||||
@@ -47,7 +51,7 @@ describe('submissionReducer test suite', () => {
|
|||||||
let initState: any;
|
let initState: any;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
initState = Object.assign({}, mockSubmissionState);
|
initState = Object.assign({}, {}, mockSubmissionState);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should init submission state properly', () => {
|
it('should init submission state properly', () => {
|
||||||
@@ -71,103 +75,11 @@ describe('submissionReducer test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should complete submission initialization', () => {
|
it('should complete submission initialization', () => {
|
||||||
const state = {
|
const state = Object.assign({}, initState, {
|
||||||
826: {
|
[submissionId]: Object.assign({}, initState[submissionId], {
|
||||||
collection: collectionId,
|
isLoading: true
|
||||||
definition: 'traditional',
|
})
|
||||||
selfUrl: selfUrl,
|
});
|
||||||
activeSection: null,
|
|
||||||
sections: {
|
|
||||||
extraction: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'utils',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
collection: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'collection',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpageone: {
|
|
||||||
header: 'submit.progressbar.describe.stepone',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpageone',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpagetwo: {
|
|
||||||
header: 'submit.progressbar.describe.steptwo',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpagetwo',
|
|
||||||
mandatory: false,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: false,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
upload: {
|
|
||||||
header: 'submit.progressbar.upload',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionuploads/upload',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'upload',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {
|
|
||||||
files:[]
|
|
||||||
},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
license: {
|
|
||||||
header: 'submit.progressbar.license',
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'license',
|
|
||||||
visibility: {
|
|
||||||
main: null,
|
|
||||||
other: 'READONLY'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any
|
|
||||||
},
|
|
||||||
isLoading: true,
|
|
||||||
savePending: false,
|
|
||||||
depositPending: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const action = new CompleteInitSubmissionFormAction(submissionId);
|
const action = new CompleteInitSubmissionFormAction(submissionId);
|
||||||
const newState = submissionObjectReducer(state, action);
|
const newState = submissionObjectReducer(state, action);
|
||||||
@@ -227,101 +139,11 @@ describe('submissionReducer test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should set to false savePendig flag once the save is completed', () => {
|
it('should set to false savePendig flag once the save is completed', () => {
|
||||||
const state = {
|
const state = Object.assign({}, initState, {
|
||||||
826: {
|
[submissionId]: Object.assign({}, initState[submissionId], {
|
||||||
collection: collectionId,
|
|
||||||
definition: 'traditional',
|
|
||||||
selfUrl: selfUrl,
|
|
||||||
activeSection: null,
|
|
||||||
sections: {
|
|
||||||
extraction: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'utils',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
collection: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'collection',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpageone: {
|
|
||||||
header: 'submit.progressbar.describe.stepone',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpageone',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpagetwo: {
|
|
||||||
header: 'submit.progressbar.describe.steptwo',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpagetwo',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
upload: {
|
|
||||||
header: 'submit.progressbar.upload',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionuploads/upload',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'upload',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
license: {
|
|
||||||
header: 'submit.progressbar.license',
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'license',
|
|
||||||
visibility: {
|
|
||||||
main: null,
|
|
||||||
other: 'READONLY'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any
|
|
||||||
},
|
|
||||||
isLoading: false,
|
|
||||||
savePending: true,
|
savePending: true,
|
||||||
depositPending: false
|
})
|
||||||
}
|
});
|
||||||
};
|
|
||||||
|
|
||||||
let action: any = new SaveSubmissionFormSuccessAction(submissionId, []);
|
let action: any = new SaveSubmissionFormSuccessAction(submissionId, []);
|
||||||
let newState = submissionObjectReducer(state, action);
|
let newState = submissionObjectReducer(state, action);
|
||||||
@@ -370,101 +192,11 @@ describe('submissionReducer test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should reset state once the deposit is completed successfully', () => {
|
it('should reset state once the deposit is completed successfully', () => {
|
||||||
const state = {
|
const state = Object.assign({}, initState, {
|
||||||
826: {
|
[submissionId]: Object.assign({}, initState[submissionId], {
|
||||||
collection: collectionId,
|
depositPending: true,
|
||||||
definition: 'traditional',
|
})
|
||||||
selfUrl: selfUrl,
|
});
|
||||||
activeSection: null,
|
|
||||||
sections: {
|
|
||||||
extraction: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'utils',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
collection: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'collection',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpageone: {
|
|
||||||
header: 'submit.progressbar.describe.stepone',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpageone',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpagetwo: {
|
|
||||||
header: 'submit.progressbar.describe.steptwo',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpagetwo',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
upload: {
|
|
||||||
header: 'submit.progressbar.upload',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionuploads/upload',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'upload',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
license: {
|
|
||||||
header: 'submit.progressbar.license',
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'license',
|
|
||||||
visibility: {
|
|
||||||
main: null,
|
|
||||||
other: 'READONLY'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any
|
|
||||||
},
|
|
||||||
isLoading: false,
|
|
||||||
savePending: false,
|
|
||||||
depositPending: true
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const action: any = new DepositSubmissionSuccessAction(submissionId);
|
const action: any = new DepositSubmissionSuccessAction(submissionId);
|
||||||
const newState = submissionObjectReducer(state, action);
|
const newState = submissionObjectReducer(state, action);
|
||||||
@@ -623,13 +355,6 @@ describe('submissionReducer test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should remove all submission section errors properly', () => {
|
it('should remove all submission section errors properly', () => {
|
||||||
const errors = [
|
|
||||||
{
|
|
||||||
path: '/sections/license',
|
|
||||||
message: 'error.validation.license.notgranted'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const action: any = new RemoveSectionErrorsAction(submissionId, 'traditionalpageone');
|
const action: any = new RemoveSectionErrorsAction(submissionId, 'traditionalpageone');
|
||||||
let newState;
|
let newState;
|
||||||
|
|
||||||
@@ -799,103 +524,19 @@ describe('submissionReducer test suite', () => {
|
|||||||
},
|
},
|
||||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/7e2f4ba9-9316-41fd-844a-1ef435f41a42/content'
|
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/7e2f4ba9-9316-41fd-844a-1ef435f41a42/content'
|
||||||
};
|
};
|
||||||
const state: SubmissionObjectState = {
|
|
||||||
826: {
|
const state: SubmissionObjectState = Object.assign({}, initState, {
|
||||||
collection: collectionId,
|
[submissionId]: Object.assign({}, initState[submissionId], {
|
||||||
definition: 'traditional',
|
sections: Object.assign({}, initState[submissionId].sections, {
|
||||||
selfUrl: selfUrl,
|
upload: Object.assign({}, initState[submissionId].sections.upload, {
|
||||||
activeSection: null,
|
|
||||||
sections: {
|
|
||||||
extraction: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'utils',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
collection: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'collection',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpageone: {
|
|
||||||
header: 'submit.progressbar.describe.stepone',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpageone',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpagetwo: {
|
|
||||||
header: 'submit.progressbar.describe.steptwo',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpagetwo',
|
|
||||||
mandatory: false,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: false,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
upload: {
|
|
||||||
header: 'submit.progressbar.upload',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionuploads/upload',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'upload',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {
|
data: {
|
||||||
files: [fileData, fileData2]
|
files: [fileData, fileData2]
|
||||||
},
|
}
|
||||||
errors: [],
|
})
|
||||||
isLoading: false,
|
})
|
||||||
isValid: false
|
})
|
||||||
} as any,
|
});
|
||||||
license: {
|
|
||||||
header: 'submit.progressbar.license',
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'license',
|
|
||||||
visibility: {
|
|
||||||
main: null,
|
|
||||||
other: 'READONLY'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any
|
|
||||||
},
|
|
||||||
isLoading: false,
|
|
||||||
savePending: false,
|
|
||||||
depositPending: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const expectedState = {
|
const expectedState = {
|
||||||
files: [fileData]
|
files: [fileData]
|
||||||
};
|
};
|
||||||
@@ -973,103 +614,18 @@ describe('submissionReducer test suite', () => {
|
|||||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/7e2f4ba9-9316-41fd-844a-1ef435f41a42/content'
|
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/7e2f4ba9-9316-41fd-844a-1ef435f41a42/content'
|
||||||
};
|
};
|
||||||
|
|
||||||
const state: SubmissionObjectState = {
|
const state: SubmissionObjectState = Object.assign({}, initState, {
|
||||||
826: {
|
[submissionId]: Object.assign({}, initState[submissionId], {
|
||||||
collection: collectionId,
|
sections: Object.assign({}, initState[submissionId].sections, {
|
||||||
definition: 'traditional',
|
upload: Object.assign({}, initState[submissionId].sections.upload, {
|
||||||
selfUrl: selfUrl,
|
|
||||||
activeSection: null,
|
|
||||||
sections: {
|
|
||||||
extraction: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'utils',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
collection: {
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'collection',
|
|
||||||
visibility: {
|
|
||||||
main: 'HIDDEN',
|
|
||||||
other: 'HIDDEN'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpageone: {
|
|
||||||
header: 'submit.progressbar.describe.stepone',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpageone',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
traditionalpagetwo: {
|
|
||||||
header: 'submit.progressbar.describe.steptwo',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionforms/traditionalpagetwo',
|
|
||||||
mandatory: false,
|
|
||||||
sectionType: 'submission-form',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: false,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any,
|
|
||||||
upload: {
|
|
||||||
header: 'submit.progressbar.upload',
|
|
||||||
config: 'https://rest.api/dspace-spring-rest/api/config/submissionuploads/upload',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'upload',
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {
|
data: {
|
||||||
files: [fileData]
|
files: [fileData]
|
||||||
},
|
}
|
||||||
errors: [],
|
})
|
||||||
isLoading: false,
|
})
|
||||||
isValid: false
|
})
|
||||||
} as any,
|
});
|
||||||
license: {
|
|
||||||
header: 'submit.progressbar.license',
|
|
||||||
config: '',
|
|
||||||
mandatory: true,
|
|
||||||
sectionType: 'license',
|
|
||||||
visibility: {
|
|
||||||
main: null,
|
|
||||||
other: 'READONLY'
|
|
||||||
},
|
|
||||||
collapsed: false,
|
|
||||||
enabled: true,
|
|
||||||
data: {},
|
|
||||||
errors: [],
|
|
||||||
isLoading: false,
|
|
||||||
isValid: false
|
|
||||||
} as any
|
|
||||||
},
|
|
||||||
isLoading: false,
|
|
||||||
savePending: false,
|
|
||||||
depositPending: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const expectedState = {
|
const expectedState = {
|
||||||
files: [fileData2]
|
files: [fileData2]
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user