diff --git a/module/testcase/config.php b/module/testcase/config.php index c2bf8830ae..83ab68720d 100644 --- a/module/testcase/config.php +++ b/module/testcase/config.php @@ -153,7 +153,7 @@ $config->testcase->datatable->fieldList['lastRunDate']['required'] = 'no'; $config->testcase->datatable->fieldList['lastRunResult']['title'] = 'lastRunResult'; $config->testcase->datatable->fieldList['lastRunResult']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['lastRunResult']['width'] = '80'; +$config->testcase->datatable->fieldList['lastRunResult']['width'] = '100'; $config->testcase->datatable->fieldList['lastRunResult']['required'] = 'no'; $config->testcase->datatable->fieldList['status']['title'] = 'statusAB'; diff --git a/module/testcase/control.php b/module/testcase/control.php index e05c02bbd0..1b809177ac 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -124,6 +124,7 @@ class testcase extends control $this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createCaseLink'), '', $branch); $this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all; $this->view->moduleID = $moduleID; + $this->view->summary = $this->testcase->summary($cases); $this->view->pager = $pager; $this->view->users = $this->user->getPairs('noletter'); $this->view->orderBy = $orderBy; diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php index da1ab978e6..81fbdbd179 100644 --- a/module/testcase/lang/en.php +++ b/module/testcase/lang/en.php @@ -118,6 +118,7 @@ $lang->testcase->allCases = 'All'; $lang->testcase->allTestcases = 'All Cases'; $lang->testcase->needConfirm = 'StoryChanged'; $lang->testcase->bySearch = 'Search'; +$lang->testcase->unexecuted = 'Unexecuted'; $lang->testcase->lblStory = 'Story'; $lang->testcase->lblLastEdited = 'Last Edit'; @@ -131,6 +132,7 @@ $lang->testcase->legendLinkBugs = 'Bug'; $lang->testcase->legendOpenAndEdit = 'Create/Edit'; $lang->testcase->legendComment = 'Remark'; +$lang->testcase->summary = "Cases on this page : %s Total, %s runed."; $lang->testcase->confirmDelete = 'Do you want to delete this Test Case?'; $lang->testcase->confirmBatchDelete = 'Do you want to batch delete thess Test Cases?'; $lang->testcase->ditto = 'Ditto'; diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index 8fe7cdde0e..4c3d387c76 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -118,6 +118,7 @@ $lang->testcase->allCases = '所有'; $lang->testcase->allTestcases = '所有用例'; $lang->testcase->needConfirm = '需求变动'; $lang->testcase->bySearch = '搜索'; +$lang->testcase->unexecuted = '未执行'; $lang->testcase->lblStory = '相关需求'; $lang->testcase->lblLastEdited = '最后编辑'; @@ -131,6 +132,7 @@ $lang->testcase->legendLinkBugs = '相关Bug'; $lang->testcase->legendOpenAndEdit = '创建编辑'; $lang->testcase->legendComment = '备注'; +$lang->testcase->summary = "本页共 %s 个用例,已执行%s个。"; $lang->testcase->confirmDelete = '您确认要删除该测试用例吗?'; $lang->testcase->confirmBatchDelete = '您确认要批量删除这些测试用例吗?'; $lang->testcase->ditto = '同上'; diff --git a/module/testcase/model.php b/module/testcase/model.php index 8b4ea13931..71882ddbd1 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -1384,7 +1384,8 @@ class testcaseModel extends model if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate)); break; case 'lastRunResult': - if($case->lastRunResult) echo $this->lang->testcase->resultList[$case->lastRunResult]; + $lastRunResultText = $case->lastRunResult ? zget($this->lang->testcase->resultList, $case->lastRunResult, $case->lastRunResult) : $this->lang->testcase->unexecuted; + echo html::a(helper::createLink('testtask', 'results', "runID=0&caseID=$case->id", '', true), " {$lastRunResultText}", '', "class='iframe btn btn-icon-left'"); break; case 'bugs': echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a(helper::createLink('testcase', 'bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs; @@ -1398,7 +1399,6 @@ class testcaseModel extends model case 'actions': echo "