diff --git a/awx/ui/tests/spec/workflow--results/workflow-results.controller-test.js b/awx/ui/tests/spec/workflow--results/workflow-results.controller-test.js index 13a8683948..a2cbf1a1ef 100644 --- a/awx/ui/tests/spec/workflow--results/workflow-results.controller-test.js +++ b/awx/ui/tests/spec/workflow--results/workflow-results.controller-test.js @@ -99,7 +99,7 @@ describe('Controller: workflowResults', () => { }); }); - describe('job is not running', () => { + describe('job waiting', () => { beforeEach(() => { jobWaitingWorkflowResultsControllerFixture(null, 'waiting'); }); @@ -109,6 +109,16 @@ describe('Controller: workflowResults', () => { }); }); + + describe('job finished', () => { + beforeEach(() => { + jobWaitingWorkflowResultsControllerFixture(moment(), 'successful'); + }); + + it('should start elapsed timer', () => { + expect(workflowResultsService.createOneSecondTimer).not.toHaveBeenCalled(); + }); + }); }); describe('job transitions to running', () => { @@ -122,17 +132,5 @@ describe('Controller: workflowResults', () => { expect(workflowResultsService.createOneSecondTimer).toHaveBeenCalled(); }); }); - - describe('job finished', () => { - beforeEach(() => { - jobWaitingWorkflowResultsControllerFixture(null, 'waiting'); - $rootScope.$broadcast('ws-jobs', { unified_job_id: workflow_job_json.id, status: "running" }); - }); - - it('should start elapsed timer', () => { - expect(scope.workflow.status).toBe("running"); - expect(workflowResultsService.createOneSecondTimer).toHaveBeenCalled(); - }); - }); }); }); \ No newline at end of file