Merge "Handle the cases guideline download failure with Test list download."

This commit is contained in:
Jenkins
2016-04-04 19:48:51 +00:00
committed by Gerrit Code Review

View File

@@ -189,6 +189,9 @@
* the selected status(es). * the selected status(es).
*/ */
function getTestList() { function getTestList() {
if (!ctrl.guidelines) {
return;
}
var caps = ctrl.guidelines.capabilities; var caps = ctrl.guidelines.capabilities;
var tests = []; var tests = [];
angular.forEach(ctrl.targetCapabilities, angular.forEach(ctrl.targetCapabilities,
@@ -226,6 +229,9 @@
return ctrl.getTestList(); return ctrl.getTestList();
}, },
version: function () { version: function () {
if (!ctrl.version) {
return;
}
return ctrl.version.slice(0, -5); return ctrl.version.slice(0, -5);
}, },
status: function () { status: function () {
@@ -276,6 +282,9 @@
* tests list separated by newlines. * tests list separated by newlines.
*/ */
function getTestListString() { function getTestListString() {
if (!ctrl.tests) {
return;
}
return ctrl.tests.sort().join('\n'); return ctrl.tests.sort().join('\n');
} }