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 --- .../cypress/support/steps/fill.vfModule.step.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'vid-webpack-master/cypress/support') 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