aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress
diff options
context:
space:
mode:
authorAlexey Sandler <alexey.sandler@intl.att.com>2019-12-16 10:18:41 +0200
committerAlexey Sandler <alexey.sandler@intl.att.com>2019-12-16 12:35:49 +0200
commit12ceb440bd3753e09fb21a5b14038a01cc530fa7 (patch)
treeadccad050dbd914258fa2a67ea73861f2d9c541e /vid-webpack-master/cypress
parent73e153974e4f5a7dc4a60f5612fd30ca6a47dee0 (diff)
Allow edit service button to be shown on service context menu in recreate mode.
Issue-ID: VID-724 Change-Id: Ife26ef3278a37555a80fe4f3e8afa56666ca81ba Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-webpack-master/cypress')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts26
-rw-r--r--vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts1
-rw-r--r--vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts5
3 files changed, 23 insertions, 9 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 8f76908b9..dbb9bca4d 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
@@ -8,6 +8,7 @@ describe('Drawing Board: Instantiation Templates', function () {
cy.clearSessionStorage();
cy.setTestApiParamToVNF();
cy.initAAIMock();
+ cy.initGetAAISubDetails();
cy.initVidMock();
cy.initDrawingBoardUserPermission();
cy.login();
@@ -21,7 +22,7 @@ describe('Drawing Board: Instantiation Templates', function () {
describe('Load Page and Deploy', () => {
- it(`Given a stored template - when click "deploy" - then a coherent request should be sent upon deploy`, function () {
+ it(`Given a stored template - when click "deploy" - then a coherent request should be sent upon deploy`, () => {
loadDrawingBoardWithRecreateMode();
@@ -43,9 +44,8 @@ describe('Drawing Board: Instantiation Templates', function () {
.getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
.getElementByDataTestsId("lineOfBusiness").should('contain', 'zzz1')
.getElementByDataTestsId("rollback").should('contain', 'Rollback')
-
-
- .getElementByDataTestsId("cancelButton").click();
+ .checkPlatformValue('xxx1')
+ .getElementByDataTestsId("cancelButton").click();
cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-c5b26cc1-a66f-4b69-aa23-6abc7c647c88-vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0")
.drawingBoardTreeClickOnContextMenuOptionByName('Edit')
@@ -53,7 +53,6 @@ describe('Drawing Board: Instantiation Templates', function () {
.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")
@@ -68,16 +67,25 @@ describe('Drawing Board: Instantiation Templates', function () {
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
});
- it(`Edit the service`, function () {
+ it(`Edit the service`, function () {
loadDrawingBoardWithRecreateMode();
cy.openServiceContextMenu()
- .getElementByDataTestsId("context-menu-header-edit-item").click({force : true})
- });
+ .getElementByDataTestsId("context-menu-header-edit-item").click()
+ .getElementByDataTestsId("instanceName").should('have.value', 'vProbe_NC_Service_DG_new_SI')
+ .getElementByDataTestsId("subscriberName").should('contain', 'SILVIA ROBBINS')
+ .getElementByDataTestsId("serviceType").should('contain', 'TYLER SILVIA')
+ .getElementByDataTestsId("owningEntity").should('contain', 'WayneHolland')
+ .getElementByDataTestsId("project").should('contain', 'WATKINS')
+ .getElementByDataTestsId("rollback").should('contain', 'Rollback');
+
+
+
+
+ });
});
});
-
});
function loadDrawingBoardWithRecreateMode() {
diff --git a/vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts b/vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts
index 7854899f8..ae3bf6da7 100644
--- a/vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts
+++ b/vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts
@@ -18,6 +18,7 @@ function getDrawingBoardDeployBtn() : Chainable<any> {
return cy.getElementByDataTestsId('deployBtn');
}
+
Cypress.Commands.add('drawingBoardPressAddButtonByElementName', drawingBoardPressAddButtonByElementName);
Cypress.Commands.add('drawingBoardNumberOfExistingElementsShouldContains', drawingBoardNumberOfExistingElementsShouldContains);
Cypress.Commands.add('getDrawingBoardDeployBtn', getDrawingBoardDeployBtn);
diff --git a/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts b/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts
index 00a945711..115173632 100644
--- a/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts
+++ b/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts
@@ -2,6 +2,7 @@ declare namespace Cypress {
interface Chainable {
genericFormSubmitForm: typeof genericFormSubmitForm
selectPlatformValue: typeof selectPlatformValue
+ checkPlatformValue: typeof checkPlatformValue
}
}
@@ -12,6 +13,9 @@ function selectPlatformValue(selectOption: string) {
cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true});
}
+function checkPlatformValue(value: string){
+ return cy.getElementByDataTestsId("multi-selectPlatform").should("contain", value)
+}
function genericFormSubmitForm(): Chainable<any> {
return cy.getElementByDataTestsId('form-set').click({force: true});
@@ -20,3 +24,4 @@ function genericFormSubmitForm(): Chainable<any> {
Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm);
Cypress.Commands.add('selectPlatformValue', selectPlatformValue);
+Cypress.Commands.add('checkPlatformValue', checkPlatformValue);