* ajusted views of module 'testcase' & 'testtask'.
This commit is contained in:
@@ -11,53 +11,63 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<form method='post'>
|
||||
<table class='table-1'>
|
||||
<caption class='caption-tl'>CASE#<?php echo $run->case->id. $lang->colon . $run->case->title;?></caption>
|
||||
<tr>
|
||||
<td colspan='5'><h5><?php echo $lang->testcase->precondition;?></h5><?php echo $run->case->precondition;?></td>
|
||||
</tr>
|
||||
<tr class='colhead'>
|
||||
<th class='w-30px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th class='w-p40'><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='w-p20'><?php echo $lang->testcase->stepExpect;?></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->result;?></th>
|
||||
<th><?php echo $lang->testcase->real;?></th>
|
||||
</tr>
|
||||
<?php foreach($run->case->steps as $key => $step):?>
|
||||
<?php $defaultResult = $step->expect ? 'pass' : 'n/a';?>
|
||||
<tr>
|
||||
<th><?php echo $key + 1;?></th>
|
||||
<td><?php echo nl2br($step->desc);?></td>
|
||||
<td><?php echo nl2br($step->expect);?></td>
|
||||
<td class='text-center'><?php echo html::select("steps[$step->id]", $lang->testcase->resultList, $defaultResult);?></td>
|
||||
<td><?php echo html::textarea("reals[$step->id]", '', "rows=2 class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr class='text-center'>
|
||||
<td colspan='5'>
|
||||
<?php
|
||||
if($preCase) echo html::linkButton($lang->testtask->pre, inlink('runCase', "runID={$preCase['runID']}&caseID={$preCase['caseID']}&version={$preCase['version']}"));
|
||||
if(empty($run->case->steps))
|
||||
{
|
||||
echo html::submitButton($lang->testtask->pass, "onclick=$('#result').val('pass')");
|
||||
echo html::submitButton($lang->testtask->fail, "onclick=$('#result').val('fail')");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::submitButton();
|
||||
echo html::submitButton($lang->testtask->pass, "onclick=$('#passall').val(1)");
|
||||
}
|
||||
echo html::hidden('case', $run->case->id);
|
||||
echo html::hidden('version', $run->case->currentVersion);
|
||||
if($run->case->steps) echo html::hidden('passall', 0);
|
||||
if($nextCase) echo html::linkButton($lang->testtask->next, inlink('runCase', "runID={$nextCase['runID']}&caseID={$nextCase['caseID']}&version={$nextCase['version']}"));
|
||||
if(!$run->case->steps) echo html::hidden('result', '');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['usecase']) . ' #' . $run->case->id;?></span>
|
||||
<strong><?php echo $run->case->title;?></strong>
|
||||
<small class='text-warning'> <?php echo $lang->testtask->runCase;?> <?php echo html::icon($lang->icons['run']);?></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main'>
|
||||
<form class='form-condensed' method='post'>
|
||||
<table class='table table-bordered table-form'>
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan='5'><strong><?php echo $lang->testcase->precondition;?></strong> <?php echo $run->case->precondition;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-40px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th class='w-p40'><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='w-p20'><?php echo $lang->testcase->stepExpect;?></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->result;?></th>
|
||||
<th><?php echo $lang->testcase->real;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($run->case->steps as $key => $step):?>
|
||||
<?php $defaultResult = $step->expect ? 'pass' : 'n/a';?>
|
||||
<tr>
|
||||
<th><?php echo $key + 1;?></th>
|
||||
<td><?php echo nl2br($step->desc);?></td>
|
||||
<td><?php echo nl2br($step->expect);?></td>
|
||||
<td class='text-center'><?php echo html::select("steps[$step->id]", $lang->testcase->resultList, $defaultResult, "class='form-control'");?></td>
|
||||
<td><?php echo html::textarea("reals[$step->id]", '', "rows=2 class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr class='text-center'>
|
||||
<td colspan='5'>
|
||||
<?php
|
||||
if($preCase) echo html::linkButton($lang->testtask->pre, inlink('runCase', "runID={$preCase['runID']}&caseID={$preCase['caseID']}&version={$preCase['version']}"));
|
||||
if(empty($run->case->steps))
|
||||
{
|
||||
echo html::submitButton($lang->testtask->pass, "onclick=$('#result').val('pass')", 'btn-success');
|
||||
echo html::submitButton($lang->testtask->fail, "onclick=$('#result').val('fail')", 'btn-danger');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::submitButton();
|
||||
echo html::submitButton($lang->testtask->pass, "onclick=$('#passall').val(1)");
|
||||
}
|
||||
if($nextCase) echo html::linkButton($lang->testtask->next, inlink('runCase', "runID={$nextCase['runID']}&caseID={$nextCase['caseID']}&version={$nextCase['version']}"));
|
||||
if($run->case->steps) echo html::hidden('passall', 0);
|
||||
if(!$run->case->steps) echo html::hidden('result', '');
|
||||
echo html::hidden('case', $run->case->id);
|
||||
echo html::hidden('version', $run->case->currentVersion);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
ob_start();
|
||||
$case = $run->case; include './results.html.php';
|
||||
|
||||
Reference in New Issue
Block a user