* change for import case from file.
This commit is contained in:
@@ -601,7 +601,7 @@ class testcase extends control
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->stories = $this->story->getProductStoryPairs($productID, $case->branch);
|
||||
}
|
||||
if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']);
|
||||
if(!$this->testcase->forceReview()) unset($this->lang->testcase->statusList['wait']);
|
||||
$position[] = $this->lang->testcase->common;
|
||||
$position[] = $this->lang->testcase->edit;
|
||||
|
||||
@@ -709,7 +709,7 @@ class testcase extends control
|
||||
}
|
||||
}
|
||||
|
||||
if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']);
|
||||
if(!$this->testcase->forceReview()) unset($this->lang->testcase->statusList['wait']);
|
||||
|
||||
/* Judge whether the editedTasks is too large and set session. */
|
||||
$countInputVars = count($cases) * (count(explode(',', $this->config->testcase->custom->batchEditFields)) + 3);
|
||||
@@ -1184,7 +1184,6 @@ class testcase extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']);
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
|
||||
if($product->type != 'normal') $fields['branch'] = $this->lang->product->branchName[$product->type];
|
||||
@@ -1195,14 +1194,12 @@ class testcase extends control
|
||||
$fields['keywords'] = $this->lang->testcase->keywords;
|
||||
$fields['type'] = $this->lang->testcase->type;
|
||||
$fields['pri'] = $this->lang->testcase->pri;
|
||||
$fields['status'] = $this->lang->testcase->status;
|
||||
$fields['stage'] = $this->lang->testcase->stage;
|
||||
$fields['precondition'] = $this->lang->testcase->precondition;
|
||||
|
||||
$fields[''] = '';
|
||||
$fields['typeValue'] = $this->lang->testcase->lblTypeValue;
|
||||
$fields['stageValue'] = $this->lang->testcase->lblStageValue;
|
||||
$fields['statusValue'] = $this->lang->testcase->lblStatusValue;
|
||||
if($product->type != 'normal') $fields['branchValue'] = $this->lang->product->branchName[$product->type];
|
||||
|
||||
$branches = $this->loadModel('branch')->getPairs($productID);
|
||||
@@ -1221,7 +1218,6 @@ class testcase extends control
|
||||
{
|
||||
$row->typeValue = join("\n", $this->lang->testcase->typeList);
|
||||
$row->stageValue = join("\n", $this->lang->testcase->stageList);
|
||||
$row->statusValue = join("\n", $this->lang->testcase->statusList);
|
||||
if($product->type != 'normal') $row->branchValue = join("\n", $branches);
|
||||
}
|
||||
$rows[] = $row;
|
||||
@@ -1499,7 +1495,6 @@ class testcase extends control
|
||||
echo js::alert($this->lang->error->noData);
|
||||
die(js::locate($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch")));
|
||||
}
|
||||
if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']);
|
||||
|
||||
/* Judge whether the editedTasks is too large and set session. */
|
||||
$countInputVars = count($caseData) * 12 + $stepVars;
|
||||
|
||||
@@ -940,7 +940,6 @@ class testcaseModel extends model
|
||||
$caseData->title = $data->title[$key];
|
||||
$caseData->pri = (int)$data->pri[$key];
|
||||
$caseData->type = $data->type[$key];
|
||||
$caseData->status = $data->status[$key];
|
||||
$caseData->stage = join(',', $data->stage[$key]);
|
||||
$caseData->keywords = $data->keywords[$key];
|
||||
$caseData->frequency = 1;
|
||||
@@ -962,9 +961,15 @@ class testcaseModel extends model
|
||||
$forceReview = $this->forceReview();
|
||||
foreach($cases as $key => $caseData)
|
||||
{
|
||||
$caseID = 0;
|
||||
if(!empty($_POST['id'][$key]) and empty($_POST['insert']))
|
||||
{
|
||||
$caseID = $data->id[$key];
|
||||
$caseID = $data->id[$key];
|
||||
if(!isset($oldCases[$caseID])) $caseID = 0;
|
||||
}
|
||||
|
||||
if($caseID)
|
||||
{
|
||||
$stepChanged = false;
|
||||
$steps = array();
|
||||
$oldStep = isset($oldSteps[$caseID]) ? $oldSteps[$caseID] : array();
|
||||
@@ -1050,7 +1055,7 @@ class testcaseModel extends model
|
||||
$caseData->openedDate = $now;
|
||||
$caseData->branch = isset($data->branch[$key]) ? $data->branch[$key] : $branch;
|
||||
if($caseData->story) $caseData->storyVersion = zget($storyVersionPairs, $caseData->story, 1);
|
||||
if($forceReview) $caseData->status = 'wait';
|
||||
$caseData->status = $forceReview ? 'wait' : 'normal';
|
||||
$this->dao->insert(TABLE_CASE)->data($caseData)->autoCheck()->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
@@ -1269,7 +1274,7 @@ class testcaseModel extends model
|
||||
case 'actions':
|
||||
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");
|
||||
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'results iframe', '', "data-width='90%'");
|
||||
if($config->testcase->needReview) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
|
||||
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
|
||||
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy');
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
$misc = common::hasPriv('testcase', 'batchDelete') ? "onclick=\"confirmBatchDelete('$actionLink')\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
|
||||
|
||||
if(common::hasPriv('testcase', 'batchReview') and $config->testcase->needReview)
|
||||
if(common::hasPriv('testcase', 'batchReview') and ($config->testcase->needReview or !empty($config->testcase->forceReview)))
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->testcase->review, '', "id='reviewItem'");
|
||||
@@ -80,7 +80,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
elseif($config->testcase->needReview)
|
||||
elseif($config->testcase->needReview or !empty($config->testcase->forceReview))
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->testcase->review, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->bugs?>'> <?php echo $lang->testcase->bugsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->results?>'> <?php echo $lang->testcase->resultsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->stepNumber?>'> <?php echo $lang->testcase->stepNumberAB;?></th>
|
||||
<th class='<?php echo $config->testcase->needReview ? 'w-170px' : 'w-150px'?> {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<th class='<?php echo ($config->testcase->needReview or !empty($config->testcase->forceReview)) ? 'w-170px' : 'w-150px'?> {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -79,7 +79,7 @@
|
||||
<?php
|
||||
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");
|
||||
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', 'list-alt', '', 'results iframe', false, "data-width='95%'");
|
||||
if($config->testcase->needReview) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
|
||||
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
|
||||
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy');
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<?php
|
||||
if(isset($menuItem->hidden)) continue;
|
||||
$menuType = $menuItem->name;
|
||||
if(!$config->testcase->needReview and $menuType == 'wait') continue;
|
||||
if(!$config->testcase->needReview and empty($config->testcase->forceReview) and $menuType == 'wait') continue;
|
||||
if($this->config->global->flow == 'onlyTest' and (strpos(',needconfirm,group,zerocase,', ',' . $menuType . ',') !== false)) continue;
|
||||
if($hasBrowsePriv and strpos($menuType, 'QUERY') === 0)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div class='container mw-600px'>
|
||||
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin' style="padding:30px">
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<td align='center' style="padding:30px">
|
||||
<td align='center'>
|
||||
<input type='file' name='file' class='form-control'/>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -6,99 +6,97 @@
|
||||
<div class='alert alert-info'><?php echo $suhosinInfo?></div>
|
||||
<?php else:?>
|
||||
<form target='hiddenwin' method='post' class='form-condensed'>
|
||||
<table class='table table-fixed active-disabled table-custom'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-70px'><?php echo $lang->testcase->id?></th>
|
||||
<th><?php echo $lang->testcase->title?></th>
|
||||
<?php if($branches):?>
|
||||
<th class='w-100px'><?php echo $lang->testcase->branch?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-100px'><?php echo $lang->testcase->module?></th>
|
||||
<th class='w-120px'><?php echo $lang->testcase->story?></th>
|
||||
<th class='w-70px'><?php echo $lang->testcase->pri?></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->type?></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->status?></th>
|
||||
<th><?php echo $lang->testcase->stage?></th>
|
||||
<th class='w-80px'><?php echo $lang->testcase->keywords?></th>
|
||||
<th><?php echo $lang->testcase->precondition?></th>
|
||||
<th class='w-300px'>
|
||||
<table class='w-p100 table-borderless'>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->stepDesc?></th>
|
||||
<th><?php echo $lang->testcase->stepExpect?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $insert = true;?>
|
||||
<?php foreach($caseData as $key => $case):?>
|
||||
<?php if(empty($case->title)) continue;?>
|
||||
<tr valign='top' align='center'>
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($case->id))
|
||||
{
|
||||
echo $case->id . html::hidden("id[$key]", $case->id);
|
||||
$insert = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $key . " <sub class='gray' style='vertical-align:sub;'>{$lang->testcase->new}</sub>";
|
||||
}
|
||||
echo html::hidden("product[$key]", $productID);
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo html::input("title[$key]", $case->title, "class='form-control' style='margin-top:2px' autocomplete='off'")?></td>
|
||||
<?php if($branches):?>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("branch[$key]", $branches, (isset($case->branch) and $case->branch !== '') ? $case->branch : (!empty($case->id) ? $cases[$case->id]->branch : $branch), "class='form-control chosen'")?></td>
|
||||
<?php endif;?>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : (!empty($case->id) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("story[$key]", $stories, isset($case->story) ? $case->story : (!empty($case->id) ? $cases[$case->id]->story : ''), "class='form-control chosen'")?></td>
|
||||
<td><?php echo html::select("pri[$key]", $lang->testcase->priList, isset($case->pri) ? $case->pri : (!empty($case->id) ? $cases[$case->id]->pri : ''), "class='form-control'")?></td>
|
||||
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, isset($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control'")?></td>
|
||||
<td><?php echo html::select("status[$key]", $lang->testcase->statusList, isset($case->status) ? $case->status : (!empty($case->id) ? $cases[$case->id]->status : 'normal'), "class='form-control'")?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
|
||||
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control' autocomplete='off'")?></td>
|
||||
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?></td>
|
||||
<td>
|
||||
<?php if(isset($stepData[$key]['desc'])):?>
|
||||
<table class='w-p100 bd-0'>
|
||||
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
|
||||
<?php if(empty($desc['content'])) continue;?>
|
||||
<tr class='step'>
|
||||
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
|
||||
<td><?php echo html::textarea("desc[$key][$id]", htmlspecialchars($desc['content']), "class='form-control'")?></td>
|
||||
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlspecialchars($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<table class='table table-fixed active-disabled table-custom'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-70px'><?php echo $lang->testcase->id?></th>
|
||||
<th><?php echo $lang->testcase->title?></th>
|
||||
<?php if($branches):?>
|
||||
<th class='w-100px'><?php echo $lang->testcase->branch?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-100px'><?php echo $lang->testcase->module?></th>
|
||||
<th class='w-120px'><?php echo $lang->testcase->story?></th>
|
||||
<th class='w-70px'><?php echo $lang->testcase->pri?></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->type?></th>
|
||||
<th><?php echo $lang->testcase->stage?></th>
|
||||
<th class='w-80px'><?php echo $lang->testcase->keywords?></th>
|
||||
<th><?php echo $lang->testcase->precondition?></th>
|
||||
<th class='w-300px'>
|
||||
<table class='w-p100 table-borderless'>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->stepDesc?></th>
|
||||
<th><?php echo $lang->testcase->stepExpect?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $insert = true;?>
|
||||
<?php foreach($caseData as $key => $case):?>
|
||||
<?php if(empty($case->title)) continue;?>
|
||||
<tr valign='top' align='center'>
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($case->id))
|
||||
{
|
||||
echo $case->id . html::hidden("id[$key]", $case->id);
|
||||
$insert = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $key . " <sub class='gray' style='vertical-align:sub;'>{$lang->testcase->new}</sub>";
|
||||
}
|
||||
echo html::hidden("product[$key]", $productID);
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo html::input("title[$key]", htmlspecialchars($case->title, ENT_QUOTES), "class='form-control'")?></td>
|
||||
<?php if($branches):?>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("branch[$key]", $branches, (isset($case->branch) and $case->branch !== '') ? $case->branch : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->branch : $branch), "class='form-control chosen'")?></td>
|
||||
<?php endif;?>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("story[$key]", $stories, isset($case->story) ? $case->story : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->story : ''), "class='form-control chosen'")?></td>
|
||||
<td><?php echo html::select("pri[$key]", $lang->testcase->priList, isset($case->pri) ? $case->pri : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->pri : ''), "class='form-control'")?></td>
|
||||
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, $case->type, "class='form-control'")?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
|
||||
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control' autocomplete='off'")?></td>
|
||||
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?></td>
|
||||
<td>
|
||||
<?php if(isset($stepData[$key]['desc'])):?>
|
||||
<table class='w-p100 bd-0'>
|
||||
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
|
||||
<?php if(empty($desc['content'])) continue;?>
|
||||
<tr class='step'>
|
||||
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
|
||||
<td><?php echo html::textarea("desc[$key][$id]", htmlspecialchars($desc['content']), "class='form-control'")?></td>
|
||||
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlspecialchars($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='10' class='text-center'>
|
||||
<?php
|
||||
if(!$insert)
|
||||
{
|
||||
include '../../common/view/noticeimport.html.php';
|
||||
echo "<button type='button' data-toggle='myModal' class='btn btn-primary'>{$lang->save}</button>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::submitButton();
|
||||
}
|
||||
echo ' ' . html::backButton()
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='10' class='text-center'>
|
||||
<?php
|
||||
if(!$insert)
|
||||
{
|
||||
include '../../common/view/noticeimport.html.php';
|
||||
echo "<button type='button' data-toggle='myModal' class='btn btn-primary'>{$lang->save}</button>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::submitButton();
|
||||
}
|
||||
echo ' ' . html::backButton()
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
<script>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
if($caseFails > 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');
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'button', 'review', '', 'iframe');
|
||||
echo '</div>';
|
||||
|
||||
echo "<div class='btn-group'>";
|
||||
@@ -290,7 +290,7 @@
|
||||
<th class='w-60px'><?php echo $lang->testcase->openedBy;?></th>
|
||||
<td><?php echo $users[$case->openedBy] . $lang->at . $case->openedDate;?></td>
|
||||
</tr>
|
||||
<?php if($config->testcase->needReview):?>
|
||||
<?php if($config->testcase->needReview or !empty($config->testcase->forceReview)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->reviewedBy;?></th>
|
||||
<td><?php $reviewedBy = explode(',', $case->reviewedBy); foreach($reviewedBy as $account) echo ' ' . $users[trim($account)]; ?></td>
|
||||
|
||||
@@ -678,8 +678,6 @@ class testsuite extends control
|
||||
$this->loadModel('testcase');
|
||||
if($_POST)
|
||||
{
|
||||
if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']);
|
||||
|
||||
$fields['module'] = $this->lang->testcase->module;
|
||||
$fields['title'] = $this->lang->testcase->title;
|
||||
$fields['stepDesc'] = $this->lang->testcase->stepDesc;
|
||||
@@ -687,14 +685,12 @@ class testsuite extends control
|
||||
$fields['keywords'] = $this->lang->testcase->keywords;
|
||||
$fields['type'] = $this->lang->testcase->type;
|
||||
$fields['pri'] = $this->lang->testcase->pri;
|
||||
$fields['status'] = $this->lang->testcase->status;
|
||||
$fields['stage'] = $this->lang->testcase->stage;
|
||||
$fields['precondition'] = $this->lang->testcase->precondition;
|
||||
|
||||
$fields[''] = '';
|
||||
$fields['typeValue'] = $this->lang->testcase->lblTypeValue;
|
||||
$fields['stageValue'] = $this->lang->testcase->lblStageValue;
|
||||
$fields['statusValue'] = $this->lang->testcase->lblStatusValue;
|
||||
|
||||
$modules = $this->loadModel('tree')->getOptionMenu($libID, $viewType = 'caselib', $startModuleID = 0);
|
||||
$rows = array();
|
||||
@@ -709,7 +705,6 @@ class testsuite extends control
|
||||
{
|
||||
$row->typeValue = join("\n", $this->lang->testcase->typeList);
|
||||
$row->stageValue = join("\n", $this->lang->testcase->stageList);
|
||||
$row->statusValue = join("\n", $this->lang->testcase->statusList);
|
||||
}
|
||||
$rows[] = $row;
|
||||
}
|
||||
@@ -942,10 +937,11 @@ class testsuite extends control
|
||||
|
||||
if(empty($caseData))
|
||||
{
|
||||
unlink($this->session->importFile);
|
||||
unset($_SESSION['importFile']);
|
||||
echo js::alert($this->lang->error->noData);
|
||||
die(js::locate($this->createLink('testsuite', 'library', "libID=$libID")));
|
||||
}
|
||||
if(!$this->config->testcase->needReview) unset($this->lang->testcase->statusList['wait']);
|
||||
|
||||
/* Judge whether the editedTasks is too large and set session. */
|
||||
$countInputVars = count($caseData) * 9 + $stepVars;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
if(onlyTest)
|
||||
if(typeof(onlyTest) != 'undefined' && onlyTest)
|
||||
{
|
||||
$('#mainmenu > .nav > li').removeClass('active');
|
||||
$('#mainmenu > .nav > li[data-id=testcase]').addClass('active');
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->testsuite->unlinkCase = "Unlink";
|
||||
$lang->testsuite->batchUnlinkCases = "Batch unlink cases";
|
||||
$lang->testsuite->deleted = 'deleted';
|
||||
$lang->testsuite->exportTemplet = 'Export template';
|
||||
$lang->testsuite->importFile = 'Import CSV';
|
||||
$lang->testsuite->importFile = 'Import';
|
||||
|
||||
$lang->testsuite->common = 'Test Suite';
|
||||
$lang->testsuite->product = $lang->productCommon;
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->testsuite->unlinkCase = "移除";
|
||||
$lang->testsuite->batchUnlinkCases = "批量移除用例";
|
||||
$lang->testsuite->deleted = '已删除';
|
||||
$lang->testsuite->exportTemplet = '导出模板';
|
||||
$lang->testsuite->importFile = '导入CSV';
|
||||
$lang->testsuite->importFile = '导入';
|
||||
|
||||
$lang->testsuite->common = '套件';
|
||||
$lang->testsuite->product = '所属' . $lang->productCommon;
|
||||
|
||||
@@ -653,8 +653,7 @@ class testsuiteModel extends model
|
||||
$caseData->version = 1;
|
||||
$caseData->openedBy = $this->app->user->account;
|
||||
$caseData->openedDate = $now;
|
||||
$caseData->branch = isset($data->branch[$key]) ? $data->branch[$key] : $branch;
|
||||
if($forceReview) $caseData->status = 'wait';
|
||||
$caseData->status = $forceReview ? 'wait' : 'normal';
|
||||
$this->dao->insert(TABLE_CASE)->data($caseData)->autoCheck()->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div class='container mw-600px'>
|
||||
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin' style="padding:30px">
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<td align='center' style="padding:30px">
|
||||
<td align='center'>
|
||||
<input type='file' name='file' class='form-control'/>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -39,7 +39,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
<?php $hasCasesPriv = common::hasPriv('testsuite', 'library'); ?>
|
||||
<?php
|
||||
if($hasCasesPriv) echo "<li id='allTab'>" . html::a($this->inlink('library', "libID=$libID&browseType=all"), $lang->testcase->allCases) . "</li>";
|
||||
if($hasCasesPriv and $config->testcase->needReview) echo "<li id='waitTab'>" . html::a($this->inlink('library', "libID=$libID&browseType=wait"), $lang->testcase->statusList['wait']) . "</li>";
|
||||
if($hasCasesPriv and ($config->testcase->needReview or !empty($config->testcase->forceReview))) echo "<li id='waitTab'>" . html::a($this->inlink('library', "libID=$libID&browseType=wait"), $lang->testcase->statusList['wait']) . "</li>";
|
||||
echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a></li> ";
|
||||
if(common::hasPriv('testsuite', 'libView')) echo '<li>' . html::a(inlink('libView', "libID=$libID"), $lang->testsuite->view) . '</li>';
|
||||
?>
|
||||
@@ -51,7 +51,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
if(common::hasPriv('testsuite', 'exportTemplet')) echo html::a($link, "<i class='icon-download-alt'></i> " . $lang->testsuite->exportTemplet, '', "class='btn export'");
|
||||
|
||||
$link = common::hasPriv('testsuite', 'import') ? $this->createLink('testsuite', 'import', "libID=$libID") : '#';
|
||||
if(common::hasPriv('testsuite', 'import')) echo html::a($link, "<i class='icon-upload-alt'></i> " . $lang->testsuite->importFile, '', "class='btn export'");
|
||||
if(common::hasPriv('testsuite', 'import')) echo html::a($link, "<i class='icon-upload-alt'></i> " . $lang->testcase->importFile, '', "class='btn export'");
|
||||
?>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
@@ -126,7 +126,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if($config->testcase->needReview) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
|
||||
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
|
||||
if(common::hasPriv('testcase', 'delete'))
|
||||
{
|
||||
@@ -160,7 +160,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
$misc = common::hasPriv('testcase', 'batchDelete') ? "onclick=\"confirmBatchDelete('$actionLink')\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
|
||||
|
||||
if(common::hasPriv('testcase', 'batchReview') and $config->testcase->needReview)
|
||||
if(common::hasPriv('testcase', 'batchReview') and ($config->testcase->needReview or !empty($config->testcase->forceReview)))
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->testcase->review, '', "id='reviewItem'");
|
||||
@@ -173,7 +173,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
elseif($config->testcase->needReview)
|
||||
elseif($config->testcase->needReview or !empty($config->testcase->forceReview))
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->testcase->review, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<th class='w-100px'><?php echo $lang->testcase->module?></th>
|
||||
<th class='w-70px'><?php echo $lang->testcase->pri?></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->type?></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->status?></th>
|
||||
<th><?php echo $lang->testcase->stage?></th>
|
||||
<th class='w-80px'><?php echo $lang->testcase->keywords?></th>
|
||||
<th><?php echo $lang->testcase->precondition?></th>
|
||||
@@ -52,7 +51,6 @@
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : (!empty($case->id) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?></td>
|
||||
<td><?php echo html::select("pri[$key]", $lang->testcase->priList, isset($case->pri) ? $case->pri : (!empty($case->id) ? $cases[$case->id]->pri : ''), "class='form-control'")?></td>
|
||||
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, isset($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control'")?></td>
|
||||
<td><?php echo html::select("status[$key]", $lang->testcase->statusList, isset($case->status) ? $case->status : (!empty($case->id) ? $cases[$case->id]->status : 'normal'), "class='form-control'")?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
|
||||
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control' autocomplete='off'")?></td>
|
||||
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?></td>
|
||||
@@ -75,7 +73,7 @@
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='10' class='text-center'>
|
||||
<td colspan='9' class='text-center'>
|
||||
<?php
|
||||
if(!$insert)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user