diff options
Diffstat (limited to 'vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts')
-rw-r--r-- | vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts index a5e6fab89..29adfa9e0 100644 --- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts +++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.spec.ts @@ -10,6 +10,8 @@ import {DrawingBoardModes} from "../drawingBoard/service-planning/drawing-board. import {RouterTestingModule} from "@angular/router/testing"; import {of} from "rxjs"; import {UrlTree} from "@angular/router"; +import each from "jest-each"; +import {ServiceAction} from "../shared/models/serviceInstanceActions"; class MockAppStore<T> { @@ -158,6 +160,18 @@ describe('Instantiation Status Service', () => { expect(statusResult.iconClassName).toEqual(UNKNOWN); }); + + each([ + [true, ServiceAction.INSTANTIATE], + [false, ServiceAction.UPDATE], + [false, ServiceAction.DELETE], + ]). + test('isRecreateEnabled: should be %s if action is %s', (expected:boolean, action:ServiceAction) => { + let serviceInfoModel = new ServiceInfoModel(); + serviceInfoModel.action = action; + expect(service.isRecreateEnabled(serviceInfoModel)).toBe(expected); + }); + test('getStatusTooltip should return correct icon per job status', () => { let result : ServiceStatus = service.getStatus('pending'); expect(result.iconClassName).toEqual(PENDING); |