aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master
diff options
context:
space:
mode:
authorAlexey Sandler <alexey.sandler@intl.att.com>2020-02-10 14:49:11 +0200
committerAlexey Sandler <alexey.sandler@intl.att.com>2020-02-10 15:30:44 +0200
commit9d4ddaa11bf071ff359829856d0bf04e3c25139e (patch)
tree0eb3892262f05c4dfd426e2916cad6549a20069f /vid-webpack-master
parentb1d54f8b25822b9d648eb76d6d9251131d484edf (diff)
fix tests vfmodule in ala carte instance
Issue-ID: VID-758 Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com> Change-Id: Ieb59dddbbf68c36c4df2b9c1e7582958974745c2 Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-webpack-master')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts52
1 files changed, 28 insertions, 24 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 ba27d41df..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";