[DSC-130] Fix issue when switching submission's collection between those with different submission definition

This commit is contained in:
Giuseppe Digilio
2021-06-08 17:40:17 +02:00
parent 1187edb486
commit 434ef5628f
2 changed files with 13 additions and 5 deletions

View File

@@ -261,9 +261,10 @@ describe('SubmissionFormCollectionComponent Component', () => {
expect(comp.toggled).toHaveBeenCalled();
});
it('should ', () => {
it('should change collection properly', () => {
spyOn(comp.collectionChange, 'emit').and.callThrough();
jsonPatchOpServiceStub.jsonPatchByResourceID.and.returnValue(of(submissionRestResponse));
submissionServiceStub.retrieveSubmission.and.returnValue(createSuccessfulRemoteDataObject$(submissionRestResponse[0]));
comp.ngOnInit();
comp.onSelect(mockCollectionList[1]);
fixture.detectChanges();