Bugfix: pass/not pass filter not work in results-report page 05/50805/2
authorchenjiankun <chenjiankun1@huawei.com>
Mon, 8 Jan 2018 01:45:18 +0000 (01:45 +0000)
committerLeo wang <grakiss.wanglei@huawei.com>
Mon, 22 Jan 2018 01:37:44 +0000 (01:37 +0000)
For now if we click the pass/not pass filter, the user can also
see the not pass/pass data in the page.

Change-Id: I8bf696e615bedbb93714d457b3eb502a4ed1d923
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
(cherry picked from commit e895992dc11f092ee80603e9fd4a3708807e6b61)

cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html

index b552ea4..e363289 100644 (file)
@@ -39,9 +39,9 @@ Test Filters:<br />
                 <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(area)"><span class="glyphicon glyphicon-cog"></a>
+            <a uib-tooltip="view log" ng-click="ctrl.gotoResultLog(area)"><span class="glyphicon glyphicon-cog"></span></a>
             <ul class="list-unstyled" uib-collapse="value.folder">
-                <li ng-repeat="case in value.cases">
+                <li ng-repeat="case in value.cases" ng-if="(ctrl.testStatus=='passed' && ctrl.case_list.indexOf(case) > -1) || (ctrl.testStatus=='not passed' && ctrl.case_list.indexOf(case) == -1) || ctrl.testStatus=='total'">
                     <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>