diff options
author | 2019-12-18 21:04:38 +0200 | |
---|---|---|
committer | 2019-12-22 14:01:45 +0200 | |
commit | 4c87ecaa8cce40f078f8540a15928e7e805e4ef7 (patch) | |
tree | f31c55200451d13f108c8583b8d275ae7a7c8bab /vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts | |
parent | 54af5cdca044c7b486f02f4163d16c39e990f701 (diff) |
Refactor Generic Generators
Issue-ID: VID-731
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Change-Id: Ib851ff4056d64e12eaf415c5d689c832196ec8b0
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts index 28d49d51b..018130eec 100644 --- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts @@ -2,17 +2,16 @@ import {getTestBed, TestBed} from '@angular/core/testing'; import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; import {NgRedux} from '@angular-redux/store'; import {FormControlNames} from "../service.control.generator"; -import {BasicControlGenerator} from "../basic.control.generator"; +import {ControlGeneratorUtil} from "../control.generator.util.service"; import {AaiService} from "../../../../services/aaiService/aai.service"; import {GenericFormService} from "../../generic-form.service"; import {FormBuilder} from "@angular/forms"; import {FormControlModel, ValidatorModel, ValidatorOptions} from "../../../../models/formControlModels/formControl.model"; import {LogService} from "../../../../utils/log/log.service"; import {VnfControlGenerator} from "./vnf.control.generator"; -import {Observable} from "rxjs"; -import {SelectOption} from "../../../../models/selectOption"; import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service"; import {FormControlType} from "../../../../models/formControlModels/formControlTypes.enum"; +import {SharedControllersService} from "../sharedControlles/shared.controllers.service"; class MockAppStore<T> { getState(){ @@ -918,7 +917,8 @@ describe('VNF Control Generator', () => { imports: [HttpClientTestingModule], providers: [VnfControlGenerator, GenericFormService, - BasicControlGenerator, + ControlGeneratorUtil, + SharedControllersService, AaiService, FormBuilder, LogService, @@ -1053,15 +1053,5 @@ describe('VNF Control Generator', () => { const instanceNameValidator: ValidatorModel = instanceNameControl.validations.find(val => val.validatorName === ValidatorOptions.pattern); expect(instanceNameValidator.validatorArg).toEqual(/^[a-zA-Z0-9._-]*$/); }); - - test('rollback should return observable of true, false', () => { - let result : Observable<SelectOption[]> = service.getRollBackOnFailureOptions(); - result.subscribe((val)=>{ - expect(val).toEqual([ - new SelectOption({id: 'true', name: 'Rollback'}), - new SelectOption({id: 'false', name: 'Don\'t Rollback'}) - ]); - }); - }); }); |