* just use case step item as bug step when creating bug from case steps.

This commit is contained in:
chenfeiCF
2017-03-15 17:01:42 +08:00
parent 0416eed289
commit a5c19fd479
4 changed files with 25 additions and 2 deletions
+11
View File
@@ -29,6 +29,17 @@ $(function()
$this.find('.collapse-handle').toggleClass('icon-chevron-down', !show).toggleClass('icon-chevron-up', show);;
});
$(".step-group input[type='checkbox']").click(function()
{
var $next = $(this).closest('tr').next();
while($next.length && $next.hasClass('step-item'))
{
var isChecked = $(this).prop('checked');
$next.find("input[type='checkbox']").prop('checked', isChecked);
$next = $next.next();
}
});
$('#casesResults table caption .result-tip').html($('#resultTip').html());
$('tr').remove('#result-success');
+1 -1
View File
@@ -48,7 +48,7 @@
common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$case->id&version=$case->currentVersion", '', 'button', '', '', 'runCase', false, "data-width='95%'");
common::printIcon('testtask', 'results', "runID=$runID&caseID=$case->id&version=$case->version", '', 'button', '', '', 'results', false, "data-width='95%'");
if($caseFailCount > 0) common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=$runID", '', 'button', 'bug', '', 'iframe');
if($caseFailCount > 0) common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=$runID", '', 'button', 'bug', '', 'iframe', '', "data-width='90%'");
}
if($config->testcase->needReview) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'button', 'review', '', 'iframe');
echo '</div>';
+11
View File
@@ -9,5 +9,16 @@ $(function()
$this.find('.collapse-handle').toggleClass('icon-chevron-down', !show).toggleClass('icon-chevron-up', show);;
});
$(".step-group input[type='checkbox']").click(function()
{
var $next = $(this).closest('tr').next();
while($next.length && $next.hasClass('step-item'))
{
var isChecked = $(this).prop('checked');
$next.find("input[type='checkbox']").prop('checked', isChecked);
$next = $next.next();
}
});
$('#casesResults table caption .result-tip').html($('#resultTip').html());
});
+2 -1
View File
@@ -82,7 +82,8 @@
<tr class='step <?php echo $stepClass?>'>
<td class='step-id'>
<?php if($result->caseResult == 'fail'):?>
<input type='checkbox' name='stepIDList[]' value='<?php echo $key;?>'/>
<?php $inputName = $stepClass == 'step-item' ? 'stepIDList[]' : 'stepGroup[]';?>
<input type='checkbox' name='<?php echo $inputName;?>' value='<?php echo $key;?>'/>
<?php endif;?>
<?php echo $stepId;?>
</td>