mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 18:44:14 +00:00
[TLC-674] New duplicate data service, object reducer tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { submissionObjectReducer, SubmissionObjectState } from './submission-objects.reducer';
|
||||
import {
|
||||
CancelSubmissionFormAction,
|
||||
ChangeSubmissionCollectionAction,
|
||||
ChangeSubmissionCollectionAction, CleanDuplicateDetectionAction,
|
||||
CompleteInitSubmissionFormAction,
|
||||
DeleteSectionErrorsAction,
|
||||
DeleteUploadedFileAction,
|
||||
@@ -273,7 +273,7 @@ describe('submissionReducer test suite', () => {
|
||||
expect(newState[826].sections.traditionalpagetwo.enabled).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should enable submission section properly', () => {
|
||||
it('should disable submission section properly', () => {
|
||||
|
||||
let action: SubmissionObjectAction = new EnableSectionAction(submissionId, 'traditionalpagetwo');
|
||||
let newState = submissionObjectReducer(initState, action);
|
||||
@@ -644,4 +644,20 @@ describe('submissionReducer test suite', () => {
|
||||
expect(newState[826].sections.upload.data).toEqual(expectedState);
|
||||
});
|
||||
|
||||
it('should enable duplicates section properly', () => {
|
||||
|
||||
let action: SubmissionObjectAction = new EnableSectionAction(submissionId, 'duplicates');
|
||||
let newState = submissionObjectReducer(initState, action);
|
||||
|
||||
expect(newState[826].sections.duplicates.enabled).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should clean duplicates section properly', () => {
|
||||
|
||||
let action = new CleanDuplicateDetectionAction(submissionId);
|
||||
let newState = submissionObjectReducer(initState, action);
|
||||
|
||||
expect(newState[826].sections.duplicates.enabled).toBeFalsy();
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user