mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
add job finished test
This commit is contained in:
parent
f62b6ca014
commit
8b40cb14ec
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user