Merge "Change flagged test reference key"

This commit is contained in:
Jenkins 2015-08-27 08:53:01 +00:00 committed by Gerrit Code Review
commit 9ec72d2b93
3 changed files with 8 additions and 8 deletions

View File

@ -20,7 +20,7 @@ variable 'capabilities'.
<a ng-click="hideTests = !hideTests">Tests ({{getObjectLength(capability.tests)}})</a>
<ul collapse="hideTests">
<li ng-repeat="(testName, testDetails) in capability.tests">
<span ng-class="{'glyphicon glyphicon-flag text-warning': testDetails.flag}" title="{{testDetails.flag.reason}}"></span>
<span ng-class="{'glyphicon glyphicon-flag text-warning': testDetails.flagged}" title="{{testDetails.flagged.reason}}"></span>
{{testName}}
</li>
</ul>

View File

@ -270,13 +270,13 @@ refstackApp.controller('resultsReportController',
// it to the passedTests array.
if ($scope.resultsData.results.indexOf(testId) > -1) {
cap.passedTests.push(testId);
if ('flag' in details) {
if ('flagged' in details) {
cap.passedFlagged.push(testId);
}
}
else {
cap.notPassedTests.push(testId);
if ('flag' in details) {
if ('flagged' in details) {
cap.notPassedFlagged.push(testId);
}
}
@ -366,7 +366,7 @@ refstackApp.controller('resultsReportController',
return ((($scope.schemaVersion === '1.2') &&
(capObj.flagged.indexOf(test) > -1)) ||
(($scope.schemaVersion === '1.3') &&
(capObj.tests[test].flag)));
(capObj.tests[test].flagged)));
};
/**
@ -387,7 +387,7 @@ refstackApp.controller('resultsReportController',
else if (($scope.schemaVersion === '1.3') &&
($scope.isTestFlagged(test, capObj))){
return capObj.tests[test].flag.reason;
return capObj.tests[test].flagged.reason;
}
else {
return '';

View File

@ -329,7 +329,7 @@ describe('Refstack controllers', function () {
'cap_id_1': {
'tests': {
'test_id_1': {
'flag': {
'flagged': {
'action': 'foo',
'date': '2015-03-24',
'reason': 'bar'
@ -380,7 +380,7 @@ describe('Refstack controllers', function () {
capObj = {'tests': {
'test1': {
'flag': {
'flagged': {
'action': 'foo',
'date': '2015-03-24',
'reason': 'bar'
@ -414,7 +414,7 @@ describe('Refstack controllers', function () {
capObj = {'tests': {
'test1': {
'flag': {
'flagged': {
'action': 'foo',
'date': '2015-03-24',
'reason': 'bar'