* Add testreport view page.

This commit is contained in:
wangyuting
2023-06-27 16:18:11 +08:00
parent c0d50ea15b
commit ca094bb9b1
8 changed files with 165 additions and 24 deletions
+3
View File
@@ -0,0 +1,3 @@
.detail-body .tabs {padding: 12px 24px 8px 24px;background: #fff;}
.detail-body .section-list {padding-left: 0px; padding-right: 0px;}
.detail-body .history {padding: 0px;}
+8
View File
@@ -0,0 +1,8 @@
$().ready(function()
{
if($('#goalTip').length) new zui.Tooltip('#goalTip', {title: goalTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
if($('#foundBugTip').length) new zui.Tooltip('#foundBugTip', {title: foundBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
if($('#legacyBugTip').length) new zui.Tooltip('#legacyBugTip', {title: legacyBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
if($('#activatedBugTip').length) new zui.Tooltip('#activatedBugTip', {title: activatedBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
if($('#fromCaseBugTip').length) new zui.Tooltip('#fromCaseBugTip', {title: fromCaseBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
});
-9
View File
@@ -1,12 +1,3 @@
$().ready(function()
{
if($('#goalTip').length) new zui.Tooltip('#goalTip', {title: goalTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
new zui.Tooltip('#foundBugTip', {title: foundBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
new zui.Tooltip('#legacyBugTip', {title: legacyBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
new zui.Tooltip('#activatedBugTip', {title: activatedBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
new zui.Tooltip('#fromCaseBugTip', {title: fromCaseBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
});
function changeTesttask(event)
{
const taskID = $(event.target).val();
-8
View File
@@ -1,8 +0,0 @@
$().ready(function()
{
if($('#goalTip').length) new zui.Tooltip('#goalTip', {title: goalTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
new zui.Tooltip('#foundBugTip', {title: foundBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
new zui.Tooltip('#legacyBugTip', {title: legacyBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
new zui.Tooltip('#activatedBugTip', {title: activatedBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
new zui.Tooltip('#fromCaseBugTip', {title: fromCaseBugTip, trigger: 'hover', placement: 'top', type: 'black', 'className': 'border border-light'});
});
+4 -4
View File
@@ -90,9 +90,9 @@ $lang->testreport->hiddenCase = "隐藏 %s 个用例";
$lang->testreport->goalTip = "该版本所属{$lang->execution->common}的描述信息";
$lang->testreport->bugSummary = <<<EOD
共发现<strong>%s</strong>个Bug <i class='icon icon-help text-warning' data-toggle='tooltip' id='foundBugTip'></i>,
遗留<strong>%s</strong>个Bug <i class='icon icon-help text-warning' data-toggle='tooltip' id='legacyBugTip'></i>。
重新激活<strong>%s</strong>个Bug <i class='icon icon-help text-warning' data-toggle='tooltip' id='activatedBugTip'></i>。
用例执行产生<strong>%s</strong>个Bug <i class='icon icon-help text-warning' data-toggle='tooltip' id='fromCaseBugTip'></i>。
共发现<strong>%s</strong>个Bug <i class='icon icon-help text-light' data-toggle='tooltip' id='foundBugTip'></i>,
遗留<strong>%s</strong>个Bug <i class='icon icon-help text-light' data-toggle='tooltip' id='legacyBugTip'></i>。
重新激活<strong>%s</strong>个Bug <i class='icon icon-help text-light' data-toggle='tooltip' id='activatedBugTip'></i>。
用例执行产生<strong>%s</strong>个Bug <i class='icon icon-help text-light' data-toggle='tooltip' id='fromCaseBugTip'></i>。
有效Bug率(方案为已解决或延期 / 状态为已解决或已关闭):<strong>%s</strong>,用例发现Bug率(用例创建的Bug / 发现Bug数):<strong>%s</strong>
EOD;
+1 -1
View File
@@ -128,7 +128,7 @@ formPanel
'help',
set('data-toggle', 'tooltip'),
set('id', 'goalTip'),
set('class', 'text-warning')
set('class', 'text-light')
),
$execution->desc
)
+2 -2
View File
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
/**
* The create view file of testreport module of ZenTaoPMS.
* The edit view file of testreport module of ZenTaoPMS.
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yuting Wang <wangyuting@easycorp.ltd>
@@ -102,7 +102,7 @@ formPanel
'help',
set('data-toggle', 'tooltip'),
set('id', 'goalTip'),
set('class', 'text-warning')
set('class', 'text-light')
),
$execution->desc
)
+147
View File
@@ -0,0 +1,147 @@
<?php
declare(strict_types=1);
/**
* The view file of testreport module of ZenTaoPMS.
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yuting Wang <wangyuting@easycorp.ltd>
* @package testreport
* @link https://www.zentao.net
*/
namespace zin;
jsVar('goalTip', $lang->testreport->goalTip);
jsVar('foundBugTip', $lang->testreport->foundBugTip);
jsVar('legacyBugTip', $lang->testreport->legacyBugTip);
jsVar('activatedBugTip', $lang->testreport->activatedBugTip);
jsVar('fromCaseBugTip', $lang->testreport->fromCaseBugTip);
detailHeader
(
to::title
(
entityLabel
(
set::entityID($report->id),
set::level(1),
set::text($report->title)
)
)
);
$members = '';
foreach(explode(',', $report->members) as $member) $members .= zget($users, $member) . ' ';
div
(
set::class('detail-body rounded flex gap-1'),
div
(
set::class('col gap-1 grow'),
tabs
(
tabPane
(
set::key('basic'),
set::title($lang->testreport->view),
set::active(true),
sectionList
(
section
(
set::title($lang->testreport->legendBasic),
set::useHtml(true),
tableData
(
item(set::name($lang->testreport->startEnd), $report->begin . ' ~ ' . $report->end),
item(set::name($lang->testreport->owner), zget($users, $report->owner)),
item(set::name($lang->testreport->members), $members),
!empty($execution->desc) ? item
(
set::name($lang->testreport->goal),
icon
(
'help',
set('data-toggle', 'tooltip'),
set('id', 'goalTip'),
set('class', 'text-light')
),
$execution->desc
) : null,
item
(
set::name($lang->testreport->profile),
div
(
div(html($storySummary)),
div(html(sprintf($lang->testreport->buildSummary, empty($builds) ? 1 : count($builds)) . $caseSummary)),
div(html(sprintf($lang->testreport->bugSummary, $bugSummary['foundBugs'], count($legacyBugs), $bugSummary['activatedBugs'], $bugSummary['countBugByTask'], $bugSummary['bugConfirmedRate'] . '%', $bugSummary['bugCreateByCaseRate'] . '%')))
)
),
item(set::name($lang->testreport->legendComment), empty($report->report) ? $lang->testreport->none : $report->report),
)
),
$report->files ? section
(
set::title($lang->files),
fileList
(
set::files($report->files),
set::fieldset(false)
)
) : null,
history()
)
),
tabPane
(
set::key('storyAndBug'),
set::title($lang->testreport->legendStoryAndBug),
tableData
(
)
),
tabPane
(
set::key('tabBuild'),
set::title($lang->testreport->legendBuild),
tableData
(
)
),
tabPane
(
set::key('tabCase'),
set::title($lang->testreport->legendCase),
tableData
(
)
),
tabPane
(
set::key('tabLegacyBugs'),
set::title($lang->testreport->legendLegacyBugs),
tableData
(
)
),
tabPane
(
set::key('tabReport'),
set::title($lang->testreport->legendReport),
tableData
(
)
),
tabPane
(
set::key('legendMore'),
set::title($lang->testreport->tabMore),
tableData
(
)
)
)
)
);
render();