aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/genericFormPopup
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-11-28 09:53:16 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-11-28 09:53:16 +0200
commit75f630968234a4451948fd7f8803e526748d223d (patch)
treeac553fbdf0d353f06b53e59cd30978a9f66fd537 /vid-webpack-master/src/app/shared/components/genericFormPopup
parentd366b643176e92a701107e81a2fe8839ec2b6d32 (diff)
fix some methods signature to be more TypeScript
Issue-ID: VID-603 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Change-Id: I50225f014abf0717b779f15f22a2185f1f92650b
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericFormPopup')
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts2
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts5
2 files changed, 4 insertions, 3 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts
index 01026867e..bbfe8705e 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts
@@ -40,7 +40,7 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase {
getDynamicInputs = () => null;
- getControls(serviceId: string, vnfStoreKey: string, vfModuleStoreKey: string, isUpdateMode: boolean) {
+ getControls(serviceId: string, vnfStoreKey: string, vfModuleStoreKey: string, isUpdateMode: boolean): FormControlModel[] {
let result: FormControlModel[] =[
this.getRetainAssignmentsControl(),
this.getRetainVolumeGroupsControl(),
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts
index e20964d29..7c1cc084a 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts
@@ -19,6 +19,7 @@ import {instance, mock} from "ts-mockito";
import {GeneralActions} from "../../../../storeUtil/utils/general/general.actions";
import {VfModuleActions} from "../../../../storeUtil/utils/vfModule/vfModule.actions";
import {ServiceActions} from "../../../../storeUtil/utils/service/service.actions";
+import {FormControlModel} from "../../../../models/formControlModels/formControl.model";
class MockModalService<T> {}
@@ -94,13 +95,13 @@ describe('VFModule popup service', () => {
expect(service.getTitle()).toBe("Upgrade Module")
});
- function findControlByName(controls, controlName) {
+ function findControlByName(controls: FormControlModel[], controlName: string) : FormControlModel {
return controls.find((control) => {
return control.controlName === controlName;
});
}
- function getControlByNameAndCheckValue(controlName, expectedValue ) {
+ function getControlByNameAndCheckValue(controlName: string, expectedValue: any) {
const controls = service.getControls('serviceId', 'vnfStoreKey', 'vfModuleId', true);
const control = findControlByName(controls, controlName);
expect(control).toBeDefined();