diff options
author | 2019-11-25 16:36:55 +0200 | |
---|---|---|
committer | 2019-11-26 09:46:47 +0200 | |
commit | 3347f70dcd726595e8eef7f65fb80abf13f62845 (patch) | |
tree | abd4d0d094d518cf3e347ae8372a791f1abe8fc8 /vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/basic.control.generator.spec.ts | |
parent | bda996b9faf9d5d443d2256c0626620bd8104269 (diff) |
Extract getSupplementaryFile out of VFM controller
Issue-ID: VID-603
Change-Id: I8ccc2e3cdc79faded73f5811fee99cc78c8ebd47
Signed-off-by: Amir Skalka <amir.skalka@intl.att.com>
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/basic.control.generator.spec.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/basic.control.generator.spec.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/basic.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/basic.control.generator.spec.ts index fc2eed4ae..8705fa8ff 100644 --- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/basic.control.generator.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/basic.control.generator.spec.ts @@ -5,6 +5,7 @@ import {FeatureFlagsService} from "../../../services/featureFlag/feature-flags.s import {BasicControlGenerator} from "./basic.control.generator"; import {NgRedux} from '@angular-redux/store'; import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; +import {FileFormControl} from "../../../models/formControlModels/fileFormControl.model"; class MockAppStore<T> {} @@ -44,5 +45,13 @@ describe('Basic Control Generator', () => { const legacyRegionControl: FormControlModel = service.getLegacyRegion(instance); expect(legacyRegionControl.isVisible).toBeFalsy(); }); + + test('given instance, get supp file from getSupplementaryFile ', () => { + const instance = {}; + const suppFileForInstance: FileFormControl = service.getSupplementaryFile(instance); + expect(suppFileForInstance.isVisible).toBeTruthy(); + expect(suppFileForInstance.hiddenFile.length).toBeGreaterThanOrEqual(1); + expect(suppFileForInstance.hiddenFile[0].validations[0].validatorName).toEqual("isFileTooBig"); + }); }); |