summaryrefslogtreecommitdiffstats
path: root/cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2017-11-16 09:18:14 +0000
committerLeo wang <grakiss.wanglei@huawei.com>2017-11-27 08:12:11 +0000
commit25e6fc8a5bc2cae8a062076ca460348835846d0a (patch)
tree279aa31975709698463aa65b2fa1fb3d032eb3ea /cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html
parentffe419bf63938be76af7e57ee782ae928a7391f7 (diff)
[cvp-web] Bugfix: Total num of test cases should be fixed
JIRA: DOVETAIL-552 The total num of test cases is decided by the number of the test cases users uploaded to the Web now. The total num should be fixed. For example, the total num of mandatory test cases should be 215. The total num of optional test cases should be 63. Change-Id: I6f7055bbeceb80f831af7d800b1a5aca4e165c45 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html')
-rw-r--r--cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html36
1 files changed, 13 insertions, 23 deletions
diff --git a/cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html b/cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html
index f79ac713..7dc43964 100644
--- a/cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html
+++ b/cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html
@@ -25,37 +25,27 @@ Test Filters:<br />
</div>
</div>
-<uib-accordion-group is-open="isOpen" is-disabled="ctrl.cases == 0">
+<uib-accordion-group ng-repeat="(type,data) in ctrl.data" is-open="isOpen">
<uib-accordion-heading>
- Test ID: {{ ctrl.testId }}
+ {{ type }}: (Total: 3 test areas, {{ ctrl.statistics[type].total }} tests)
<i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': isOpen, 'glyphicon-chevron-right': !isOpen}"></i>
</uib-accordion-heading>
<ol class="capabilities">
- <li ng-repeat="testcase in ctrl.cases" ng-show="(ctrl.testStatus == 'passed' && testcase.pass != 0) || (ctrl.testStatus == 'not passed' && testcase.fail != 0) || ctrl.testStatus == 'total'">
+ <li ng-repeat="(area, value) in data" ng-show="(ctrl.testStatus == 'passed' && value.pass != 0) || (ctrl.testStatus == 'not passed' && value.fail != 0) || ctrl.testStatus == 'total'">
- <a ng-click="testcase.folder = !testcase.folder">
- {{ testcase.build_tag.split('-').pop() }}
- <span ng-if="ctrl.testStatus == 'total'" ng-class="{'text-success': testcase.total == testcase.pass, 'text-warning': (testcase.pass < testcase.total && testcase.pass > 0), 'text-danger': testcase.pass == 0}">[{{ testcase.pass }}/{{ testcase.total }}]</span>
- <span ng-if="ctrl.testStatus == 'passed'" class="text-success">[{{ testcase.pass }}]</span>
- <span ng-if="ctrl.testStatus == 'not passed'" class="text-danger">[{{ testcase.fail }}]</span>
+ <a ng-click="value.folder = !value.folder">
+ {{ area }}
+ <span ng-if="ctrl.testStatus == 'total'" ng-class="{'text-success': value.total == value.pass, 'text-warning': (value.pass < value.total && value.pass > 0), 'text-danger': value.pass == 0}">[{{ value.pass }}/{{ value.total }}]</span>
+ <span ng-if="ctrl.testStatus == 'passed'" class="text-success">[{{ value.pass }}]</span>
+ <span ng-if="ctrl.testStatus == 'not passed'" class="text-danger">[{{ value.fail }}]</span>
</a>
- <a uib-tooltip="view log" ng-click="ctrl.gotoResultLog(testcase.build_tag.split('-').pop())"><span class="glyphicon glyphicon-cog"></a>
- <ul class="list-unstyled" uib-collapse="testcase.folder">
- <li ng-if="!testcase.details.success">
- <span ng-class="{'glyphicon glyphicon-ok text-success':testcase.criteria == 'PASS'}" aria-hidden="true"></span>
- <span ng-class="{'glyphicon glyphicon-remove text-warning':testcase.criteria != 'PASS'}"></span>
- {{ testcase.case_name }}
+ <a uib-tooltip="view log" ng-click="ctrl.gotoResultLog(area)"><span class="glyphicon glyphicon-cog"></a>
+ <ul class="list-unstyled" uib-collapse="value.folder">
+ <li ng-repeat="case in value.cases">
+ <span ng-class="{'glyphicon glyphicon-ok text-success':ctrl.case_list.indexOf(case) > -1, 'glyphicon glyphicon-remove text-warning':ctrl.case_list.indexOf(case) == -1}" aria-hidden="true"></span>
+ <a ng-click="ctrl.gotoDoc(case)">{{ case }}</a>
</li>
- <li ng-repeat="sub in testcase.details.success" ng-if="testcase.details.success && ctrl.testStatus != 'not passed'">
- <span class="glyphicon glyphicon-ok text-success" aria-hidden="true"></span>
- <a ng-click="ctrl.gotoDoc(sub)">{{ sub }}</a>
- </li>
-
- <li ng-repeat="sub in testcase.details.errors" ng-if="testcase.details.errors && ctrl.testStatus != 'passed'">
- <span class="glyphicon glyphicon-remove text-warning"></span>
- <a ng-click="ctrl.gotoDoc(sub)">{{ sub }}</a>
- </li>
</ul>
</li>
</ol>