Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,12 @@
// 'latest' => latest execution notes.
$tlCfg->exec_cfg->steps_exec_status_default = 'empty';

/**
* Concatenate execution steps note in the execution notes (the later is attached to the test run)
**/

$tlCfg->exec_cfg->steps_notes_concat = false;

// Parameters to show notes/details when entering test execution feature
// EXPAND: show expanded/open
// COLLAPSE: show collapsed/closede
Expand Down
49 changes: 36 additions & 13 deletions gui/javascript/execSetResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,49 @@ function doSubmitForHTML5() {

/**
* Submit Executions status.
* Used
*
* @param tcvID int test case id
* @param status test status
* @param notesConcat concatenate step note in exec notes
* @param goNext open next test case
*
*/
function saveExecStatus(tcvID, status, msg, goNext) {

function saveExecStatus(tcvID, status, notesConcat, goNext) {
/* Init */
jQuery('#save_and_next').val(0);
jQuery('#save_results').val(0);
jQuery('#save_partial_steps_exec').val(0);

jQuery('#save_results').val(0);
jQuery('#save_partial_steps_exec').val(0);
jQuery('#save_button_clicked').val(tcvID);
jQuery('#statusSingle_' + tcvID).val(status);
if(notesConcat == true){
// Get all steps status
var myRegexp = /step_row_(\d+)/g;
var stepresult = document.querySelectorAll('[id^=step_row_]')
var tcNotes = document.getElementById('notes['+tcvID+']');
stepresult.forEach(function(item){
match = myRegexp.exec(item.id);
myRegexp.lastIndex = 0;
stepNum = document.getElementById('tcstep_'+match[1]);
var row = stepNum.innerHTML;
var note = '';
var statusTc = ''


if ( item.getElementsByClassName('step_status').length > 0 )
statusTc = item.getElementsByClassName('step_status')[0].value;
if ( item.getElementsByClassName('step_note_textarea').length > 0 )
note = item.getElementsByClassName('step_note_textarea')[0].value;
if (statusTc == 'f' ||statusTc == 'b' || note != ''){
tcNotes.value = tcNotes.value + '\nStep '+ row + ' ('+ statusTc+'):' + note ;
}
})
}
if( goNext == undefined || goNext == 0 ) {
jQuery('#save_results').val(1);
jQuery('#save_results').val(1);
} else {
if( goNext == 1 ) {
jQuery('#save_and_next').val(1);
}
if( goNext == 1 ) {
jQuery('#save_and_next').val(1);
}
}

doSubmitForHTML5();
}

Expand Down Expand Up @@ -152,4 +175,4 @@ function checkSubmitForStatusCombo(oid,statusCode2block) {
saveStepsPartialExecClicked = false;
$("#saveStepsPartialExec").click(function() {
saveStepsPartialExecClicked = true;
});
});
4 changes: 2 additions & 2 deletions gui/templates/tl-classic/execute/inc_exec_img_controls.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Author : franciscom
<img src="{$tlImages.$in}" title="{$ikval.title}"
name="fastExec{$kode}[{$tcversion_id}]"
id="fastExec{$kode}_{$tcversion_id}"
onclick="javascript:saveExecStatus({$tcvID},'{$kode}');">&nbsp;
onclick="javascript:saveExecStatus({$tcvID},'{$kode}',{$tlCfg->exec_cfg->steps_notes_concat});">&nbsp;
{/foreach}
<br />
<br />
Expand All @@ -121,7 +121,7 @@ Author : franciscom
<img src="{$tlImages.$in}" title="{$ikval.title}"
name="fastExecNext{$kode}[{$tcversion_id}]"
id="fastExecNext{$kode}_{$tcversion_id}"
onclick="javascript:saveExecStatus({$tcvID},'{$kode}','',1);">&nbsp;
onclick="javascript:saveExecStatus({$tcvID},'{$kode}',{$tlCfg->exec_cfg->steps_notes_concat},1);">&nbsp;
{/foreach}
<br />
<br />
Expand Down