From c480a3e4d3e7f16d5466f5a40b1502da21066e6a Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Wed, 26 Apr 2017 11:11:00 +0800 Subject: [PATCH] * finish task #2985. --- module/testsuite/control.php | 1 + module/testsuite/view/view.html.php | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/module/testsuite/control.php b/module/testsuite/control.php index 30a4aa6dc4..de4113f002 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -141,6 +141,7 @@ class testsuite extends control $this->view->cases = $this->testsuite->getLinkedCases($suiteID, $sort, $pager); $this->view->orderBy = $orderBy; $this->view->pager = $pager; + $this->view->modules = $this->loadModel('tree')->getOptionMenu($suite->product, 'case'); $this->view->branches = $this->loadModel('branch')->getPairs($suite->product, 'noempty'); $this->display(); diff --git a/module/testsuite/view/view.html.php b/module/testsuite/view/view.html.php index 202be8ee7a..9226aa8c13 100644 --- a/module/testsuite/view/view.html.php +++ b/module/testsuite/view/view.html.php @@ -64,13 +64,15 @@ idAB);?> priAB);?> + testcase->module);?> testcase->title);?> testcase->type);?> statusAB);?> + testcase->lastRunResult);?> testcase->bugsAB;?> testcase->resultsAB;?> testcase->stepNumberAB;?> - actions;?> + actions;?> id);?> testcase->priList, $case->pri, $case->pri)?>'>testcase->priList, $case->pri, $case->pri)?> + module];?> branch) echo "{$branches[$case->branch]}"?> createLink('testcase', 'view', "caseID=$case->id&version=$case->caseVersion"), $case->title);?> testcase->typeList[$case->type];?> version < $case->caseVersion) ? "{$lang->testcase->changed}" : $lang->testcase->statusList[$case->status];?> + lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?> bugs) ? html::a($this->createLink('testcase', 'bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs;?> results) ? html::a($this->createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->results, '', "class='iframe'") : $case->results;?> stepNumber;?> @@ -105,6 +109,8 @@ $unlinkURL = $this->createLink('testsuite', 'unlinkCase', "suiteID=$suite->id&caseID=$case->id&confirm=yes"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\",\"caseList\",confirmUnlink)", '', '', "title='{$lang->testsuite->unlinkCase}' class='btn-icon'"); } + 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%'"); ?> @@ -113,7 +119,7 @@ - +
@@ -129,6 +135,10 @@ $actionLink = $this->createLink('testsuite', 'batchUnlinkCases', "suiteID=$suite->id"); $misc = common::hasPriv('testsuite', 'batchUnlinkCases') ? "onclick=\"setFormAction('$actionLink')\"" : "class='disabled'"; echo "
  • " . html::a('javascript:;', $lang->testsuite->unlinkCase, '', $misc) . "
  • "; + + $actionLink = $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy"); + $misc = common::hasPriv('testtask', 'batchRun') ? "onclick=\"setFormAction('$actionLink')\"" : $class; + echo "
  • " . html::a('#', $lang->testtask->runCase, '', $misc) . "
  • "; ?>