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/instantiation-templates.e2e.ts25
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts21
2 files changed, 27 insertions, 19 deletions
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 dbb9bca4d..f9fe68b20 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
@@ -1,5 +1,3 @@
-import ObjectLike = Cypress.ObjectLike;
-
describe('Drawing Board: Instantiation Templates', function () {
describe('Instantiation templates ', () => {
@@ -31,13 +29,12 @@ describe('Drawing Board: Instantiation Templates', function () {
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
});
- it('View a template’s details as expected', ()=> {
+ it('Given a stored template - when "edit" vnf and vfmodules are opened - then template’s details are visible as expected', ()=> {
loadDrawingBoardWithRecreateMode();
// Then...
- cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0")
- .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+ editNode("node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0")
.getElementByDataTestsId("instanceName").should('have.value', 'hvf6arlba007')
.getElementByDataTestsId("productFamily").should('contain', 'Emanuel')
.getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
@@ -47,19 +44,20 @@ describe('Drawing Board: Instantiation Templates', function () {
.checkPlatformValue('xxx1')
.getElementByDataTestsId("cancelButton").click();
- cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-c5b26cc1-a66f-4b69-aa23-6abc7c647c88-vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0")
- .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+ editNode("node-c5b26cc1-a66f-4b69-aa23-6abc7c647c88-vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0")
.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')
+ editNode("node-c09e4530-8fd8-418f-9483-2f57ce927b05-vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1")
+ .getElementByDataTestsId("instanceName").should('have.value', 'my_hvf6arlba007_lba_dj_01')
+ .getElementByDataTestsId("volumeGroupName").should('have.value', 'my_special_hvf6arlba007_lba_dj_01_vol')
.getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
.getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
.getElementByDataTestsId("rollback").should('contain', 'Rollback')
+ .getElementByDataTestsId("sdncPreLoad").should('have.value', 'on')
.getElementByDataTestsId("cancelButton").click();
@@ -67,7 +65,7 @@ describe('Drawing Board: Instantiation Templates', function () {
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
});
- it(`Edit the service`, function () {
+ it(`Given a stored template - when "edit" service is opened - then template’s details are visible as expected`, function () {
loadDrawingBoardWithRecreateMode();
@@ -80,11 +78,11 @@ describe('Drawing Board: Instantiation Templates', function () {
.getElementByDataTestsId("project").should('contain', 'WATKINS')
.getElementByDataTestsId("rollback").should('contain', 'Rollback');
+ });
});
- });
});
});
@@ -112,6 +110,11 @@ function loadDrawingBoardWithRecreateMode() {
cy.wait('@templateTopology');
}
+function editNode(dataTestId: string) {
+ return cy.drawingBoardTreeOpenContextMenuByElementDataTestId(dataTestId)
+ .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+}
+
function assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd() {
cy.getDrawingBoardDeployBtn().click();
cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
index 9f2499f3c..09734472c 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
@@ -100,20 +100,20 @@ describe('View Edit Page: Upgrade VFModule', function () {
`servicePlanning/EDIT?serviceModelId=${serviceUuid}&subscriberId=${SUBSCRIBER_ID}&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}`);
});
- it(`Upgrade a VFModule`, function () {
+ it(`Upgrade a VF Module`, function () {
cy.initDrawingBoardUserPermission();
initServicePlanning("EDIT",
'../vid-automation/src/test/resources/viewEdit/ServiceTreeWithMultipleChildren_serviceInstance_withUpdatedLatestVersion.json');
- upgradeTheVFM();
+ upgradeTheVFM('node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1', true);
assertVfModuleActionInRedux("None_Upgrade");
undoUpgradeForVFM();
assertVfModuleActionInRedux("None");
- upgradeTheVFM();
+ upgradeTheVFM('node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1',true);
cy.getDrawingBoardDeployBtn().click();
cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
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.action).to.equal("None_Upgrade");
expect(requestBody.vnfs['VNF2_INSTANCE_ID'].action).to.equal("None_Upgrade");
expect(vfModuleRequest.action).to.equal("None_Upgrade");
});
@@ -129,7 +129,7 @@ describe('View Edit Page: Upgrade VFModule', function () {
});
- describe('More UI tests', () => {
+ describe('More UI test', () => {
beforeEach(() => {
cy.clearSessionStorage();
@@ -174,7 +174,7 @@ describe('View Edit Page: Upgrade VFModule', function () {
cy.openIframe(`app/ui/#/servicePlanning/EDIT?serviceModelId=${serviceModelId}&subscriberId=${subscriberId}&serviceType=${serviceType}&serviceInstanceId=${serviceInstanceId}`);
- upgradeTheVFM('node-04b21d26-9780-4956-8329-b22b049329f4-xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0');
+ upgradeTheVFM('node-04b21d26-9780-4956-8329-b22b049329f4-xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0', false);
mockAsyncBulkResponse();
cy.getDrawingBoardDeployBtn().click();
@@ -213,13 +213,18 @@ describe('View Edit Page: Upgrade VFModule', function () {
}).as("expectLatestServiceModelUpgradeVersion");
}
- function upgradeTheVFM(treeNodeId = 'node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1') {
+ function upgradeTheVFM(treeNodeId: string, shouldVGCheckboxExist :boolean) {
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();
+ if (shouldVGCheckboxExist) {
+ cy.getElementByDataTestsId('retainVolumeGroups').click();
+ }
+ else {
+ cy.getElementByDataTestsId('retainVolumeGroups').should('not.exist');
+ }
cy.getElementByDataTestsId('sdncPreLoad').click();
cy.screenshot();
cy.getElementByDataTestsId('form-set').click();