mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
fixing unit test failures
This commit is contained in:
@@ -110,7 +110,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
$scope.hideTraceback = false;
|
$scope.hideTraceback = false;
|
||||||
|
|
||||||
toDestroy.push($scope.$watch('job.job_explanation', function(explanation) {
|
toDestroy.push($scope.$watch('job.job_explanation', function(explanation) {
|
||||||
if (explanation.split(":")[0] === "Previous Task Failed") {
|
if (explanation && explanation.split(":")[0] === "Previous Task Failed") {
|
||||||
$scope.previousTaskFailed = true;
|
$scope.previousTaskFailed = true;
|
||||||
var taskObj = JSON.parse(explanation.substring(explanation.split(":")[0].length + 1));
|
var taskObj = JSON.parse(explanation.substring(explanation.split(":")[0].length + 1));
|
||||||
// return a promise from the options request with the permission type choices (including adhoc) as a param
|
// return a promise from the options request with the permission type choices (including adhoc) as a param
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ describe('Controller: jobResultsController', () => {
|
|||||||
// Setup
|
// Setup
|
||||||
let jobResultsController;
|
let jobResultsController;
|
||||||
|
|
||||||
let jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTypeChange, ParseVariableString, jobResultsService, eventQueue, $compile, eventResolve, populateResolve, $rScope, q, $log, Dataset, Rest, $state, QuerySet, i18n;
|
let jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTypeChange, ParseVariableString, jobResultsService, eventQueue, $compile, eventResolve, populateResolve, $rScope, q, $log, Dataset, Rest, $state, QuerySet, i18n,fieldChoices, fieldLabels;
|
||||||
|
|
||||||
jobData = {
|
jobData = {
|
||||||
related: {}
|
related: {}
|
||||||
@@ -78,6 +78,8 @@ describe('Controller: jobResultsController', () => {
|
|||||||
$provide.value('$state', $state);
|
$provide.value('$state', $state);
|
||||||
$provide.value('QuerySet', QuerySet);
|
$provide.value('QuerySet', QuerySet);
|
||||||
$provide.value('i18n', i18n);
|
$provide.value('i18n', i18n);
|
||||||
|
$provide.value('fieldChoices', fieldChoices);
|
||||||
|
$provide.value('fieldLabels', fieldLabels);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user