app/Http/Controllers/IntegrationHandler.php
/**
	 * Handles the teststep part of the row from excel
	 *
	 * @return ts_id
	 */
Handles the teststep part of the row from excel
@return ts_id
Handles the teststep part of the row from excel @return ts_id
public function handleTeststep  ($row, $tc_id, $ts_id, $seq)
{
   $ts = [];
    if(!isset($row[9])|| $row[9]  == null ||  $row[9] == ""){
       }else{
          $ts['description'] 		= $row[9];
          $ts['expected_result'] 	= $row[10];
          $ts['tp_id'] 			= session()->get('open_project');
          $ts['tc_id'] 			= $tc_id;
          $check 					=  \App\TestStep::where($ts)->first();
          if($check == null)
          {
              $ts_id = $ts['ts_id'] = $tc_id."_".$this->genrateRandomInt();
              $ts['status']         = 'not_executed';
              $ts['created_by']     = session()->get('email');
              $ts['seq_no']         = $seq;
              \App\TestStep::create($ts);
              $execution_content['scroll']        = 'No';
              $execution_content['resource_id']   = '';
              $execution_content['text']          = '';
              $execution_content['content_desc']  = '';
              $execution_content['class']         = '';
              $execution_content['index']         = '';
              $execution_content['sendkey']       = '';
              $execution_content['screenshot']    = 'No';
              $execution_content['checkpoint']    = '';
              $execution_content['wait']          = '';
              $execution_content['tc_id']         = $tc_id;
              $execution_content['tp_id']         = session()->get('open_project');
              $execution_content['ts_id']         = $ts_id;
              $execution_content['tl_id']         = 0;
              $execution_content['seq_no']        = $seq;
              $execution_content['e_id']          = $ts_id."_".$this->genrateRandomInt();
              \App\Execution::create($execution_content);
          }
          else{
              $ts_id  = $check->ts_id;
          }
      }
  return $ts_id;
  }
public function handleTeststep ( $ row , $ tc_id , $ ts_id , $ seq ) { $ ts = [ ] ; if ( ! isset ( $ row [ 9 ] ) || $ row [ 9 ] == null || $ row [ 9 ] == " " ) { } else { $ ts [ 'description' ] = $ row [ 9 ] ; $ ts [ 'expected_result' ] = $ row [ 10 ] ; $ ts [ 'tp_id' ] = session ( ) -> get ( 'open_project' ) ; $ ts [ 'tc_id' ] = $ tc_id ; $ check = \ App \ TestStep :: where ( $ ts ) -> first ( ) ; if ( $ check == null ) { $ ts_id = $ ts [ 'ts_id' ] = $ tc_id . " _ " . $ this -> genrateRandomInt ( ) ; $ ts [ 'status' ] = 'not_executed' ; $ ts [ 'created_by' ] = session ( ) -> get ( 'email' ) ; $ ts [ 'seq_no' ] = $ seq ; \ App \ TestStep :: create ( $ ts ) ; $ execution_content [ 'scroll' ] = 'No' ; $ execution_content [ 'resource_id' ] = '' ; $ execution_content [ 'text' ] = '' ; $ execution_content [ 'content_desc' ] = '' ; $ execution_content [ 'class' ] = '' ; $ execution_content [ 'index' ] = '' ; $ execution_content [ 'sendkey' ] = '' ; $ execution_content [ 'screenshot' ] = 'No' ; $ execution_content [ 'checkpoint' ] = '' ; $ execution_content [ 'wait' ] = '' ; $ execution_content [ 'tc_id' ] = $ tc_id ; $ execution_content [ 'tp_id' ] = session ( ) -> get ( 'open_project' ) ; $ execution_content [ 'ts_id' ] = $ ts_id ; $ execution_content [ 'tl_id' ] = 0 ; $ execution_content [ 'seq_no' ] = $ seq ; $ execution_content [ 'e_id' ] = $ ts_id . " _ " . $ this -> genrateRandomInt ( ) ; \ App \ Execution :: create ( $ execution_content ) ; } else { $ ts_id = $ check -> ts_id ; } } return $ ts_id ; }
Handles the teststep part of the row from excel
 @return ts_id
Handles the teststep part of the row from excel @return ts_id
//If nothing to process then do nothing //return $ts_id;