diff options
14 files changed, 64 insertions, 24 deletions
diff --git a/epsdk-app-onap/pom.xml b/epsdk-app-onap/pom.xml index 0dc8eacea..95c1ce271 100755 --- a/epsdk-app-onap/pom.xml +++ b/epsdk-app-onap/pom.xml @@ -16,7 +16,7 @@ <parent> <groupId>org.onap.oparent</groupId> <artifactId>oparent</artifactId> - <version>2.0.0</version> + <version>2.1.0</version> <relativePath/> </parent> @@ -10,7 +10,7 @@ <parent> <groupId>org.onap.oparent</groupId> <artifactId>oparent</artifactId> - <version>2.0.0</version> + <version>2.1.0</version> <relativePath/> </parent> diff --git a/vid-app-common/pom.xml b/vid-app-common/pom.xml index f618ec822..c9356771d 100755 --- a/vid-app-common/pom.xml +++ b/vid-app-common/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.onap.oparent</groupId> <artifactId>oparent</artifactId> - <version>2.0.0</version> + <version>2.1.0</version> <relativePath/> </parent> diff --git a/vid-automation/pom.xml b/vid-automation/pom.xml index e2ef865f4..34abd22f5 100644 --- a/vid-automation/pom.xml +++ b/vid-automation/pom.xml @@ -167,7 +167,7 @@ <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> - <version>1.9.3</version> + <version>1.9.4</version> </dependency> <dependency> <groupId>org.springframework</groupId> diff --git a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java index b65e797b8..9651002b2 100644 --- a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java +++ b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java @@ -64,9 +64,10 @@ public class LoggerFormatTest extends BaseApiTest { @DataProvider public static Object[][] logsAndFormats(Method test) { return new Object[][]{ - {LogName.debug, "debug", 0.65 }, + {LogName.debug, "debug", 0.95 }, {LogName.metrics2019, "metric-ELS-2019.11", 0.95}, - {LogName.audit2019, "audit-ELS-2019.11", 0.95} + {LogName.audit2019, "audit-ELS-2019.11", 0.95}, + {LogName.error, "error", 0.75 } }; } 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 a874fec4c..a7b3a04c5 100644 --- a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json +++ b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json @@ -41,12 +41,12 @@ "modelType": "vnf", "modelVersion": "1.0" }, - "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89", "instanceName": "hvf6arlba007", "action": "Create", "platformName": "xxx1", "lcpCloudRegionId": "hvf6", - "tenantId": "092eb9e8e4b7412e8787dd091bc58e86", + "tenantId": "4914ab0ab3a743e58f0eefdacc1dde77", "instanceParams": [ {} ], @@ -67,7 +67,7 @@ "instanceName": "hvf6arlba007_lba_Base_01", "action": "Create", "lcpCloudRegionId": "hvf6", - "tenantId": "092eb9e8e4b7412e8787dd091bc58e86", + "tenantId": "4914ab0ab3a743e58f0eefdacc1dde77", "instanceParams": [ {} ], @@ -90,7 +90,7 @@ "instanceName": "hvf6arlba007_lba_dj_01", "action": "Create", "lcpCloudRegionId": "hvf6", - "tenantId": "092eb9e8e4b7412e8787dd091bc58e86", + "tenantId": "4914ab0ab3a743e58f0eefdacc1dde77", "instanceParams": [ {} ], 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/integration/iFrames/instantiationStatus.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts index c510391cb..342818a71 100644 --- a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts @@ -7,7 +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'; + const contextMenuCreateAnotherOne = 'context-menu-create-another-one'; beforeEach(() => { cy.clearSessionStorage(); @@ -126,6 +126,7 @@ describe('Instantiation status', function () { cy.openIframe('app/ui/#/instantiationStatus'); clickOnTitleAndThenOnMenuWithJobId(jobId); + cy.get('.dropdown-menu').getElementByDataTestsId(contextMenuCreateAnotherOne).contains('Create another one'); 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/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); diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.spec.ts index 76fc28a9e..7e28b2a65 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.spec.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.spec.ts @@ -63,6 +63,30 @@ describe('Generate path to old View/Edit ', () => { })().then(done).catch(done.fail)); + each([ + ['', DrawingBoardModes.RECREATE, true], + ['', DrawingBoardModes.CREATE, true], + ['Create', DrawingBoardModes.EDIT, true], + ['Create', DrawingBoardModes.RETRY_EDIT, true], + ['Create', DrawingBoardModes.VIEW, false], + ['Create', DrawingBoardModes.OLD_VIEW_EDIT, false], + + + ]). + test('should show edit button in correct Drawing Board Mode state', (action: string, mode: DrawingBoardModes, expected: boolean) => { + jest.spyOn(store, 'getState').mockReturnValue(<any>{ + service: { + serviceInstance : { + 'serviceInstanceId' : { + action: action + } + } + } + }); + + let result = service.showEditService(mode,'serviceInstanceId' ); + expect (result).toBe(expected); + }); test('should generate url to old view/edit ', () => { const query: string = 'subscriberId=subscriberId&subscriberName=subscriberName&serviceType=serviceType&serviceInstanceId=serviceInstanceId'; 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 634fa6271..4e8e31163 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 || mode === DrawingBoardModes.RECREATE )&& + return mode === DrawingBoardModes.CREATE || mode === DrawingBoardModes.RECREATE || ((mode === DrawingBoardModes.RETRY_EDIT || mode === DrawingBoardModes.EDIT)&& !_.isNil(serviceInstance) && !_.isNil(serviceInstance[serviceModelId])&& serviceInstance[serviceModelId].action === ServiceInstanceActions.Create); } diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts index 58227c9eb..4f84b7125 100644 --- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts +++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts @@ -59,8 +59,8 @@ export class InstantiationStatusComponent implements OnInit { visible: () => true, }, { - name: "Recreate", - dataTestId: "context-menu-recreate", + name: "Create another one", + dataTestId: "context-menu-create-another-one", className: "fa-clone", click: (item: ServiceInfoModel) => this.instantiationStatusComponentService.recreate(item), enabled: (item: ServiceInfoModel) => this.instantiationStatusComponentService.isRecreateEnabled(item), diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html index 86c46ab3b..fe08bf086 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html @@ -148,7 +148,7 @@ </div> <div class="col-md-6" style="padding: 15px;padding-right: 35px;"> <button - [disabled]="selectedInstantiation && selectedInstantiation.jobId === null" + [disabled]="selectedInstantiation === null" [attr.data-tests-id]="'LoadTemplateButton'" type="button" class="btn btn-primary submit" (click)="loadTemplate()"><span>Load Template</span> |