mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
fix tests
This commit is contained in:
parent
a1f5ee501c
commit
96121c6189
@ -665,7 +665,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
}));
|
||||
|
||||
// get previously set up socket messages from resolve
|
||||
if (statusSocket[0].job_status) {
|
||||
if (statusSocket && statusSocket[0] && statusSocket[0].job_status) {
|
||||
$scope.job_status = statusSocket[0].job_status;
|
||||
}
|
||||
if ($scope.job_status === "running" && !$scope.job.elapsed) {
|
||||
@ -709,10 +709,12 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
}
|
||||
}));
|
||||
|
||||
statusSocket[1]();
|
||||
if (statusSocket && statusSocket[1]) {
|
||||
statusSocket[1]();
|
||||
}
|
||||
|
||||
$scope.$on('$destroy', function(){
|
||||
if (statusSocket[1]) {
|
||||
if (statusSocket && statusSocket[1]) {
|
||||
statusSocket[1]();
|
||||
}
|
||||
$( ".JobResultsStdOut-aLineOfStdOut" ).remove();
|
||||
|
||||
@ -15,7 +15,7 @@ module.exports = function(config) {
|
||||
frameworks: [
|
||||
'jasmine',
|
||||
],
|
||||
reporters: ['progress', 'coverage', 'junit'],
|
||||
reporters: ['progress', 'coverage'],
|
||||
files: [
|
||||
'./client/src/app.js',
|
||||
'./node_modules/angular-mocks/angular-mocks.js',
|
||||
|
||||
@ -7,6 +7,10 @@ describe('Controller: jobResultsController', () => {
|
||||
|
||||
let jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTypeChange, ParseVariableString, jobResultsService, eventQueue, $compile, eventResolve, populateResolve, $rScope, q, $log, Dataset, Rest, $state, QuerySet, i18n,fieldChoices, fieldLabels, $interval, workflowResultsService, statusSocket;
|
||||
|
||||
statusSocket = function() {
|
||||
var fn = function() {};
|
||||
return fn;
|
||||
}
|
||||
jobData = {
|
||||
related: {}
|
||||
};
|
||||
@ -70,6 +74,8 @@ describe('Controller: jobResultsController', () => {
|
||||
return jasmine.createSpyObj('workflowResultsService', ['createOneSecondTimer', 'destroyTimer']);
|
||||
});
|
||||
|
||||
$provide.value('statusSocket', statusSocket);
|
||||
|
||||
$provide.value('jobData', jobData);
|
||||
$provide.value('jobDataOptions', jobDataOptions);
|
||||
$provide.value('jobLabels', jobLabels);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user