From 874ef1ce4fa0228c720c704a4354d52021ecf2fe Mon Sep 17 00:00:00 2001 From: Alexey Sandler Date: Mon, 10 Feb 2020 12:05:01 +0200 Subject: create tests to add vfmodule in ala carte instance Issue-ID: VID-758 Signed-off-by: Alexey Sandler Change-Id: I7d4afa05d34cd28ff7118e320f67ef68d6a60e60 --- .../a-la-carte/redux-a-la-carte-no-lcp-tenant.json | 84 ++++++++++++++++++++++ .../cypress/integration/iFrames/ala-carte.e2e.ts | 3 - .../cypress/support/steps/fill.vfModule.step.ts | 12 ++-- 3 files changed, 91 insertions(+), 8 deletions(-) create mode 100644 vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-lcp-tenant.json diff --git a/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-lcp-tenant.json b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-lcp-tenant.json new file mode 100644 index 000000000..a38469e92 --- /dev/null +++ b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-lcp-tenant.json @@ -0,0 +1,84 @@ +{ + "vnfs": { + "2017-488_PASQUALE-vPE 0": { + "action": "Create", + "rollbackOnFailure": "true", + "vfModules": { + "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0": { + "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0": { + "instanceName": "mimazepubi", + "rollbackOnFailure": "false", + "sdncPreLoad": false, + "instanceParams": [ + {} + ], + "modelInfo": { + "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091", + "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db", + "modelName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0", + "modelVersion": "5", + "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3", + "modelUniqueId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3", + "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0", + "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db" + }, + "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db", + "isMissingData": false + } + }, + "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1": { + "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1": { + "instanceName": "puwesovabe", + "volumeGroupName": "puwesovabe_vol", + "rollbackOnFailure": "true", + "sdncPreLoad": true, + "instanceParams": [ + { + "pasqualevpe0_bandwidth": "10", + "2017488_pasqualevpe0_vnf_instance_name": "mtnj309me6", + "2017488_pasqualevpe0_vnf_config_template_version": "17.2", + "2017488_pasqualevpe0_AIC_CLLI": "ATLMY8GA", + "pasqualevpe0_bandwidth_units": "Gbps" + } + ], + "modelInfo": { + "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1", + "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5", + "modelName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1", + "modelVersion": "6", + "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401", + "modelUniqueId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401", + "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1", + "uuid": "25284168-24bb-4698-8cb4-3f509146eca5" + }, + "uuid": "25284168-24bb-4698-8cb4-3f509146eca5", + "isMissingData": false + } + }, + "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2": { + "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2": { + "instanceName": "bnmgtrx", + "volumeGroupName": "", + "rollbackOnFailure": "false", + "sdncPreLoad": false, + "instanceParams": [ + {} + ], + "modelInfo": { + "modelInvariantId": "eff8cc59-53a1-4101-aed7-8cf24ecf8339", + "modelVersionId": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a", + "modelName": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2", + "modelVersion": "6", + "modelCustomizationId": "3cd946bb-50e0-40d8-96d3-c9023520b557", + "modelUniqueId": "3cd946bb-50e0-40d8-96d3-c9023520b557", + "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2", + "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a" + }, + "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a", + "isMissingData": false + } + } + } + } + } +} \ No newline at end of file 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..ba27d41df 100644 --- a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts @@ -283,8 +283,5 @@ describe('A la carte', function () { .get('.error').contains(INSTANCE_NAME_NOT_MANDATORY_MESSAGE); } - - - }); }); diff --git a/vid-webpack-master/cypress/support/steps/fill.vfModule.step.ts b/vid-webpack-master/cypress/support/steps/fill.vfModule.step.ts index b87e773f9..cfb8a050a 100644 --- a/vid-webpack-master/cypress/support/steps/fill.vfModule.step.ts +++ b/vid-webpack-master/cypress/support/steps/fill.vfModule.step.ts @@ -34,7 +34,7 @@ function addMacroVfModule(vnfName: string, vfModuleName: string, instanceName: s } function addALaCarteVfModule(vnfName: string, vfModuleName: string, instanceName: string, lcpRegion: string, legacyRegion: string, - tenant: string, rollback: boolean, sdncPreLoad: boolean, deleteVgName: boolean): Chainable { + tenant: string, rollback: boolean, sdncPreLoad: boolean, deleteVgName: boolean, flag: boolean): Chainable { return cy.getElementByDataTestsId('node-' + vnfName).click({force: true}).then(() => { cy.getElementByDataTestsId('node-' + vfModuleName + '-add-btn').click({force: true}).then(() => { cy.getElementByDataTestsId('instanceName').clear().type(instanceName, {force: true}).then(() => { @@ -42,11 +42,13 @@ function addALaCarteVfModule(vnfName: string, vfModuleName: string, instanceName cy.getElementByDataTestsId('volumeGroupName').clear(); } }).then(() => { - cy.selectDropdownOptionByText('lcpRegion', lcpRegion); - if (legacyRegion) { - cy.typeToInput("lcpRegionText", legacyRegion); + if(!flag) { + cy.selectDropdownOptionByText('lcpRegion', lcpRegion); + if (legacyRegion) { + cy.typeToInput("lcpRegionText", legacyRegion); + } + cy.selectDropdownOptionByText('tenant', tenant); } - cy.selectDropdownOptionByText('tenant', tenant); cy.selectDropdownOptionByText('rollback', String(rollback)); if (sdncPreLoad) { cy.getElementByDataTestsId('sdncPreLoad').check(); -- cgit 1.2.3-korg