aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts30
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts18
-rw-r--r--vid-webpack-master/cypress/support/steps/fill.vfModule.step.ts44
3 files changed, 62 insertions, 30 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 1c91d02ca..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', () => {
@@ -242,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;
@@ -284,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/drawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
index b678702ff..a9aa00b2c 100644
--- a/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
@@ -238,6 +238,22 @@ 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);
+ });
+ });
+
describe('multiple tests', () => {
it('remove vfModule with missing data should update deploy button status', () => {
let res = getReduxWithVFModuleMissingData();
@@ -6285,7 +6301,7 @@ describe('Drawing board', function () {
}
}
- function getReduxWithVNFS(isEcompGeneratedNaming: boolean) {
+ function getReduxWithVNFS(isEcompGeneratedNaming: boolean){
return {
"global": {
"name": null,
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 d2977832d..b87e773f9 100644
--- a/vid-webpack-master/cypress/support/steps/fill.vfModule.step.ts
+++ b/vid-webpack-master/cypress/support/steps/fill.vfModule.step.ts
@@ -1,10 +1,12 @@
declare namespace Cypress {
interface Chainable {
- fillVFModulePopup: typeof FillVFModulePopup
+ fillVFModulePopup: typeof fillVFModulePopup;
+ addALaCarteVfModule: typeof addALaCarteVfModule;
+ addMacroVfModule: typeof addMacroVfModule;
}
}
-function FillVFModulePopup(vnfName: string, vfModuleName: string, instanceName: string, lcpRegion: string, tenant: string, rollback: boolean, sdncPreLoad: boolean): Chainable<any> {
+function fillVFModulePopup(vnfName: string, vfModuleName: string, instanceName: string, lcpRegion: string, tenant: string, rollback: boolean, sdncPreLoad: boolean): Chainable<any> {
cy.getElementByDataTestsId('node-' + vnfName).click({force: true});
cy.getElementByDataTestsId('node-' + vfModuleName + '-add-btn').click({force: true});
cy.getElementByDataTestsId('instanceName').last().type(instanceName, {force: true});
@@ -21,4 +23,40 @@ function FillVFModulePopup(vnfName: string, vfModuleName: string, instanceName:
}
-Cypress.Commands.add('fillVFModulePopup', FillVFModulePopup);
+function addMacroVfModule(vnfName: string, vfModuleName: string, instanceName: string): 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(() => {
+ cy.getElementByDataTestsId('form-set').click({force: true});
+ })
+ })
+ });
+}
+
+function addALaCarteVfModule(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 (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});
+ });
+ });
+ });
+}
+
+Cypress.Commands.add('fillVFModulePopup', fillVFModulePopup);
+Cypress.Commands.add('addALaCarteVfModule', addALaCarteVfModule);
+Cypress.Commands.add('addMacroVfModule', addMacroVfModule);