File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -350,15 +350,15 @@ module.exports = (config) => {
350350					testrail . addResultsForCases ( runId ,  {  results : validResults  } ) . then ( res  =>  { 
351351						output . log ( `The run ${ runId }   is updated with ${ JSON . stringify ( res ) }  ` ) ; 
352352
353- 						failedTests . forEach ( test  =>  { 
354- 							testrail . getResultsForCase ( runId ,  test . case_id ) . then ( res  =>  { 
353+ 						for   ( const   test  of   failedTests )  { 
354+ 							  testrail . getResultsForCase ( runId ,  test . case_id ) . then ( async   res  =>  { 
355355								try  { 
356- 									helper  &&  testrail . addAttachmentToResult ( res [ 0 ] . id ,  attachments [ test . case_id ] ) ; 
356+ 									helper  &&  await   testrail . addAttachmentToResult ( res [ 0 ] . id ,  attachments [ test . case_id ] ) ; 
357357								}  catch  ( err )  { 
358358									output . error ( `Cannot add attachment due to error: ${ err }  ` ) 
359359								} 
360360							} ) ; 
361- 						} ) ; 
361+ 						} 
362362					} ) ; 
363363					_closeTestRun ( ) ; 
364364				} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments