[835] Auto-save in new Item Submission form breaks the form

Minor changes and cleanup.
This commit is contained in:
Alessandro Martelli
2020-11-20 18:17:17 +01:00
parent 999993734f
commit 55bcdf0a25
9 changed files with 14 additions and 49 deletions

View File

@@ -487,16 +487,14 @@ describe('SubmissionService test suite', () => {
describe('dispatchSave', () => {
it('should dispatch a new SaveSubmissionFormAction', () => {
service.dispatchSave(submissionId,);
service.dispatchSave(submissionId);
const expected = new SaveSubmissionFormAction(submissionId);
expect((service as any).store.dispatch).toHaveBeenCalledWith(expected);
});
});
describe('dispatchManualSave', () => {
it('should dispatch a new SaveSubmissionFormAction', () => {
service.dispatchManualSave(submissionId,);
it('should dispatch a new SaveSubmissionFormAction with manual flag', () => {
service.dispatchSave(submissionId, true);
const expected = new SaveSubmissionFormAction(submissionId, true);
expect((service as any).store.dispatch).toHaveBeenCalledWith(expected);