summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-12-12 12:32:59 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-12 12:32:59 +0000
commitf026c319fabf3431ddce1d642a2bbb596b65beb5 (patch)
treee2f1484046b604d531e2c03faef98400d187e1c0
parent8178f5a1c0ba63fdf74f4cb58a8b3c0f549975dc (diff)
parent4636353a8300993c52152b9da65389c9ccf8959b (diff)
Merge "Add edit button on service context menu."
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json8
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts34
-rw-r--r--vid-webpack-master/cypress/support/elements/element.input.actions.ts2
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts2
4 files changed, 39 insertions, 7 deletions
diff --git a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
index a8417e3a9..83f4cbda1 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
@@ -42,7 +42,7 @@
"modelVersion": "1.0"
},
"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "instanceName": "zolson57arlba007",
+ "instanceName": "hvf6arlba007",
"action": "Create",
"platformName": "xxx1",
"lcpCloudRegionId": "hvf6",
@@ -64,7 +64,7 @@
"modelType": "vfModule",
"modelVersion": "1"
},
- "instanceName": "zolson57arlba007_lba_Base_01",
+ "instanceName": "hvf6arlba007_lba_Base_01",
"action": "Create",
"lcpCloudRegionId": "hvf6",
"tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
@@ -87,7 +87,7 @@
"modelType": "vfModule",
"modelVersion": "1"
},
- "instanceName": "zolson57arlba007_lba_dj_01",
+ "instanceName": "hvf6arlba007_lba_dj_01",
"action": "Create",
"lcpCloudRegionId": "hvf6",
"tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
@@ -97,7 +97,7 @@
"rollbackOnFailure": true,
"trackById": "b134410e-3bc0-478e-883e-1b6bdf8a28df",
"isFailed": false,
- "volumeGroupInstanceName": "zolson57arlba007_lba_dj_01_vol",
+ "volumeGroupInstanceName": "hvf6arlba007_lba_dj_01_vol",
"usePreload": 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
index afad68747..8f76908b9 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
@@ -37,13 +37,45 @@ describe('Drawing Board: Instantiation Templates', function () {
// 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})
+ });
+ });
});
});
diff --git a/vid-webpack-master/cypress/support/elements/element.input.actions.ts b/vid-webpack-master/cypress/support/elements/element.input.actions.ts
index 4e6b5e879..b52a35ede 100644
--- a/vid-webpack-master/cypress/support/elements/element.input.actions.ts
+++ b/vid-webpack-master/cypress/support/elements/element.input.actions.ts
@@ -42,7 +42,7 @@ function focusInput(id : string) : void {
test if input with id contains some text
****************************************/
function shouldInputContainsText(id : string, text : string) : void {
- cy.getElementByDataTestsId(id).contains('text')
+ cy.getElementByDataTestsId(id).contains(text)
}
Cypress.Commands.add('typeToInput', typeToInput);
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
index 1b71d9098..634fa6271 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
@@ -96,7 +96,7 @@ export class DrawingBoardHeaderService{
showEditService(mode: DrawingBoardModes, serviceModelId: string): boolean{
const serviceInstance = this.store.getState().service.serviceInstance;
- return mode === DrawingBoardModes.CREATE || ((mode === DrawingBoardModes.RETRY_EDIT || mode === DrawingBoardModes.EDIT)&&
+ return mode === DrawingBoardModes.CREATE || ((mode === DrawingBoardModes.RETRY_EDIT || mode === DrawingBoardModes.EDIT || mode === DrawingBoardModes.RECREATE )&&
!_.isNil(serviceInstance) && !_.isNil(serviceInstance[serviceModelId])&& serviceInstance[serviceModelId].action === ServiceInstanceActions.Create);
}