| testcase->stepID;?> | -testcase->stepDesc;?> | -testcase->stepExpect;?> | -
|---|
diff --git a/module/testcase/control.php b/module/testcase/control.php index 37fbeb868d..e7c0bb5379 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -505,8 +505,11 @@ class testcase extends control $results = $this->testtask->getResults($run->id); $result = array_shift($results); - $case->xml = $result->xml; - $case->duration = $result->duration; + if($result) + { + $case->xml = $result->xml; + $case->duration = $result->duration; + } } $branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($case->product); diff --git a/module/testcase/css/view.css b/module/testcase/css/view.css index 8c667e34d5..f99291b58e 100644 --- a/module/testcase/css/view.css +++ b/module/testcase/css/view.css @@ -1,6 +1,2 @@ -#steps {margin-bottom: 15px} -.outer .col-side{transition: all 0.1s;position: relative;} -.outer.hide-side .col-side{width:0px;} -.outer .col-side .side-handle{right:0px;top:10px;} -.outer.hide-side .main-side{display:none;} .table-fixed td{white-space: unset;} +#tabsNav .tab-pane>.cell + .cell {border-top:1px solid #cbd0db; border-radius:4px;} diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 47967a8ebc..b6728e46ae 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -52,294 +52,300 @@ -
| testcase->stepID;?> | -testcase->stepDesc;?> | -testcase->stepExpect;?> | -
|---|
| testcase->lib;?> | +lib", $libName)) echo $libName;?> | +
|---|---|
| testcase->product;?> | +product", $productName)) echo $productName;?> | +
| product->branch;?> | +product&branch=$case->branch", $branchName)) echo $branchName;?> | +
| testcase->module;?> | ++ branch and isset($branches[$caseModule->branch])) + { + echo $branches[$caseModule->branch] . $lang->arrow; + } - if($caseFails > 0) common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=$runID", $case, 'button', 'bug', '', 'iframe', '', "data-width='90%'"); - } - if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'button', '', '', 'iframe', '', '', $lang->testcase->reviewAB); - ?> - - buildOperateMenu($case, 'view');?> - - id", $case, 'button', '', '', 'showinonlybody'); - if(!$isLibCase and $case->auto != 'unit') common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'button', 'copy'); - if($isLibCase and common::hasPriv('caselib', 'createCase')) echo html::a($this->createLink('caselib', 'createCase', "libID=$case->lib&moduleID=$case->module¶m=$case->id", $case), "", '', "class='btn' title='{$lang->testcase->copy}'"); - common::printIcon('testcase', 'delete', "caseID=$case->id", $case, 'button', 'trash', 'hiddenwin', 'showinonlybody'); - ?> + foreach($modulePath as $key => $module) + { + if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; + if(isset($modulePath[$key + 1])) echo $lang->arrow; + } + } + ?> + | +
| testcase->story;?> | ++ storyTitle)) echo html::a($this->createLink('story', 'view', "storyID=$case->story", '', true), "#$case->story:$case->storyTitle", '', "class='iframe' data-width='80%'"); + if($case->story and $case->storyStatus == 'active' and $case->latestStoryVersion > $case->storyVersion) + { + echo "({$lang->story->changed} "; + if(common::hasPriv('testcase', 'confirmStoryChange')) echo html::a($this->createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin'); + echo ")"; + } + ?> + | +
| testcase->type;?> | +testcase->typeList[$case->type];?> | +
| testcase->stage;?> | +
+ stage)
+ {
+ $stags = explode(',', $case->stage);
+ foreach($stags as $stage)
+ {
+ if(empty($stage)) continue;
+ isset($lang->testcase->stageList[$stage]) ? print($lang->testcase->stageList[$stage]) : print($stage);
+ echo " "; + } + } + ?> + |
+
| testcase->pri;?> | +testcase->priList, $case->pri)?> | +
| testcase->status;?> | ++ processStatus($from != 'testtask' ? 'testcase' : 'testtask', $case); + if($case->version > $case->currentVersion and $from == 'testtask') + { + echo "(testcase->fromTesttask}>{$lang->testcase->changed} "; + if(common::hasPriv('testcase', 'confirmchange')) echo html::a($this->createLink('testcase', 'confirmchange', "caseID=$case->id&taskID=$taskID"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'"); + echo ")"; + } + if(isset($case->fromCaseVersion) and $case->fromCaseVersion > $case->version and $from != 'testtask') + { + echo "(testcase->fromCaselib}>{$lang->testcase->changed} "; + if(common::hasPriv('testcase', 'confirmLibcaseChange')) echo html::a($this->createLink('testcase', 'confirmLibcaseChange', "caseID=$case->id&libcaseID=$case->fromCaseID"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'"); + if(common::hasPriv('testcase', 'ignoreLibcaseChange')) echo html::a($this->createLink('testcase', 'ignoreLibcaseChange', "caseID=$case->id"), $lang->testcase->ignore, 'hiddenwin', "class='btn btn-mini btn-info'"); + echo ")"; + } + ?> + | +
| app->loadLang('testtask')->testtask->lastRunTime;?> | +lastRunDate)) echo $case->lastRunDate;?> | +
| app->loadLang('testtask')->testtask->lastRunResult;?> | +lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?> | +
| testcase->keywords;?> | +keywords;?> | +
| testcase->linkCase;?> | +
+ linkCaseTitles))
+ {
+ foreach($case->linkCaseTitles as $linkCaseID => $linkCaseTitle)
+ {
+ echo html::a($this->createLink('testcase', 'view', "caseID=$linkCaseID", '', true), "#$linkCaseID $linkCaseTitle", '', "class='iframe' data-width='80%'") . ' '; + } + } + ?> + |
+
| testcase->fromBug;?> | +createLink('bug', 'view', "bugID=$case->fromBug", '', true), $case->fromBugTitle, '', "class='iframe' data-width='80%'");?> | +
|---|---|
| testcase->toBug;?> | +
+ toBugs as $bugID => $bugTitle)
+ {
+ echo ' ' . html::a($this->createLink('bug', 'view', "bugID=$bugID", '', true), $bugTitle, '', "class='iframe' data-width='80%'") . ' '; + } + ?> + |
+
| testcase->openedBy;?> | +openedBy) . $lang->at . $case->openedDate;?> | +
|---|---|
| testcase->reviewedBy;?> | +reviewedBy); foreach($reviewedBy as $account) echo ' ' . zget($users, trim($account)); ?> | +
| testcase->reviewedDate;?> | +reviewedBy) echo $case->reviewedDate;?> | +
| testcase->lblLastEdited;?> | +lastEditedBy) echo zget($users, $case->lastEditedBy) . $lang->at . $case->lastEditedDate;?> | +
| testcase->lib;?> | -lib", $libName)) echo $libName;?> | -
|---|---|
| testcase->product;?> | -product", $productName)) echo $productName;?> | -
| product->branch;?> | -product&branch=$case->branch", $branchName)) echo $branchName;?> | -
| testcase->module;?> | -- branch and isset($branches[$caseModule->branch])) - { - echo $branches[$caseModule->branch] . $lang->arrow; - } - - foreach($modulePath as $key => $module) - { - if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; - if(isset($modulePath[$key + 1])) echo $lang->arrow; - } - } - ?> - | -
| testcase->story;?> | -- storyTitle)) echo html::a($this->createLink('story', 'view', "storyID=$case->story", '', true), "#$case->story:$case->storyTitle", '', "class='iframe' data-width='80%'"); - if($case->story and $case->storyStatus == 'active' and $case->latestStoryVersion > $case->storyVersion) - { - echo "({$lang->story->changed} "; - if(common::hasPriv('testcase', 'confirmStoryChange')) echo html::a($this->createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - ?> - | -
| testcase->type;?> | -testcase->typeList[$case->type];?> | -
| testcase->stage;?> | -
- stage)
- {
- $stags = explode(',', $case->stage);
- foreach($stags as $stage)
- {
- if(empty($stage)) continue;
- isset($lang->testcase->stageList[$stage]) ? print($lang->testcase->stageList[$stage]) : print($stage);
- echo " "; - } - } - ?> - |
-
| testcase->pri;?> | -testcase->priList, $case->pri)?> | -
| testcase->status;?> | -- processStatus($from != 'testtask' ? 'testcase' : 'testtask', $case); - if($case->version > $case->currentVersion and $from == 'testtask') - { - echo "(testcase->fromTesttask}>{$lang->testcase->changed} "; - if(common::hasPriv('testcase', 'confirmchange')) echo html::a($this->createLink('testcase', 'confirmchange', "caseID=$case->id&taskID=$taskID"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'"); - echo ")"; - } - if(isset($case->fromCaseVersion) and $case->fromCaseVersion > $case->version and $from != 'testtask') - { - echo "(testcase->fromCaselib}>{$lang->testcase->changed} "; - if(common::hasPriv('testcase', 'confirmLibcaseChange')) echo html::a($this->createLink('testcase', 'confirmLibcaseChange', "caseID=$case->id&libcaseID=$case->fromCaseID"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'"); - if(common::hasPriv('testcase', 'ignoreLibcaseChange')) echo html::a($this->createLink('testcase', 'ignoreLibcaseChange', "caseID=$case->id"), $lang->testcase->ignore, 'hiddenwin', "class='btn btn-mini btn-info'"); - echo ")"; - } - ?> - | -
| app->loadLang('testtask')->testtask->lastRunTime;?> | -lastRunDate)) echo $case->lastRunDate;?> | -
| app->loadLang('testtask')->testtask->lastRunResult;?> | -lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?> | -
| testcase->keywords;?> | -keywords;?> | -
| testcase->linkCase;?> | -
- linkCaseTitles))
- {
- foreach($case->linkCaseTitles as $linkCaseID => $linkCaseTitle)
- {
- echo html::a($this->createLink('testcase', 'view', "caseID=$linkCaseID", '', true), "#$linkCaseID $linkCaseTitle", '', "class='iframe' data-width='80%'") . ' '; - } - } - ?> - |
-
| testcase->fromBug;?> | -createLink('bug', 'view', "bugID=$case->fromBug", '', true), $case->fromBugTitle, '', "class='iframe' data-width='80%'");?> | -
|---|---|
| testcase->toBug;?> | -
- toBugs as $bugID => $bugTitle)
- {
- echo ' ' . html::a($this->createLink('bug', 'view', "bugID=$bugID", '', true), $bugTitle, '', "class='iframe' data-width='80%'") . ' '; - } - ?> - |
-
| testcase->openedBy;?> | -openedBy) . $lang->at . $case->openedDate;?> | -
|---|---|
| testcase->reviewedBy;?> | -reviewedBy); foreach($reviewedBy as $account) echo ' ' . zget($users, trim($account)); ?> | -
| testcase->reviewedDate;?> | -reviewedBy) echo $case->reviewedDate;?> | -
| testcase->lblLastEdited;?> | -lastEditedBy) echo zget($users, $case->lastEditedBy) . $lang->at . $case->lastEditedDate;?> | -