@@ -10,13 +10,18 @@ import {
1010 TestBed ,
1111 waitForAsync ,
1212} from '@angular/core/testing' ;
13+ import { Store } from '@ngrx/store' ;
1314import {
1415 cold ,
1516 getTestScheduler ,
1617} from 'jasmine-marbles' ;
17- import { of as observableOf } from 'rxjs' ;
18+ import {
19+ of as observableOf ,
20+ of ,
21+ } from 'rxjs' ;
1822import { TestScheduler } from 'rxjs/testing' ;
1923
24+ import { APP_DATA_SERVICES_MAP } from '../../../config/app-config.interface' ;
2025import { AuthService } from '../../core/auth/auth.service' ;
2126import { HALEndpointService } from '../../core/shared/hal-endpoint.service' ;
2227import { Item } from '../../core/shared/item.model' ;
@@ -56,6 +61,8 @@ describe('SubmissionFormComponent Component', () => {
5661 let scheduler : TestScheduler ;
5762
5863 const submissionServiceStub : SubmissionServiceStub = new SubmissionServiceStub ( ) ;
64+ submissionServiceStub . getSubmissionStatus = jasmine . createSpy ( 'getSubmissionStatus' )
65+ . and . returnValue ( of ( true ) ) ;
5966 const submissionId = mockSubmissionId ;
6067 const collectionId = mockSubmissionCollectionId ;
6168 const submissionObjectNew : any = mockSubmissionObjectNew ;
@@ -64,6 +71,7 @@ describe('SubmissionFormComponent Component', () => {
6471 const selfUrl : any = mockSubmissionSelfUrl ;
6572 const sectionsList : any = mockSectionsList ;
6673 const sectionsData : any = mockSectionsData ;
74+ const store = jasmine . createSpyObj ( 'store' , [ 'dispatch' ] ) ;
6775
6876 beforeEach ( waitForAsync ( ( ) => {
6977 TestBed . configureTestingModule ( {
@@ -75,6 +83,8 @@ describe('SubmissionFormComponent Component', () => {
7583 { provide : SubmissionService , useValue : submissionServiceStub } ,
7684 { provide : SectionsService , useValue : { isSectionTypeAvailable : ( ) => observableOf ( true ) } } ,
7785 { provide : ThemeService , useValue : getMockThemeService ( ) } ,
86+ { provide : Store , useValue : store } ,
87+ { provide : APP_DATA_SERVICES_MAP , useValue : { } } ,
7888 ChangeDetectorRef ,
7989 SubmissionFormComponent ,
8090 ] ,
0 commit comments