summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress/integration')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts115
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts2
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/collectionResource.e2e.ts5
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts86
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts138
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts110
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts100
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts3
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts5
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/resume.e2e.ts27
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts8
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/softDeleteAndResume.e2e.ts3
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts34
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts2
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts7
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts5
16 files changed, 476 insertions, 174 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 57c673262..fa628d4b5 100644
--- a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
@@ -2,7 +2,6 @@
/// <reference types="Cypress" />
import {JsonBuilder} from '../../support/jsonBuilders/jsonBuilder';
import {ServiceModel} from '../../support/jsonBuilders/models/service.model';
-import * as _ from 'lodash';
describe('A la carte', function () {
describe('check service name', () => {
@@ -14,15 +13,15 @@ describe('A la carte', function () {
const CONFIRM_BUTTON: string = 'confirmButton';
beforeEach(() => {
- cy.clearSessionStorage();
- cy.setReduxState();
- cy.preventErrorsOnLoading();
- cy.initAAIMock();
- cy.initVidMock();
- cy.mockLatestVersionForService(SERVICE_ID, SERVICE_INVARIANT_ID);
- cy.initAlaCarteService();
- cy.initZones();
- cy.login();
+ cy.clearSessionStorage();
+ cy.setReduxState();
+ cy.preventErrorsOnLoading();
+ cy.initAAIMock();
+ cy.initVidMock();
+ cy.mockLatestVersionForService(SERVICE_ID, SERVICE_INVARIANT_ID);
+ cy.initAlaCarteService();
+ cy.initZones();
+ cy.login();
});
afterEach(() => {
@@ -30,8 +29,7 @@ describe('A la carte', function () {
});
-
- it(`service name should be mandatory : serviceEcompNaming = true`, ()=> {
+ it(`service name should be mandatory : serviceEcompNaming = true`, () => {
cy.readFile('cypress/support/jsonBuilders/mocks/jsons/basicService.json').then((res) => {
jsonBuilderAAIService.basicJson(res,
Cypress.config('baseUrl') + '/rest/models/services/' + SERVICE_ID,
@@ -43,13 +41,13 @@ describe('A la carte', function () {
});
});
- it(`Service a-la-carte`, ()=> {
+ it(`Service a-la-carte`, () => {
- const subscriptionServiceType : string = "TYLER SILVIA";
- const owningEntityName : string = "WayneHolland";
- const rollbackOnFailure : string = "true";
- const projectName : string = "WATKINS";
- const instanceName : string = "serviceInstanceName";
+ const subscriptionServiceType: string = "TYLER SILVIA";
+ const owningEntityName: string = "WayneHolland";
+ const rollbackOnFailure: string = "true";
+ const projectName: string = "WATKINS";
+ const instanceName: string = "serviceInstanceName";
cy.readFile('cypress/support/jsonBuilders/mocks/jsons/emptyServiceRedux.json').then((res) => {
cy.setTestApiParamToGR();
@@ -91,8 +89,20 @@ 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;
+ cy.server()
+ .route({
+ method: 'GET',
+ delay: 0,
+ status: 200,
+ url: Cypress.config('baseUrl') + "/flags**",
+ response: res
+ }).as('initFlags with multi select');
+ });
+
- it(`VNF a-la-carte`, ()=> {
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';
@@ -119,31 +129,42 @@ describe('A la carte', function () {
cy.get('#quantity-select').should('have.attr', 'disabled');
cy.getElementByDataTestsId('form-set').click({force: true}).then(() => {
cy.getElementByDataTestsId('node-2017-488_PASQUALE-vPE 0-add-btn').click({force: true}).then(() => {
+
cy.selectDropdownOptionByText('productFamily', 'Emanuel');
cy.selectDropdownOptionByText('lcpRegion', 'AAIAIC25');
cy.typeToInput("lcpRegionText", "just another region");
cy.selectDropdownOptionByText('tenant', 'USP-SIP-IC-24335-T-01');
cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
- cy.selectDropdownOptionByText('platform', 'xxx1');
+
+ cy.selectPlatformValue('xxx1');
+
cy.getElementByDataTestsId('form-set').click({force: true}).then(() => {
- cy.getReduxState().then((state) => {
-
- const vnf = state.service.serviceInstance['2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd'].vnfs['2017-488_PASQUALE-vPE 0'];
- cy.readFile('../vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json').then((file) => {
- file.vnfs['2017-488_PASQUALE-vPE 0'].trackById = vnf.trackById;
- file.vnfs['2017-488_PASQUALE-vPE 0'].vfModules = {};
- file.vnfs['2017-488_PASQUALE-vPE 0'].upgradedVFMSonsCounter = 0;
- cy.deepCompare(vnf, file.vnfs['2017-488_PASQUALE-vPE 0'])
+
+ const vnfMenuBtnDataTestId = 'node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_PASQUALE-vPE 0-menu-btn';
+
+ cy.getElementByDataTestsId(vnfMenuBtnDataTestId).click({force: true}).then(() => {
+ cy.getElementByDataTestsId('context-menu-edit').click({force: true});
+ cy.selectPlatformValue('platform');
+ cy.getElementByDataTestsId('form-set').click({force: true}).then(() => {
+ cy.getReduxState().then((state) => {
+
+ const vnf = state.service.serviceInstance['2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd'].vnfs['2017-488_PASQUALE-vPE 0'];
+ cy.readFile('../vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json').then((file) => {
+ file.vnfs['2017-488_PASQUALE-vPE 0'].trackById = vnf.trackById;
+ file.vnfs['2017-488_PASQUALE-vPE 0'].vfModules = {};
+ file.vnfs['2017-488_PASQUALE-vPE 0'].upgradedVFMSonsCounter = 0;
+ cy.deepCompare(vnf, file.vnfs['2017-488_PASQUALE-vPE 0'])
+ });
+ });
});
});
});
-
});
});
});
});
- it(`Network a-la-carte`, ()=> {
+ it(`Network a-la-carte`, () => {
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';
@@ -173,6 +194,7 @@ describe('A la carte', function () {
cy.setReduxState(<any>res);
cy.openIframe('app/ui/#/servicePlanning?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd');
cy.getElementByDataTestsId("node-ExtVL 0-add-btn").click({force: true});
+
cy.selectDropdownOptionByText("platform", "xxx1");
cy.selectDropdownOptionByText("lcpRegion", "AAIAIC25");
cy.selectDropdownOptionByText("tenant", "USP-SIP-IC-24335-T-01");
@@ -193,7 +215,7 @@ describe('A la carte', function () {
});
});
- it(`VFModule a-la-carte`, ()=> {
+ it(`VFModule a-la-carte`, () => {
var timeBomb = new Date('12/09/2018');
if (new Date() < timeBomb) {
return;
@@ -210,7 +232,7 @@ describe('A la carte', function () {
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
- cy.selectDropdownOptionByText('platform', 'xxx1');
+ cy.selectPlatformValue('xxx1');
cy.getElementByDataTestsId('form-set').click({force: true}).then(() => {
const vnfName = '2017-488_PASQUALE-vPE 0';
let vfModulesNames: Array<string> = [
@@ -219,11 +241,11 @@ describe('A la carte', function () {
'2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2',
];
- addVfModule(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)
.then(() => {
- addVfModule(vnfName, vfModulesNames[1], 'puwesovabe', 'AAIAIC25', 'my region', 'USP-SIP-IC-24335-T-01', true, true, false)
+ cy.addALaCarteVfModule(vnfName, vfModulesNames[1], 'puwesovabe', 'AAIAIC25', 'my region', 'USP-SIP-IC-24335-T-01', true, true, false)
.then(() => {
- addVfModule(vnfName, vfModulesNames[2], 'bnmgtrx', 'hvf6', '', 'AINWebTool-15-D-iftach', false, false, true)
+ 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;
@@ -261,28 +283,7 @@ describe('A la carte', function () {
.get('.error').contains(INSTANCE_NAME_NOT_MANDATORY_MESSAGE);
}
- function addVfModule (vnfName: string, vfModuleName: string, instanceName: string, lcpRegion: string, legacyRegion: string, tenant: string, rollback: boolean, sdncPreLoad: boolean, deleteVgName: boolean): Chainable<any> {
- 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(() => {
- if (deleteVgName) {
- cy.getElementByDataTestsId('volumeGroupName').clear();
- }
- }).then(() => {
- cy.selectDropdownOptionByText('lcpRegion', lcpRegion);
- if (!_.isEmpty(legacyRegion)) {
- cy.typeToInput("lcpRegionText", legacyRegion);
- }
- cy.selectDropdownOptionByText('tenant', tenant);
- cy.selectDropdownOptionByText('rollback', String(rollback));
- if (sdncPreLoad) {
- cy.getElementByDataTestsId('sdncPreLoad').check();
- }
- cy.getElementByDataTestsId('form-set').click({force: true});
- });
- });
- });
- }
+
});
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/collectionResource.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/collectionResource.e2e.ts
index a9649fa99..55c43d01b 100644
--- a/vid-webpack-master/cypress/integration/iFrames/collectionResource.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/collectionResource.e2e.ts
@@ -1586,14 +1586,11 @@ describe('Drawing board : Collection resource', function () {
"FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST": true,
"FLAG_SHOW_VERIFY_SERVICE": true,
"FLAG_1902_NEW_VIEW_EDIT": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_1906_INSTANTIATION_API_USER_VALIDATION": true,
"FLAG_EXP_CREATE_RESOURCES_IN_PARALLEL": false,
"FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS": true,
"FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
- "FLAG_DEFAULT_VNF": true,
- "FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE": true,
"FLAG_ASYNC_ALACARTE_VFMODULE": true,
"FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
"FLAG_ASYNC_ALACARTE_VNF": true,
@@ -1602,8 +1599,6 @@ describe('Drawing board : Collection resource', function () {
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_1902_RETRY_JOB": true,
"FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI": true,
- "CREATE_INSTANCE_TEST": false,
- "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true,
"FLAG_1906_AAI_SUB_DETAILS_REDUCE_DEPTH": true,
"FLAG_VF_MODULE_RESUME_STATUS_CREATE": true,
"FLAG_SUPPLEMENTARY_FILE": true,
diff --git a/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
index e379f7835..133dbe72a 100644
--- a/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
@@ -17,6 +17,22 @@ describe('Drawing board', function () {
cy.screenshot();
});
+ function addSameVnfMultipleTimes() {
+ cy.openIframe('app/ui/#/servicePlanning?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd');
+ const vnfNodeName = 'node-2017-488_PASQUALE-vPE 0';
+ cy.drawingBoardPressAddButtonByElementName(vnfNodeName).get('i').should('have.class', 'fa-plus-circle');
+ cy.drawingBoardPressAddButtonByElementName(vnfNodeName).click({force: true});
+ cy.fillVnfPopup(true).then(() => {
+ cy.drawingBoardPressAddButtonByElementName(vnfNodeName).click({force: true});
+ cy.fillVnfPopup().then(() => {
+ cy.drawingBoardPressAddButtonByElementName(vnfNodeName).click({force: true});
+ cy.fillVnfPopup().then(() => {
+ cy.drawingBoardNumberOfExistingElementsShouldContains(3);
+ });
+ });
+ });
+ }
+
describe('duplicate', () => {
it('delete vf module reduce the number of vf modules ', function () {
@@ -25,7 +41,7 @@ describe('Drawing board', function () {
cy.openIframe('app/ui/#/servicePlanning?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd');
cy.drawingBoardPressAddButtonByElementName('node-2017-488_PASQUALE-vPE 0').get('i').should('have.class', 'fa-plus-circle');
cy.drawingBoardPressAddButtonByElementName('node-2017-488_PASQUALE-vPE 0').click({force: true});
- cy.fillVnfPopup().then(() => {
+ cy.fillVnfPopup(true).then(() => {
cy.drawingBoardPressAddButtonByElementName('node-2017-488_PASQUALE-vPE 0').click({force: true});
cy.fillVnfPopup().then(() => {
cy.drawingBoardNumberOfExistingElementsShouldContains(2);
@@ -40,18 +56,7 @@ describe('Drawing board', function () {
it('create new vf module update the number of vf modules ', () => {
cy.readFile('cypress/support/jsonBuilders/mocks/jsons/emptyServiceRedux.json').then((res) => {
cy.setReduxState(<any>res);
- cy.openIframe('app/ui/#/servicePlanning?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd');
- cy.drawingBoardPressAddButtonByElementName('node-2017-488_PASQUALE-vPE 0').get('i').should('have.class', 'fa-plus-circle');
- cy.drawingBoardPressAddButtonByElementName('node-2017-488_PASQUALE-vPE 0').click({force: true});
- cy.fillVnfPopup().then(() => {
- cy.drawingBoardPressAddButtonByElementName('node-2017-488_PASQUALE-vPE 0').click({force: true});
- cy.fillVnfPopup().then(() => {
- cy.drawingBoardPressAddButtonByElementName('node-2017-488_PASQUALE-vPE 0').click({force: true});
- cy.fillVnfPopup().then(() => {
- cy.drawingBoardNumberOfExistingElementsShouldContains(3);
- });
- });
- });
+ addSameVnfMultipleTimes();
});
});
@@ -61,7 +66,7 @@ describe('Drawing board', function () {
cy.openIframe('app/ui/#/servicePlanning?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd');
cy.drawingBoardPressAddButtonByElementName('node-2017-488_PASQUALE-vPE 0').get('i').should('have.class', 'fa-plus-circle')
.drawingBoardPressAddButtonByElementName('node-2017-488_PASQUALE-vPE 0').click({force: true});
- cy.fillVnfPopup().then(() => {
+ cy.fillVnfPopup(true).then(() => {
cy.drawingBoardTreeOpenContextMenuByElementDataTestId('node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_PASQUALE-vPE 0')
.drawingBoardTreeClickOnContextMenuOptionByName('Duplicate')
.get('.quantity-select option').should('have.length', 9)
@@ -238,6 +243,32 @@ describe('Drawing board', function () {
});
+ describe('default max instances value', () => {
+
+ it('when there is no maxCountInstances for vfModule, it can be added unlimited times', () => {
+ let reduxState = getReduxWithVNFS(false);
+ (<any> reduxState.global.flags)['FLAG_2002_UNLIMITED_MAX'] = true;
+ cy.setReduxState(<any>reduxState);
+ cy.openIframe('app/ui/#/servicePlanning?serviceModelId=6e59c5de-f052-46fa-aa7e-2fca9d674c44');
+ const vfModuleName = 'vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2';
+ const vnfName = "VF_vGeraldine 0";
+ cy.addMacroVfModule(vnfName, vfModuleName, 'module-1');
+ cy.addMacroVfModule(vnfName, vfModuleName, 'module-2');
+ cy.addMacroVfModule(vnfName, vfModuleName, 'module-3');
+ cy.getElementByDataTestsId('node-d6557200-ecf2-4641-8094-5393ae3aae60-VF_vGeraldine 0').click();
+ cy.getElementByDataTestsId('node-41708296-e443-4c71-953f-d9a010f059e1-vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2').should('have.length', 3);
+ });
+
+ it('when there is no max_instances for VNF, it can be added multiple times ', () => {
+ cy.readFile('cypress/support/jsonBuilders/mocks/jsons/emptyServiceRedux.json').then((reduxState) => {
+ reduxState.global['flags'] = { 'FLAG_2002_UNLIMITED_MAX' : true };
+ delete reduxState.service.serviceHierarchy['2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd'].vnfs['2017-488_PASQUALE-vPE 0'].properties.max_instances;
+ cy.setReduxState(<any>reduxState);
+ addSameVnfMultipleTimes();
+ });
+ });
+ });
+
describe('multiple tests', () => {
it('remove vfModule with missing data should update deploy button status', () => {
let res = getReduxWithVFModuleMissingData();
@@ -325,7 +356,7 @@ describe('Drawing board', function () {
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-testalexandria');
cy.selectDropdownOptionByText('lineOfBusiness', 'ONAP');
- cy.selectDropdownOptionByText('platform', 'platform');
+ cy.selectPlatformValue('platform');
cy.genericFormSubmitForm();
cy.getElementByDataTestsId('node-afacccf6-397d-45d6-b5ae-94c39734b168-2017-388_PASQUALE-vPE 0').contains('<Automatically Assigned>');
@@ -345,8 +376,9 @@ 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.selectDropdownOptionByText('platform', 'platform');
+ cy.selectDropdownOptionByText('lineOfBusiness', 'ONAP')
+ cy.selectPlatformValue('platform');
+
cy.genericFormSubmitForm();
cy.getElementByDataTestsId('node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_PASQUALE-vPE 0').contains(vnfModelName);
@@ -577,14 +609,13 @@ describe('Drawing board', function () {
"flags": {
"FLAG_SHOW_ASSIGNMENTS": true,
"FLAG_SHOW_VERIFY_SERVICE": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
"FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
"FLAG_SERVICE_MODEL_CACHE": true,
- "CREATE_INSTANCE_TEST": false,
- "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "FLAG_1906_COMPONENT_INFO" : false
+ "FLAG_1906_COMPONENT_INFO" : false,
+ "FLAG_2002_VNF_PLATFORM_MULTI_SELECT" : false,
+ "FLAG_2002_UNLIMITED_MAX" : true
},
"type": "[FLAGS] Update"
},
@@ -2211,9 +2242,6 @@ describe('Drawing board', function () {
"FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
- "CREATE_INSTANCE_TEST": false,
- "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
@@ -3864,9 +3892,6 @@ describe('Drawing board', function () {
"FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
- "CREATE_INSTANCE_TEST": false,
- "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
@@ -5603,7 +5628,6 @@ describe('Drawing board', function () {
"name": null,
"type": "UPDATE_DRAWING_BOARD_STATUS",
"flags": {
- "CREATE_INSTANCE_TEST": false,
"EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
@@ -5611,7 +5635,6 @@ describe('Drawing board', function () {
"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,
@@ -6293,7 +6316,7 @@ describe('Drawing board', function () {
}
}
- function getReduxWithVNFS(isEcompGeneratedNaming: boolean) {
+ function getReduxWithVNFS(isEcompGeneratedNaming: boolean){
return {
"global": {
"name": null,
@@ -6303,9 +6326,6 @@ describe('Drawing board', function () {
"FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
- "CREATE_INSTANCE_TEST": false,
- "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_SUPPLEMENTARY_FILE": true
},
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
new file mode 100644
index 000000000..8f76908b9
--- /dev/null
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
@@ -0,0 +1,138 @@
+import ObjectLike = Cypress.ObjectLike;
+
+describe('Drawing Board: Instantiation Templates', function () {
+
+ describe('Instantiation templates ', () => {
+
+ beforeEach(() => {
+ cy.clearSessionStorage();
+ cy.setTestApiParamToVNF();
+ cy.initAAIMock();
+ cy.initVidMock();
+ cy.initDrawingBoardUserPermission();
+ cy.login();
+
+ mockAsyncBulkResponse();
+ });
+
+ afterEach(() => {
+ cy.screenshot();
+ });
+
+ describe('Load Page and Deploy', () => {
+
+ it(`Given a stored template - when click "deploy" - then a coherent request should be sent upon deploy`, function () {
+
+ loadDrawingBoardWithRecreateMode();
+
+ // Then...
+ cy.getElementByDataTestsId("node-vProbe_NC_VNF 0").should('be.visible');
+ assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
+ });
+
+ it('View a template’s details as expected', ()=> {
+
+ loadDrawingBoardWithRecreateMode();
+
+ // Then...
+ cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0")
+ .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+ .getElementByDataTestsId("instanceName").should('have.value', 'hvf6arlba007')
+ .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')
+
+
+ .getElementByDataTestsId("cancelButton").click();
+
+ cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-c5b26cc1-a66f-4b69-aa23-6abc7c647c88-vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0")
+ .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+ .getElementByDataTestsId("instanceName").should('have.value', 'hvf6arlba007_lba_Base_01')
+ .getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
+ .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
+ .getElementByDataTestsId("rollback").should('contain', 'Rollback')
+
+ .getElementByDataTestsId("cancelButton").click();
+
+ cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-c09e4530-8fd8-418f-9483-2f57ce927b05-vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1")
+ .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+ .getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
+ .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
+ .getElementByDataTestsId("rollback").should('contain', 'Rollback')
+ .getElementByDataTestsId("cancelButton").click();
+
+
+
+ assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
+ });
+
+ it(`Edit the service`, function () {
+
+ loadDrawingBoardWithRecreateMode();
+
+ cy.openServiceContextMenu()
+ .getElementByDataTestsId("context-menu-header-edit-item").click({force : true})
+ });
+ });
+ });
+
+ });
+
+function loadDrawingBoardWithRecreateMode() {
+ const serviceModelId = '6cfeeb18-c2b0-49df-987a-da47493c8e38';
+ const templateUuid = "46390edd-7100-46b2-9f18-419bd24fb60b";
+
+ const drawingBoardAction = `RECREATE`;
+ const templateTopologyEndpoint = "templateTopology";
+ cy.route(`**/rest/models/services/${serviceModelId}`,
+ 'fixture:../support/jsonBuilders/mocks/jsons/instantiationTemplates/templates__service_model.json')
+ .as('serviceModel');
+
+ cy.route(`**/asyncInstantiation/${templateTopologyEndpoint}/${templateUuid}`,
+ 'fixture:../../../vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json')
+ .as('templateTopology');
+
+ // When...
+
+ cy.openIframe(`app/ui/#/servicePlanning/${drawingBoardAction}` +
+ `?jobId=${templateUuid}` +
+ `&serviceModelId=${serviceModelId}`);
+
+ cy.wait('@serviceModel');
+ cy.wait('@templateTopology');
+}
+
+function assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd() {
+ cy.getDrawingBoardDeployBtn().click();
+ cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
+ cy.readFile('../vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json').then((expectedResult) => {
+ convertRollbackOnFailureValueFromStringToBoolean(expectedResult);
+
+ let xhrBodyWithoutIsDirtyField = removeIsDirtyFieldFromXhrRequestBody(xhr);
+ cy.deepCompare(xhrBodyWithoutIsDirtyField, expectedResult);
+ });
+ });
+}
+
+ //We use this function because the deployService() on drawing-board-header.component class
+ // changes rollbackOnFailure value from string type to boolean.
+ function convertRollbackOnFailureValueFromStringToBoolean(expectedResult: any) {
+ expectedResult.rollbackOnFailure = Boolean(expectedResult.rollbackOnFailure);
+ }
+
+function removeIsDirtyFieldFromXhrRequestBody(xhr : any) {
+ let xhrTempBody = JSON.parse(JSON.stringify(xhr.request.body));
+ delete xhrTempBody.isDirty;
+ return xhrTempBody;
+}
+
+ function mockAsyncBulkResponse() {
+ cy.server().route({
+ url: Cypress.config('baseUrl') + '/asyncInstantiation/bulk',
+ method: 'POST',
+ status: 200,
+ response: "[]",
+ }).as("expectedPostAsyncInstantiation");
+ }
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
new file mode 100644
index 000000000..b862e568d
--- /dev/null
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
@@ -0,0 +1,110 @@
+///<reference path="../../../node_modules/cypress/types/index.d.ts"/>
+describe('Template', () => {
+
+ beforeEach(() => {
+ cy.clearSessionStorage();
+ cy.setReduxState();
+ cy.preventErrorsOnLoading();
+ cy.initAAIMock();
+ cy.initVidMock();
+ cy.login();
+ });
+
+ afterEach(() => {
+ cy.screenshot();
+ });
+
+ it('when open service popup should show template button', function () {
+ cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json').then((flags) => {
+ cy.server()
+ .route({
+ method: 'GET',
+ delay: 0,
+ status: 200,
+ url: Cypress.config('baseUrl') + "/flags**",
+ response: {
+ "FLAG_VF_MODULE_RESUME_STATUS_CREATE": false,
+ "FLAG_2004_INSTANTIATION_TEMPLATES_POPUP": true
+ }
+ }).as('initFlags');
+ });
+
+ const asyncInstantiation = [
+ {
+ "id": 8,
+ "created": 1525075968000,
+ "modified": 1525075971000,
+ "action": "INSTANTIATE",
+ "createdId": null,
+ "modifiedId": null,
+ "rowNum": null,
+ "auditUserId": null,
+ "auditTrail": null,
+ "jobId": "5c2cd8e5-27d0-42e3-85a1-85db5eaba459",
+ "templateId": "d42ba7c8-9e19-4e34-ae2c-d8af3f24498e",
+ "userId": "16807000",
+ "aLaCarte": false,
+ "msoRequestId": "c0011670-0e1a-4b74-945d-8bf5aede1d9c",
+ "jobStatus": "FAILED",
+ "statusModifiedDate": 1525075968000,
+ "hidden": false,
+ "pause": false,
+ "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "owningEntityName": "WayneHolland",
+ "project": "WATKINS",
+ "aicZoneId": "NFT1",
+ "aicZoneName": "NFTJSSSS-NFT1",
+ "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+ "tenantName": "AIN Web Tool-15-D-testalexandria",
+ "regionId": "hvf6",
+ "regionName": null,
+ "serviceType": "TYLER SILVIA",
+ "subscriberName": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "serviceInstanceId": null,
+ "serviceInstanceName": "nWUfl instance name_002",
+ "serviceModelId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "serviceModelName": "action-data",
+ "serviceModelVersion": "1.0",
+ "createdBulkDate": 1525075968000,
+ "isRetryEnabled": true
+ }
+ ];
+
+ cy.route(Cypress.config('baseUrl') + "/asyncInstantiation**", asyncInstantiation);
+
+ cy.openIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true');
+ cy.getElementByDataTestsId('templateButton').contains('Template')
+ .getElementByDataTestsId('templateButton').click({force: true}) // Open template Modal
+ .getElementByDataTestsId('template-modal-title').contains('Templates') // Check Modal header
+ .getElementByDataTestsId('description-part-1').contains('The following list presents previous instantiations done for this model in this version.')
+ .getElementByDataTestsId('description-part-2').contains('You may use one of them as a baseline for your instantiation or start from scratch.')
+ .getElementByDataTestsId('description-part-3').contains('Once you selecting one allows you to change the data before start instantiating.')
+
+
+ //check table headers
+ cy.get(`#header-userId`).contains('User ID');
+ cy.get(`#header-createDate`).contains('Date');
+ cy.get(`#header-instanceName`).contains('Instance Name');
+ cy.get(`#header-instantiationStatus`).contains('Instantiation Status');
+ cy.get(`#header-region`).contains('Region');
+ cy.get(`#header-tenant`).contains('Tenant');
+ cy.get(`#header-aicZone`).contains('AIC Zone');
+
+ // check table body row
+ cy.getElementByDataTestsId(`userId-${asyncInstantiation[0].jobId}`).contains('16807000');
+ cy.getElementByDataTestsId(`createDate-${asyncInstantiation[0].jobId}`).contains('2018-04-30 11:12:48');
+ cy.getElementByDataTestsId(`instanceName-${asyncInstantiation[0].jobId}`).contains('nWUfl instance name_002');
+ cy.getElementByDataTestsId(`instantiationStatus-${asyncInstantiation[0].jobId}`).contains('FAILED');
+ cy.getElementByDataTestsId(`region-${asyncInstantiation[0].jobId}`).contains('hvf6 (WAYNEHOLLAND)');
+ cy.getElementByDataTestsId(`tenant-${asyncInstantiation[0].jobId}`).contains('AIN Web Tool-15-D-testalexandria');
+ cy.getElementByDataTestsId(`aicZone-${asyncInstantiation[0].jobId}`).contains('NFTJSSSS-NFT1');
+
+
+ //check load button is disabled
+ cy.getElementByDataTestsId('LoadTemplateButton').should('be.disabled')
+ cy.getElementByDataTestsId('row-5c2cd8e5-27d0-42e3-85a1-85db5eaba459').click();
+ cy.getElementByDataTestsId('LoadTemplateButton').should('not.be.disabled')
+
+ });
+});
+
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
index 3b657343f..c510391cb 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
@@ -7,6 +7,7 @@ import {AsyncInstantiationModel} from '../../support/jsonBuilders/models/asyncIn
describe('Instantiation status', function () {
var jsonBuilderInstantiationBuilder : JsonBuilder<AsyncInstantiationModel> = new JsonBuilder<AsyncInstantiationModel>();
var asyncRes: Array<any>;
+ const contextMenuCreateAnotherOne = 'context-menu-recreate';
beforeEach(() => {
cy.clearSessionStorage();
@@ -58,34 +59,77 @@ describe('Instantiation status', function () {
}
});
- it('should enable correct menu items', function () {
- cy.openIframe('app/ui/#/instantiationStatus');
-
- // Instantiate action with Job status FAILED - isRetry = true
- cy.get( '#5c2cd8e5-27d0-42e3-85a1-85db5eaba459').find('.menu-div').click();
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-retry']`).should('not.exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-remove']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-open']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-hide']`).should('not.exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-audit-info']`).should('not.exist');
-
- // Instantiate action with Job status FAILED - isRetry = false
- cy.get( '#e1db03c3-6274-4ff7-84cf-7bd3a3946de7').find('.menu-div').click();
- cy.get('.dropdown-menu').find(`[data-tests-id='context-menu-retry']`).should('not.be.visible');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-open']`).should('exist');
-
- //Delete action with Job status IN_PROGRESS
- cy.get( '#850dc7d2-5240-437f-9bcd-b1ed7dc339c2').find('.menu-div').click();
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-remove']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-open']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-hide']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-audit-info']`).should('not.exist');
- //Update action with Job status COMPLETED
- cy.get( '#850dc7d2-5240-437f-9bcd-b1ed7dc339c1').find('.menu-div').click();
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-remove']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-open']`).should('not.exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-hide']`).should('not.exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-audit-info']`).should('not.exist');
+ it('should filter rows by filter text', function () {
+ cy.openIframe('app/ui/#/instantiationStatus');
+ cy.getElementByDataTestsId("instantiation-status-filter").type("ComplexService");
+ cy.get('table#instantiation-status tbody tr').should('have.length', 2);
+ });
+
+ it('should filter rows by url filter text', function () {
+ cy.openIframe('app/ui/#/instantiationStatus?filterText=ComplexService');
+ cy.getElementByDataTestsId("instantiation-status-filter").should('have.value','ComplexService');
+ cy.get('table#instantiation-status tbody tr').should('have.length', 2);
+ });
+
+ function getDisabledDropDownItemByDataTestId(testId:String) {
+ return cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='${testId}']`);
+ }
+
+ function clickOnTitleAndThenOnMenuWithJobId(jobId: string) {
+ cy.getElementByDataTestsId("instantiation-status-title").click();
+ cy.get('#' + jobId).find('.menu-div').click();
+ }
+
+ it('should disabled correct menu items', function () {
+
+ cy.openIframe('app/ui/#/instantiationStatus');
+
+ // Instantiate action with Job status FAILED - isRetry = true
+
+ clickOnTitleAndThenOnMenuWithJobId('5c2cd8e5-27d0-42e3-85a1-85db5eaba459');
+ getDisabledDropDownItemByDataTestId('context-menu-retry').should('not.exist');
+ getDisabledDropDownItemByDataTestId('context-menu-remove').should('exist');
+ getDisabledDropDownItemByDataTestId('context-menu-open').should('exist');
+ getDisabledDropDownItemByDataTestId('context-menu-hide').should('not.exist');
+ getDisabledDropDownItemByDataTestId('context-menu-audit-info').should('not.exist');
+ getDisabledDropDownItemByDataTestId(contextMenuCreateAnotherOne).should('not.exist');
+
+ // Instantiate action with Job status FAILED - isRetry = false
+ clickOnTitleAndThenOnMenuWithJobId('e1db03c3-6274-4ff7-84cf-7bd3a3946de7');
+ getDisabledDropDownItemByDataTestId('context-menu-retry').should('not.be.visible');
+ getDisabledDropDownItemByDataTestId('context-menu-open').should('exist');
+ getDisabledDropDownItemByDataTestId(contextMenuCreateAnotherOne).should('not.exist');
+
+ //Delete action with Job status IN_PROGRESS
+ clickOnTitleAndThenOnMenuWithJobId('850dc7d2-5240-437f-9bcd-b1ed7dc339c2');
+ getDisabledDropDownItemByDataTestId('context-menu-remove').should('exist');
+ getDisabledDropDownItemByDataTestId('context-menu-open').should('exist');
+ getDisabledDropDownItemByDataTestId('context-menu-hide').should('exist');
+ getDisabledDropDownItemByDataTestId('context-menu-audit-info').should('not.exist');
+ getDisabledDropDownItemByDataTestId(contextMenuCreateAnotherOne).should('exist');
+
+ //Update action with Job status COMPLETED
+ clickOnTitleAndThenOnMenuWithJobId('850dc7d2-5240-437f-9bcd-b1ed7dc339c1');
+ getDisabledDropDownItemByDataTestId('context-menu-remove').should('exist');
+ getDisabledDropDownItemByDataTestId('context-menu-open').should('not.exist');
+ getDisabledDropDownItemByDataTestId('context-menu-hide').should('not.exist');
+ getDisabledDropDownItemByDataTestId('context-menu-audit-info').should('not.exist');
+ getDisabledDropDownItemByDataTestId(contextMenuCreateAnotherOne).should('exist');
+ });
+
+ it('clicking on create another one item, go to expected url', function () {
+ //see cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json id:8
+ const jobId = '5c2cd8e5-27d0-42e3-85a1-85db5eaba459';
+ const serviceModelId = 'e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0';
+ const vidBaseUrl = `http://localhost:8080/vid/serviceModels.htm`;
+
+ cy.openIframe('app/ui/#/instantiationStatus');
+
+ clickOnTitleAndThenOnMenuWithJobId(jobId);
+ cy.get('.dropdown-menu').getElementByDataTestsId(contextMenuCreateAnotherOne).click();
+ cy.location().should((loc) => {
+ expect(loc.toString()).to.eq(`${vidBaseUrl}#/servicePlanning/RECREATE?serviceModelId=${serviceModelId}&jobId=${jobId}`);
+ });
});
});
diff --git a/vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts
index 8768e34b5..2baab721c 100644
--- a/vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts
@@ -213,10 +213,7 @@ describe('Network popup', function () {
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_ADVANCED_PORTS_FILTER": true,
- "CREATE_INSTANCE_TEST": false,
- "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
"FLAG_REGION_ID_FROM_REMOTE": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts
index 0e106188a..7257cbb76 100644
--- a/vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts
@@ -1447,14 +1447,11 @@ function initDrawingBoardWithFourPnf(serviceModelId: string, pnfName: string) {
"FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST": true,
"FLAG_SHOW_VERIFY_SERVICE": true,
"FLAG_1902_NEW_VIEW_EDIT": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_1906_INSTANTIATION_API_USER_VALIDATION": true,
"FLAG_EXP_CREATE_RESOURCES_IN_PARALLEL": false,
"FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS": true,
"FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
- "FLAG_DEFAULT_VNF": true,
- "FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE": true,
"FLAG_ASYNC_ALACARTE_VFMODULE": true,
"FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
"FLAG_ASYNC_ALACARTE_VNF": true,
@@ -1463,8 +1460,6 @@ function initDrawingBoardWithFourPnf(serviceModelId: string, pnfName: string) {
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_1902_RETRY_JOB": true,
"FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI": true,
- "CREATE_INSTANCE_TEST": false,
- "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true,
"FLAG_1906_AAI_SUB_DETAILS_REDUCE_DEPTH": true,
"FLAG_VF_MODULE_RESUME_STATUS_CREATE": true,
"FLAG_SUPPLEMENTARY_FILE": true,
diff --git a/vid-webpack-master/cypress/integration/iFrames/resume.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/resume.e2e.ts
index 5857e1ac0..ab13f92fe 100644
--- a/vid-webpack-master/cypress/integration/iFrames/resume.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/resume.e2e.ts
@@ -67,38 +67,13 @@ describe('Resume tests', function () {
cy.screenshot();
});
- it(`Resume Defect 710619 - with flag FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE is ON`, function () {
+ it(`Resume Defect 710619`, function () {
cy.visit('/serviceModels.htm#/instantiate?subscriberId=e433710f-9217-458d-a79d-1c7aff376d89&subscriberName=SILVIA ROBBINS&serviceType=TYLER%20SILVIA&serviceInstanceId=dedd680f-f3bd-46d8-97c7-b6fc28db9317&aaiModelVersionId=4b60252a-bf6c-40df-9db5-98b4c363fdf4&isPermitted=true').then(()=>{
cy.wait('@service-complexService');
checkResumeAndPopup("dpa2bccfx5992v_base_module","vfModuleTreeNode-assigned");
});
});
- 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.server()
- .route({
- method: 'GET',
- delay : 0,
- status : 200,
- url : Cypress.config('baseUrl') + "/flags**",
- response : {
- "FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST" : true,
- "FLAG_ADD_MSO_TESTAPI_FIELD": true,
- "FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE": false
- }
- }).as('initFlags');
- });
-
- cy.visit('/serviceModels.htm#/instantiate?subscriberId=e433710f-9217-458d-a79d-1c7aff376d89&subscriberName=SILVIA ROBBINS&serviceType=TYLER%20SILVIA&serviceInstanceId=dedd680f-f3bd-46d8-97c7-b6fc28db9317&aaiModelVersionId=4b60252a-bf6c-40df-9db5-98b4c363fdf4&isPermitted=true');
- cy.wait('@service-complexService');
-
- checkResumeAndPopup("dpa2bccfx5992v_base_module","vfModuleTreeNode-assigned");
-
- });
-
-
function checkResumeAndPopup(vfModuleName:string, vfModuleClassName:string) {
cy.get('div').find('.' + vfModuleClassName)
.getElementByDataTestsId('resumeVFModuleButton-' + vfModuleName).click().then(()=> {
diff --git a/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
index d1d41d0d9..7d1a1829d 100644
--- a/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
@@ -82,6 +82,14 @@ describe('Service popup', function () {
cy.get('form-general-error').contains('Page contains errors. Please see details next to the relevant fields.');
});
});
+
+ it('when open service popup should show showPrevious button', () => {
+ cy.openIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true');
+ cy.getElementByDataTestsId('ShowPreviousInstancesButton').contains('Previous Instantiation').click();
+
+ })
+
+
});
});
diff --git a/vid-webpack-master/cypress/integration/iFrames/softDeleteAndResume.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/softDeleteAndResume.e2e.ts
index fccdd53c6..f390488a6 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',
@@ -83,7 +83,6 @@ describe('Soft delete tests', function () {
status : 200,
url : Cypress.config('baseUrl') + "/flags**",
response : {
- "FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE": true,
"FLAG_VF_MODULE_RESUME_STATUS_CREATE": false
}
}).as('initFlags');
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
index f111189fc..9f2499f3c 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
@@ -105,13 +105,17 @@ describe('View Edit Page: Upgrade VFModule', function () {
initServicePlanning("EDIT",
'../vid-automation/src/test/resources/viewEdit/ServiceTreeWithMultipleChildren_serviceInstance_withUpdatedLatestVersion.json');
upgradeTheVFM();
+ assertVfModuleActionInRedux("None_Upgrade");
undoUpgradeForVFM();
+ assertVfModuleActionInRedux("None");
upgradeTheVFM();
cy.getDrawingBoardDeployBtn().click();
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");
+ const requestBody = Object(xhr.request.body);
+ const vfModuleRequest = requestBody.vnfs['VNF2_INSTANCE_ID'].vfModules['vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1']['2c1ca484-cbc2-408b-ab86-25a2c15ce280'];
+ expect(requestBody.action).to.equal("None_Upgrade");
+ expect(requestBody.vnfs['VNF2_INSTANCE_ID'].action).to.equal("None_Upgrade");
+ expect(vfModuleRequest.action).to.equal("None_Upgrade");
});
});
@@ -206,16 +210,23 @@ 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<any> {
- 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('retainAssignments').click();
+ cy.getElementByDataTestsId('retainVolumeGroups').click();
+ cy.getElementByDataTestsId('sdncPreLoad').click();
+ cy.screenshot();
+ 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");
}
@@ -223,4 +234,13 @@ describe('View Edit Page: Upgrade VFModule', function () {
serviceModel.service.uuid = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
return serviceModel;
}
+
+ function assertVfModuleActionInRedux(expectedState:string) {
+ cy.getReduxState().then((state) => {
+ const vfModule = state.service.serviceInstance['6e59c5de-f052-46fa-aa7e-2fca9d674c44']
+ .vnfs["VNF2_INSTANCE_ID"]
+ .vfModules["vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1"]["2c1ca484-cbc2-408b-ab86-25a2c15ce280"];
+ expect(vfModule.action).to.equal(expectedState)
+ });
+ }
});
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
index 688d42e94..59e15d325 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
@@ -331,7 +331,7 @@ describe('View only drawing board', function () {
['Model version', '2.0'],
['Model customization ID', '91415b44-753d-494c-926a-456a9172bbb9'],
['Min instances', '0'],
- ['Max instances', '1']
+ ['Max instances', 'Unlimited (default)']
];
const extraLabelsAndValuesForInstance = [['Instance type', 'VNF2_INSTANCE_TYPE'],['In maintenance','true'], ['Instance ID', 'VNF2_INSTANCE_ID']];
testComponentInfoByType('node-VF_vGeraldine 0', labelsAndValuesForModel,'VNF INFO',
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 a014400d4..41ab83399 100644
--- a/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
@@ -66,7 +66,7 @@ describe('Vnf popup', function () {
cy.getElementByDataTestsId('model-item-label-vnf-min').contains('Minimum to instantiate');
cy.getElementByDataTestsId('model-item-value-vnf-min').contains('0');
cy.getElementByDataTestsId('model-item-label-vnf-max').contains('Maximum to instantiate');
- cy.getElementByDataTestsId('model-item-value-vnf-max').contains('1');
+ cy.getElementByDataTestsId('model-item-value-vnf-max').contains('Unlimited (default)');
})
});
@@ -81,7 +81,7 @@ describe('Vnf popup', function () {
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
- cy.selectDropdownOptionByText('platform', 'xxx1');
+ cy.selectPlatformValue('xxx1');
})
});
@@ -96,9 +96,6 @@ describe('Vnf popup', function () {
"FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
- "CREATE_INSTANCE_TEST": false,
- "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts
index a314424f3..d5b851ddc 100644
--- a/vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts
@@ -52,10 +52,12 @@ describe('Delete vnf instance', function () {
res.instanceId = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
const vnf = res.vnfs['2017-488_PASQUALE-vPE 0'];
+
vnf.instanceId = "VNF_INSTANCE_ID";
vnf.vfModules['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0']['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0uvfot'].instanceId = "VF_MODULE_BASE_INSTANCE_ID";
vnf.vfModules['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1']['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1fshmc'].instanceId = "VF_MODULE_INSTANCE_ID";
+
jsonBuilderAndMock.basicJson(
res,
Cypress.config('baseUrl') + "/aai_get_service_instance_topology/e433710f-9217-458d-a79d-1c7aff376d89/TYLER SILVIA/f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
@@ -69,7 +71,7 @@ describe('Delete vnf instance', function () {
// add a vnf on update mode
cy.drawingBoardPressAddButtonByElementName('node-2017-388_PASQUALE-vPE 0').click({force: true});
cy.selectDropdownOptionByText('rollback', 'Rollback');
- cy.fillVnfPopup();
+ cy.fillVnfPopup(true);
// delete VNF
cy.drawingBoardTreeOpenContextMenuByElementDataTestId('node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_PASQUALE-vPE 0', 0)
@@ -83,6 +85,7 @@ describe('Delete vnf instance', function () {
cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
cy.readFile('../vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json').then((expectedResult) => {
expectedResult.vnfs["2017-388_PASQUALE-vPE 0_1"].trackById = vnf.trackById;
+ expectedResult.vnfs["2017-388_PASQUALE-vPE 0_1"].platformName = 'platform,xxx1';
cy.deepCompare(expectedResult, xhr.request.body);
});
});