When off, user is requested to specify LCP-Region and Tenant for each VF Module.
* FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT
- When flag is true the platform will appear as a multi select field, if false the platform will be dropdown list.
+ When flag is true the platform will appear as a multi select field, if false the platform will be limited to a single value.
* FLAG_2006_NETWORK_LOB_MULTI_SELECT
- When flag is true the LOB will appear as a multi select field, if false the platform will be dropdown list.
-
+ When flag is true the LOB will appear as a multi select field, if false the Line Of Business will be limited to a single value.
+ * FLAG_2006_VNF_LOB_MULTI_SELECT
+ When flag is true the LOB will appear as a multi select field, if false the Line Of Business will be limited to a single value.
* FLAG_EXP_USE_FORMAT_PARAMETER_FOR_CM_DASHBOARD
When flag is true VID will use the format=simpleNoTaskInfo parameter in addition to the filter parameter when fetching orchestration requests for the change-management dashboard.
FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT,
FLAG_EXP_USE_FORMAT_PARAMETER_FOR_CM_DASHBOARD,
FLAG_2006_NETWORK_LOB_MULTI_SELECT,
+ FLAG_2006_VNF_LOB_MULTI_SELECT,
;
"\"source\":\"VID\"," +
"\"suppressRollback\":false," +
"\"requestorId\":\"us16807000\"}," +
- "\"lineOfBusiness\":{\"lineOfBusinessName\":\"zzz1\"}," +
+ "\"lineOfBusiness\":{\"lineOfBusinessName\":\"zzz1,ONAP\"}," +
"\"cloudConfiguration\":" +
"{\"lcpCloudRegionId\":\"" + getLcpCloudRegionId() + "\"," +
addCloudOwnerIfNeeded() +
FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT,
FLAG_EXP_USE_FORMAT_PARAMETER_FOR_CM_DASHBOARD,
FLAG_2006_NETWORK_LOB_MULTI_SELECT,
-
+ FLAG_2006_VNF_LOB_MULTI_SELECT,
;
public boolean isActive() {
"legacyRegion": "just another region",
"tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
"platformName": "xxx1,platform",
- "lineOfBusiness": "zzz1",
+ "lineOfBusiness": "zzz1,ONAP",
"instanceParams": [
{}
],
"legacyRegion": "just another region",
"tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
"platformName": "xxx1,platform",
- "lineOfBusiness": "zzz1",
+ "lineOfBusiness": "zzz1,ONAP",
"instanceParams": [
{}
],
it(`VNF a-la-carte`, () => {
cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json').then((res) => {
res['FLAG_2002_VNF_PLATFORM_MULTI_SELECT'] = true;
+ res['FLAG_2006_VNF_LOB_MULTI_SELECT'] = true;
cy.server()
.route({
method: 'GET',
cy.selectDropdownOptionByText('lcpRegion', 'AAIAIC25');
cy.typeToInput("lcpRegionText", "just another region");
cy.selectDropdownOptionByText('tenant', 'USP-SIP-IC-24335-T-01');
- cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
+ cy.selectLobValue('zzz1');
cy.selectPlatformValue(`xxx1`);
cy.getElementByDataTestsId(vnfMenuBtnDataTestId).click({force: true}).then(() => {
cy.getElementByDataTestsId('context-menu-edit').click({force: true});
cy.selectPlatformValue(`platform`);
+ cy.selectLobValue('ONAP');
cy.getElementByDataTestsId('form-set').click({force: true}).then(() => {
cy.getReduxState().then((state) => {
cy.selectDropdownOptionByText('productFamily', 'Emanuel');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
- cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
+ cy.selectLobValue('zzz1');
cy.selectPlatformValue(`xxx1`);
cy.getElementByDataTestsId('form-set').click({force: true}).then(() => {
const vnfName = '2017-488_PASQUALE-vPE 0';
cy.selectDropdownOptionByText('productFamily', 'ERICA');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-testalexandria');
- cy.selectDropdownOptionByText('lineOfBusiness', 'ONAP');
+ cy.selectLobValue('ONAP');
cy.selectPlatformValue(`platform`);
cy.genericFormSubmitForm();
cy.selectDropdownOptionByText('productFamily', 'ERICA');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-testalexandria');
- cy.selectDropdownOptionByText('lineOfBusiness', 'ONAP')
+ cy.selectLobValue('ONAP')
cy.selectPlatformValue(`platform`);
cy.genericFormSubmitForm();
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_1906_COMPONENT_INFO" : false,
"FLAG_2002_VNF_PLATFORM_MULTI_SELECT" : false,
- "FLAG_2002_UNLIMITED_MAX" : true
+ "FLAG_2002_UNLIMITED_MAX" : true,
+ "FLAG_2006_VNF_LOB_MULTI_SELECT" : false,
+
},
"type": "[FLAGS] Update"
},
function editSecondVnf(vnfNode: string) {
cy.drawingBoardTreeOpenContextMenuByElementDataTestId(vnfNode, 1)
.drawingBoardTreeClickOnContextMenuOptionByName('Edit');
- cy.selectDropdownOptionByText('lineOfBusiness', 'ONAP');
+ //uncheck lob value
+ cy.selectLobValue('zzz1');
+ // select a new lob value
+ cy.selectLobValue('ONAP');
cy.genericFormSubmitForm();
}
.getElementByDataTestsId("productFamily").should('contain', 'Emanuel')
.getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
.getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
- .getElementByDataTestsId("lineOfBusiness").should('contain', 'zzz1')
.getElementByDataTestsId("rollback").should('contain', 'Rollback')
+ cy.checkLobValue('zzz1')
cy.checkPlatformValue(`xxx1`)
.getElementByDataTestsId("cancelButton").click();
cy.selectDropdownOptionByText('productFamily', 'Emanuel');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
- cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
+ cy.selectLobValue('zzz1');
cy.selectPlatformValue(`xxx1`);
})
cy.selectDropdownOptionByText('productFamily', 'Emanuel');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
- cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
+ cy.selectLobValue('zzz1');
cy.selectPlatformValue(`xxx1`);
return cy.getElementByDataTestsId('form-set').click({force : true}).then((done)=>{
return done;
result.push(this._sharedControllersService.getLegacyRegion(networkInstance));
result.push(this._sharedControllersService.getTenantControl(serviceId, networkInstance));
result.push(this._sharedControllersService.getPlatformMultiselectControl(networkInstance, result, flags['FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT']));
- result.push(this._sharedControllersService.getMultiSelectLineOfBusinessControl(networkInstance, flags['FLAG_2006_NETWORK_LOB_MULTI_SELECT']));
+ result.push(this._sharedControllersService.getLobMultiselectControl(networkInstance, flags['FLAG_2006_NETWORK_LOB_MULTI_SELECT']));
}
return result;
result.push(this._sharedControllersService.getLegacyRegion(networkInstance));
result.push(this._sharedControllersService.getTenantControl(serviceId, networkInstance));
result.push(this._sharedControllersService.getPlatformMultiselectControl(networkInstance, result, flags['FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT']));
- result.push(this._sharedControllersService.getMultiSelectLineOfBusinessControl(networkInstance, flags['FLAG_2006_NETWORK_LOB_MULTI_SELECT']));
+ result.push(this._sharedControllersService.getLobMultiselectControl(networkInstance, flags['FLAG_2006_NETWORK_LOB_MULTI_SELECT']));
result.push(this._sharedControllersService.getRollbackOnFailureControl(networkInstance));
}
return result;
import {DropdownFormControl} from "../../../../models/formControlModels/dropdownFormControl.model";
import {FormControlModel, ValidatorOptions} from "../../../../models/formControlModels/formControl.model";
import {ControlGeneratorUtil} from "../control.generator.util.service";
+import {MultiselectFormControl} from "../../../../models/formControlModels/multiselectFormControl.model";
import each from "jest-each";
})().then(done).catch(done.fail));
-
-
-
-
test('getLineOfBusinessControl', ()=> {
- const lineOfBusinessControl :DropdownFormControl = service.getLineOfBusinessControl();
- expect(lineOfBusinessControl.name).toEqual('lineOfBusiness');
+ const lineOfBusinessControl :MultiselectFormControl = service.getLobMultiselectControl(undefined, true);
expect(lineOfBusinessControl.controlName).toEqual('lineOfBusiness');
expect(lineOfBusinessControl.displayName).toEqual('Line of business');
- expect(lineOfBusinessControl.dataTestId).toEqual('lineOfBusiness');
+ expect(lineOfBusinessControl.dataTestId).toEqual('multi-lineOfBusiness');
expect(lineOfBusinessControl.placeHolder).toEqual('Select Line Of Business');
expect(lineOfBusinessControl.onInitSelectedField).toEqual(['lineOfBusinessList']);
expect(lineOfBusinessControl.onInit).toBeDefined();
- expect(lineOfBusinessControl.value).toBeNull();
+ expect(lineOfBusinessControl.value).toBe("");
expect(lineOfBusinessControl.validations.find((validation)=> validation.validatorName === ValidatorOptions.required)).toBeDefined();
expect(lineOfBusinessControl.isDisabled).toBeFalsy();
});
private _aaiService : AaiService,
private _basicControlGenerator : ControlGeneratorUtil){}
-
- getLineOfBusinessControl = (instance?: any): DropdownFormControl => {
- return new DropdownFormControl({
- type: FormControlType.DROPDOWN,
- controlName: 'lineOfBusiness',
- displayName: 'Line of business',
- dataTestId: 'lineOfBusiness',
- placeHolder: 'Select Line Of Business',
- isDisabled: false,
- name: "lineOfBusiness",
- value: instance ? instance.lineOfBusiness : null,
- validations: [new ValidatorModel(ValidatorOptions.required, 'is required')],
- onInitSelectedField: ['lineOfBusinessList'],
- onInit: this._basicControlGenerator.getSubscribeInitResult.bind(null, this._aaiService.getCategoryParameters)
- })
- };
-
- getMultiSelectLineOfBusinessControl = (instance: any, isMultiSelected: boolean): MultiselectFormControl => {
- return this.getLobMultiselectControl(instance, isMultiSelected);
- };
-
getTenantControl = (serviceId: string, instance?: any): DropdownFormControl => {
const service = this._store.getState().service.serviceInstance[serviceId];
const globalCustomerId: string = service.globalSubscriberId;
const flags = this.store.getState().global.flags;
if (!_.isNil(vnfModel)) {
+ const isPlatformMultiSelected = flags['FLAG_2002_VNF_PLATFORM_MULTI_SELECT'];
+ const isLobMultiSelected = flags['FLAG_2006_VNF_LOB_MULTI_SELECT'];
+
result.push(this.getInstanceName(vnfInstance, serviceId, vnfName, vnfModel.isEcompGeneratedNaming));
result.push(this._sharedControllersService.getProductFamilyControl(vnfInstance, result, true));
result.push(this._sharedControllersService.getLcpRegionControl(serviceId, vnfInstance, result));
result.push(this._sharedControllersService.getLegacyRegion(vnfInstance));
result.push(this._sharedControllersService.getTenantControl(serviceId, vnfInstance));
- result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, flags['FLAG_2002_VNF_PLATFORM_MULTI_SELECT']));
- result.push(this._sharedControllersService.getLineOfBusinessControl(vnfInstance));
+ result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, isPlatformMultiSelected));
+ result.push(this._sharedControllersService.getLobMultiselectControl(vnfInstance, isLobMultiSelected));
}
return result;
}
let result: FormControlModel[] = [];
const vnfInstance = this._basicControlGenerator.retrieveInstanceIfUpdateMode(this.store,this.getVnfInstance(serviceId, vnfStoreKey));
const vnfModel = new VNFModel(this.store.getState().service.serviceHierarchy[serviceId].vnfs[vnfName]);
+ const flags = this.store.getState().global.flags;
if (!_.isNil(vnfModel)) {
- const flags = this.store.getState().global.flags;
+ const isPlatformMultiSelected = flags['FLAG_2002_VNF_PLATFORM_MULTI_SELECT'];
+ const isLobMultiSelected = flags['FLAG_2006_VNF_LOB_MULTI_SELECT'];
result.push(this.getInstanceName(vnfInstance, serviceId, vnfName, vnfModel.isEcompGeneratedNaming));
result.push(this._sharedControllersService.getProductFamilyControl(vnfInstance, result, true));
result.push(this._sharedControllersService.getLcpRegionControl(serviceId, vnfInstance, result));
result.push(this._sharedControllersService.getLegacyRegion(vnfInstance));
result.push(this._sharedControllersService.getTenantControl(serviceId, vnfInstance));
- result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, flags['FLAG_2002_VNF_PLATFORM_MULTI_SELECT']));
- result.push(this._sharedControllersService.getLineOfBusinessControl(vnfInstance));
+ result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, isPlatformMultiSelected));
+ result.push(this._sharedControllersService.getLobMultiselectControl(vnfInstance,isLobMultiSelected));
result.push(this._sharedControllersService.getRollbackOnFailureControl(vnfInstance));
}
return result;
FLAG_2004_INSTANTIATION_TEMPLATES_POPUP = 'FLAG_2004_INSTANTIATION_TEMPLATES_POPUP',
FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY= 'FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY',
FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF = 'FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF',
+ FLAG_2006_VNF_LOB_MULTI_SELECT= 'FLAG_2006_VNF_LOB_MULTI_SELECT',
+
}
@Injectable()