aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts55
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts8
2 files changed, 28 insertions, 35 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
index fa628d4b5..3b42a1ca1 100644
--- a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
@@ -215,15 +215,20 @@ describe('A la carte', function () {
});
});
- it(`VFModule a-la-carte`, () => {
- var timeBomb = new Date('12/09/2018');
- if (new Date() < timeBomb) {
- return;
- }
+ it(`Add ALaCarte VfModule Without LcpRegion Tenant Id And Legacy`, () => {
+ addAlacarteVfmoduleByFlag(true, 'redux-a-la-carte-no-lcp-tenant.json');
+ });
+
+ it(`Add ALaCarte VfModule With LcpRegion Tenant Id And Legacy`, () => {
+ addAlacarteVfmoduleByFlag(false, 'redux-a-la-carte.json');
+ });
+
+ function addAlacarteVfmoduleByFlag (flag: boolean, expectedJsonFile: string) {
cy.readFile('cypress/support/jsonBuilders/mocks/jsons/emptyServiceRedux.json').then((res) => {
cy.setTestApiParamToGR();
res.service.serviceHierarchy['2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd'].service.vidNotions.instantiationType = 'ALaCarte';
res.service.serviceHierarchy['2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd'].service.inputs = null;
+ res.global['flags'] = { 'FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF' : flag };
cy.setReduxState(<any>res);
cy.openIframe('app/ui/#/servicePlanning?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd');
@@ -241,31 +246,30 @@ describe('A la carte', function () {
'2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2',
];
- cy.addALaCarteVfModule(vnfName, vfModulesNames[0], 'mimazepubi', 'hvf6', '', 'AINWebTool-15-D-iftach', false, false, false)
+ cy.addALaCarteVfModule(vnfName, vfModulesNames[0], 'mimazepubi', 'hvf6', '', 'AINWebTool-15-D-iftach', false, false, false, flag)
+ .then(() => {
+ cy.addALaCarteVfModule(vnfName, vfModulesNames[1], 'puwesovabe', 'AAIAIC25', 'my region', 'USP-SIP-IC-24335-T-01', true, true, false, flag)
.then(() => {
- cy.addALaCarteVfModule(vnfName, vfModulesNames[1], 'puwesovabe', 'AAIAIC25', 'my region', 'USP-SIP-IC-24335-T-01', true, true, false)
- .then(() => {
- cy.addALaCarteVfModule(vnfName, vfModulesNames[2], 'bnmgtrx', 'hvf6', '', 'AINWebTool-15-D-iftach', false, false, true)
- .then(() => {
- cy.getReduxState().then((state) => {
- const vfModules = state.service.serviceInstance['2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd'].vnfs[vnfName].vfModules;
- cy.readFile('../vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json').then((file) => {
- for (let vfModulesName of vfModulesNames) {
- const vfModule = vfModules[vfModulesName];
- let vfModuleObject = vfModule[Object.keys(vfModule)[0]];
- file.vnfs[vnfName].vfModules[vfModulesName][vfModulesName].action = "Create";
- cy.deepCompare(vfModuleObject, file.vnfs[vnfName].vfModules[vfModulesName][vfModulesName]);
- }
- });
- });
- });
+ cy.addALaCarteVfModule(vnfName, vfModulesNames[2], 'bnmgtrx', 'hvf6', '', 'AINWebTool-15-D-iftach', false, false, true, flag)
+ .then(() => {
+ cy.getReduxState().then((state) => {
+ const vfModules = state.service.serviceInstance['2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd'].vnfs[vnfName].vfModules;
+ cy.readFile('../vid-automation/src/test/resources/a-la-carte/' + expectedJsonFile).then((file) => {
+ for (let vfModulesName of vfModulesNames) {
+ const vfModule = vfModules[vfModulesName];
+ let vfModuleObject = vfModule[Object.keys(vfModule)[0]];
+ file.vnfs[vnfName].vfModules[vfModulesName][vfModulesName].action = "Create";
+ cy.deepCompare(vfModuleObject, file.vnfs[vnfName].vfModules[vfModulesName][vfModulesName]);
+ }
+ });
});
+ });
});
+ });
});
});
});
- });
-
+ };
function changeServiceEcompNamingToTrue(obj: ServiceModel) {
obj.service.serviceEcompNaming = "true";
@@ -283,8 +287,5 @@ describe('A la carte', function () {
.get('.error').contains(INSTANCE_NAME_NOT_MANDATORY_MESSAGE);
}
-
-
-
});
});
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
index f7419ef33..bb2c01abd 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
@@ -104,16 +104,12 @@ describe('Drawing Board: Instantiation Templates', function () {
cy.editNode("node-c5b26cc1-a66f-4b69-aa23-6abc7c647c88-vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0")
.getElementByDataTestsId("instanceName").should('have.value', 'hvf6arlba007_lba_Base_01')
- .getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
- .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
.getElementByDataTestsId("rollback").should('contain', 'Rollback')
.getElementByDataTestsId("cancelButton").click();
cy.editNode("node-c09e4530-8fd8-418f-9483-2f57ce927b05-vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1")
.getElementByDataTestsId("instanceName").should('have.value', 'my_hvf6arlba007_lba_dj_01')
.getElementByDataTestsId("volumeGroupName").should('have.value', 'my_special_hvf6arlba007_lba_dj_01_vol')
- .getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
- .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
.getElementByDataTestsId("rollback").should('contain', 'Rollback')
.getElementByDataTestsId("sdncPreLoad").should('have.value', 'on')
.getElementByDataTestsId("cancelButton").click();
@@ -156,8 +152,6 @@ describe('Drawing Board: Instantiation Templates', function () {
cy.editNode(`node-c09e4530-8fd8-418f-9483-2f57ce927b05-${module1CustomizationId}`, 1);
cy.clearInput("instanceName");
cy.typeToInput("instanceName", newVfModuleName);
- cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
- cy.selectDropdownOptionByText('tenant', 'DN5242-Nov21-T1');
cy.getElementByDataTestsId('form-set').click();
// Then...
@@ -177,8 +171,6 @@ describe('Drawing Board: Instantiation Templates', function () {
{
instanceName: newVfModuleName,
volumeGroupName: `${newVfModuleName}_vol`,
- lcpCloudRegionId: "hvf6",
- tenantId: "4914ab0ab3a743e58f0eefdacc1dde77",
}
);