|
1 | 1 | import { submissionObjectReducer, SubmissionObjectState } from './submission-objects.reducer'; |
2 | 2 | import { |
3 | 3 | CancelSubmissionFormAction, |
4 | | - ChangeSubmissionCollectionAction, |
| 4 | + ChangeSubmissionCollectionAction, CleanDuplicateDetectionAction, |
5 | 5 | CompleteInitSubmissionFormAction, |
6 | 6 | DeleteSectionErrorsAction, |
7 | 7 | DeleteUploadedFileAction, |
@@ -273,7 +273,7 @@ describe('submissionReducer test suite', () => { |
273 | 273 | expect(newState[826].sections.traditionalpagetwo.enabled).toBeTruthy(); |
274 | 274 | }); |
275 | 275 |
|
276 | | - it('should enable submission section properly', () => { |
| 276 | + it('should disable submission section properly', () => { |
277 | 277 |
|
278 | 278 | let action: SubmissionObjectAction = new EnableSectionAction(submissionId, 'traditionalpagetwo'); |
279 | 279 | let newState = submissionObjectReducer(initState, action); |
@@ -644,4 +644,20 @@ describe('submissionReducer test suite', () => { |
644 | 644 | expect(newState[826].sections.upload.data).toEqual(expectedState); |
645 | 645 | }); |
646 | 646 |
|
| 647 | + it('should enable duplicates section properly', () => { |
| 648 | + |
| 649 | + let action: SubmissionObjectAction = new EnableSectionAction(submissionId, 'duplicates'); |
| 650 | + let newState = submissionObjectReducer(initState, action); |
| 651 | + |
| 652 | + expect(newState[826].sections.duplicates.enabled).toBeTruthy(); |
| 653 | + }); |
| 654 | + |
| 655 | + it('should clean duplicates section properly', () => { |
| 656 | + |
| 657 | + let action = new CleanDuplicateDetectionAction(submissionId); |
| 658 | + let newState = submissionObjectReducer(initState, action); |
| 659 | + |
| 660 | + expect(newState[826].sections.duplicates.enabled).toBeFalsy(); |
| 661 | + }); |
| 662 | + |
647 | 663 | }); |
0 commit comments