@@ -312,6 +312,49 @@ describe('ProjectComponentsScreenComponent', () => {
312312 } as AppShellNotification , 8000 ) ;
313313 } ) ;
314314
315+ it ( 'should not filter out incident params with boolean false value' , ( ) => {
316+ component . projectComponents = [ {
317+ name : 'test-component' ,
318+ status : 'CREATED' ,
319+ logo : 'http://example.com/logo.png' ,
320+ url : 'http://example.com' ,
321+ canDelete : true ,
322+ hasAutomatedDeletionWorkflow : false
323+ } as ProjectComponent ] ;
324+ const testComponent = {
325+ name : 'test-component' ,
326+ status : 'CREATED' ,
327+ logo : 'http://example.com/logo.png' ,
328+ url : 'http://example.com' ,
329+ canDelete : true ,
330+ hasAutomatedDeletionWorkflow : false
331+ } as ProjectComponent ;
332+ component . selectedProject = { projectKey : 'PROJECT_1' , location : 'LOC_1' } as AppProject ;
333+ const mockResult = {
334+ deploymentStatus : false ,
335+ changeNumber : 'CHG1234567' ,
336+ reason : 'Test reason' ,
337+ projectKey : 'PROJECT_1' ,
338+ componentName : 'test-component'
339+ } ;
340+ spyOn ( component . dialog , 'open' ) . and . returnValue ( {
341+ afterClosed : ( ) => of ( mockResult )
342+ } as any ) ;
343+
344+ component . onRequestDeletionClicked ( testComponent ) ;
345+
346+ const incidentParams : CreateIncidentParameter [ ] = [
347+ { name : 'is_deployed' , type : 'boolean' , value : false as Boolean } ,
348+ { name : 'change_number' , type : 'string' , value : 'CHG1234567' as String } ,
349+ { name : 'reason' , type : 'string' , value : 'Test reason' as String }
350+ ] ;
351+ expect ( provisionerServiceSpy . requestComponentDeletion ) . toHaveBeenCalledWith (
352+ 'PROJECT_1' ,
353+ 'test-component' ,
354+ incidentParams
355+ ) ;
356+ } ) ;
357+
315358 it ( 'should show error toast when deletion request fails' , ( ) => {
316359 component . projectComponents = [ {
317360 name : 'test-component' ,
0 commit comments