diff options
author | 2020-03-16 21:47:40 +0200 | |
---|---|---|
committer | 2020-03-19 07:51:44 +0200 | |
commit | e4ec69b8a8a179bc095f7e62efc9bbfa94017a5b (patch) | |
tree | 346e206178410f047264c3cb289445ac0ec50e22 /vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts | |
parent | c0c81ece5aee559c9d35c8a9e7c5c24678ae674d (diff) |
set default values in VFM Upgrade popup
Issue-ID: VID-794
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Change-Id: Ic8c896e0eea0535e0e52a394c403c2e167240b47
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts index f456a747a..b141a1e79 100644 --- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts @@ -9,6 +9,7 @@ import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flag import {DropdownFormControl} from "../../../../models/formControlModels/dropdownFormControl.model"; import {FormControlModel, ValidatorOptions} from "../../../../models/formControlModels/formControl.model"; import {ControlGeneratorUtil} from "../control.generator.util.service"; +import each from "jest-each"; describe('Shared Controllers Service', () => { @@ -99,11 +100,19 @@ describe('Shared Controllers Service', () => { expect(lcpRegionControl.isDisabled).toBeFalsy(); }); - test('sdn-preload checkbox is visible', () => { - const instance = {}; - const sdncPreload: FormControlModel = service.getSDNCControl(instance); + each( + [ + [' checked', true, true], + [' not checked', false, false ] + ] + ). + test('sdn-preload checkbox is %s', ( + description: string, checkedByDefault: boolean, expected: boolean + ) => { + const instance = null; + const sdncPreload: FormControlModel = service.getSDNCControl(instance, checkedByDefault); expect (sdncPreload.displayName).toEqual('SDN-C pre-load'); - expect (sdncPreload.value).toBeFalsy(); + expect (sdncPreload.value).toBe(expected); }); test('getlegacyRegion with AAIAIC25 - isVisible true', () => { |