From fae75696a03ab5b45bf2ddb329344ab52b2265c5 Mon Sep 17 00:00:00 2001 From: Einat Vinouze Date: Thu, 26 Mar 2020 17:22:01 +0200 Subject: allow LOB multi-selection for vnf - fix cypress Issue-ID: VID-785 Change-Id: I3a11bad5b6da532b23049ce09ea439849143e941 Signed-off-by: Einat Vinouze --- .../cypress/integration/iFrames/ala-carte.e2e.ts | 6 ++++-- .../cypress/integration/iFrames/drawingBoard.e2e.ts | 13 +++++++++---- .../integration/iFrames/instantiation-templates.e2e.ts | 2 +- .../cypress/integration/iFrames/vnf.popup.e2e.ts | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) (limited to 'vid-webpack-master/cypress/integration/iFrames') 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 8f5341c26..4ececb03d 100644 --- a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts @@ -92,6 +92,7 @@ describe('A la carte', function () { 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', @@ -134,7 +135,7 @@ describe('A la carte', function () { 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`); @@ -145,6 +146,7 @@ describe('A la carte', function () { 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) => { @@ -236,7 +238,7 @@ describe('A la carte', function () { 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'; diff --git a/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts index ab1e1644b..63df833ab 100644 --- a/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts @@ -376,7 +376,7 @@ describe('Drawing board', function () { 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(); @@ -397,7 +397,7 @@ describe('Drawing board', function () { 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(); @@ -636,7 +636,9 @@ describe('Drawing board', function () { "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" }, @@ -7368,7 +7370,10 @@ describe('Drawing board', function () { 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(); } 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 8a68a1393..ef907f2af 100644 --- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts @@ -97,8 +97,8 @@ describe('Drawing Board: Instantiation Templates', function () { .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(); diff --git a/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts index 3b56ac085..b05bbe5a5 100644 --- a/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts @@ -80,7 +80,7 @@ describe('Vnf popup', function () { 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`); }) -- cgit 1.2.3-korg