@@ -25,6 +25,7 @@ import { getTestTranslocoModule } from 'xforge-common/test-utils';
2525import { UserService } from 'xforge-common/user.service' ;
2626import { SFProjectProfileDoc } from '../../core/models/sf-project-profile-doc' ;
2727import { TrainingDataDoc } from '../../core/models/training-data-doc' ;
28+ import { ProjectNotificationService } from '../../core/project-notification.service' ;
2829import { SFProjectService } from '../../core/sf-project.service' ;
2930import { TextDocService } from '../../core/text-doc.service' ;
3031import { BuildDto } from '../../machine-api/build-dto' ;
@@ -50,6 +51,7 @@ describe('DraftGenerationComponent', () => {
5051 let mockTrainingDataService : jasmine . SpyObj < TrainingDataService > ;
5152 let mockFeatureFlagService : jasmine . SpyObj < FeatureFlagService > ;
5253 let mockSFProjectService : jasmine . SpyObj < SFProjectService > ;
54+ let mockProjectNotificationService : jasmine . SpyObj < ProjectNotificationService > ;
5355
5456 const buildDto : BuildDto = {
5557 id : 'testId' ,
@@ -99,7 +101,8 @@ describe('DraftGenerationComponent', () => {
99101 { provide : OnlineStatusService , useClass : TestOnlineStatusService } ,
100102 { provide : TrainingDataService , useValue : mockTrainingDataService } ,
101103 { provide : ProgressService , useValue : undefined } ,
102- { provide : FeatureFlagService , useValue : mockFeatureFlagService }
104+ { provide : FeatureFlagService , useValue : mockFeatureFlagService } ,
105+ { provide : ProjectNotificationService , useValue : mockProjectNotificationService }
103106 ]
104107 } ) ;
105108
@@ -218,6 +221,13 @@ describe('DraftGenerationComponent', () => {
218221 mockSFProjectService = jasmine . createSpyObj < SFProjectService > ( [ 'hasDraft' ] ) ;
219222 mockSFProjectService . hasDraft . withArgs ( matchThisProject ) . and . returnValue ( preTranslate ) ;
220223 mockSFProjectService . hasDraft . withArgs ( matchThisProject , jasmine . anything ( ) ) . and . returnValue ( preTranslate ) ;
224+ mockProjectNotificationService = jasmine . createSpyObj < ProjectNotificationService > ( [
225+ 'setNotifyBuildProgressHandler' ,
226+ 'start' ,
227+ 'stop' ,
228+ 'removeNotifyBuildProgressHandler' ,
229+ 'subscribeToProject'
230+ ] ) ;
221231 }
222232
223233 get configureDraftButton ( ) : HTMLElement | null {
0 commit comments