From eed6943814dd8650bcf8499d650374b8b5b8080f Mon Sep 17 00:00:00 2001 From: Sara Weiss Date: Wed, 20 Nov 2019 14:50:33 +0200 Subject: Replace vfmodule: opens an popup Issue-ID: VID-603 Change-Id: I7d7524f75bfb8d6ef949a4f069591c4097d470b4 Signed-off-by: Sara Weiss Signed-off-by: Ittay Stern --- .../integration/iFrames/changeManagement.e2e.ts | 2 +- .../cypress/integration/iFrames/resume.e2e.ts | 2 +- .../integration/iFrames/softDeleteAndResume.e2e.ts | 2 +- .../iFrames/viewEditUpgradeVfModule.e2e.ts | 12 ++++++----- .../jsonBuilders/mocks/jsons/flags.cypress.json | 24 ++++++++++++++++++++++ .../support/jsonBuilders/mocks/jsons/flags.json | 24 ---------------------- .../cypress/support/jsonBuilders/mocks/vid.mock.ts | 2 +- 7 files changed, 35 insertions(+), 33 deletions(-) create mode 100644 vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json delete mode 100644 vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.json (limited to 'vid-webpack-master/cypress') diff --git a/vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts index a48ed4a9f..3c2c9d80c 100644 --- a/vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts @@ -23,7 +23,7 @@ describe('Change management AKA VNF changes', function () { "aai-sub-details") }); - cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.json').then(() => { + cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json').then(() => { cy.server() .route({ method: 'GET', diff --git a/vid-webpack-master/cypress/integration/iFrames/resume.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/resume.e2e.ts index 5857e1ac0..2d4d631b3 100644 --- a/vid-webpack-master/cypress/integration/iFrames/resume.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/resume.e2e.ts @@ -76,7 +76,7 @@ describe('Resume tests', function () { it(`Resume Defect 710619 - with flag FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE is OFF`, function () { - cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.json').then((res) => { + cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json').then((res) => { cy.server() .route({ method: 'GET', diff --git a/vid-webpack-master/cypress/integration/iFrames/softDeleteAndResume.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/softDeleteAndResume.e2e.ts index fccdd53c6..ef1db6864 100644 --- a/vid-webpack-master/cypress/integration/iFrames/softDeleteAndResume.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/softDeleteAndResume.e2e.ts @@ -75,7 +75,7 @@ describe('Soft delete tests', function () { it(`Resume button display in orch status - pendingactivation, assigned - feature FLAG_VF_MODULE_RESUME_STATUS_CREATE - is OFF`, function () { - cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.json').then(() => { + cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json').then(() => { cy.server() .route({ method: 'GET', diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts index f111189fc..4ca39b185 100644 --- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts @@ -111,7 +111,7 @@ describe('View Edit Page: Upgrade VFModule', function () { cy.wait('@expectedPostAsyncInstantiation').then(xhr => { expect(Object(xhr.request.body).action).to.equal("None_Upgrade"); expect(Object(xhr.request.body).vnfs['VNF2_INSTANCE_ID'].action).to.equal("None_Upgrade"); - expect(Object(xhr.request.body).vnfs['VNF2_INSTANCE_ID'].vfModules['dc229cd8-c132-4455-8517-5c1787c18b14']['3ef042c4-259f-45e0-9aba-0989bd8d1cc5'].action).to.equal("None_Upgrade"); + expect(Object(xhr.request.body).vnfs['VNF2_INSTANCE_ID'].vfModules['vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1']['2c1ca484-cbc2-408b-ab86-25a2c15ce280'].action).to.equal("None_Upgrade"); }); }); @@ -206,16 +206,18 @@ describe('View Edit Page: Upgrade VFModule', function () { method: 'GET', status: 200, response: {}, - }).as("expectLatestServiceModelUpgradeVersion") + }).as("expectLatestServiceModelUpgradeVersion"); } - function upgradeTheVFM(treeNodeId = 'node-undefined-dc229cd8-c132-4455-8517-5c1787c18b14'): Chainable { - return cy.getElementByDataTestsId(`${treeNodeId}-menu-btn`).click() + function upgradeTheVFM(treeNodeId = 'node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1') { + cy.getElementByDataTestsId(`${treeNodeId}-menu-btn`).click() .drawingBoardTreeClickOnContextMenuOptionByName("Upgrade"); + // The following is needed when enabling FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS + cy.getElementByDataTestsId('form-set').click(); } function undoUpgradeForVFM() { - cy.getElementByDataTestsId('node-undefined-dc229cd8-c132-4455-8517-5c1787c18b14-menu-btn').click() + cy.getElementByDataTestsId('node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1-menu-btn').click() .drawingBoardTreeClickOnContextMenuOptionByName("Undo Upgrade"); } diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json new file mode 100644 index 000000000..40b37cbc9 --- /dev/null +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json @@ -0,0 +1,24 @@ +{ + "CREATE_INSTANCE_TEST": false, + "EMPTY_DRAWING_BOARD_TEST": false, + "FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false, + "FLAG_ADD_MSO_TESTAPI_FIELD": true, + "FLAG_SERVICE_MODEL_CACHE": false, + "FLAG_SHOW_ASSIGNMENTS": true, + "FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true, + "FLAG_DEFAULT_VNF": true, + "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true, + "FLAG_A_LA_CARTE_AUDIT_INFO": true, + "FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST": true, + "FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS": true, + "FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE": true, + "FLAG_1902_NEW_VIEW_EDIT": true, + "FLAG_VF_MODULE_RESUME_STATUS_CREATE": true, + "FLAG_1906_COMPONENT_INFO": true, + "FLAG_1908_RESUME_MACRO_SERVICE": true, + "FLAG_ENABLE_WEBPACK_MODERN_UI": true, + "FLAG_FLASH_REPLACE_VF_MODULE": true, + "FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT": true, + "FLAG_1911_INSTANTIATION_ORDER_IN_ASYNC_ALACARTE": false, + "FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS": true +} diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.json deleted file mode 100644 index 5dd02cb63..000000000 --- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "CREATE_INSTANCE_TEST": false, - "EMPTY_DRAWING_BOARD_TEST": false, - "FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false, - "FLAG_ADD_MSO_TESTAPI_FIELD": true, - "FLAG_SERVICE_MODEL_CACHE": false, - "FLAG_SHOW_ASSIGNMENTS": true, - "FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true, - "FLAG_DEFAULT_VNF": true, - "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true, - "FLAG_A_LA_CARTE_AUDIT_INFO": true, - "FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST": true, - "FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS": true, - "FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE": true, - "FLAG_1902_NEW_VIEW_EDIT": true, - "FLAG_VF_MODULE_RESUME_STATUS_CREATE": true, - "FLAG_1906_COMPONENT_INFO": true, - "FLAG_1908_RESUME_MACRO_SERVICE": true, - "FLAG_ENABLE_WEBPACK_MODERN_UI": true, - "FLAG_FLASH_REPLACE_VF_MODULE": true, - "FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT": true, - "FLAG_1911_INSTANTIATION_ORDER_IN_ASYNC_ALACARTE": false, - "FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS" : false -} diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts b/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts index 6fff0bc2d..2569556e2 100644 --- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts @@ -43,7 +43,7 @@ function initCategoryParameter(response? : JSON) : void { } function initFlags(response? : JSON, delay?: number, status?: number) : void { - cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.json').then((res) => { + cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json').then((res) => { cy.server() .route({ method: 'GET', -- cgit 1.2.3-korg