summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts16
-rw-r--r--vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json3
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts8
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts8
-rw-r--r--vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts1
5 files changed, 35 insertions, 1 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
index cf727b5ea..56a2491e5 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
@@ -8,6 +8,7 @@ describe('Instantiation status', function () {
var jsonBuilderInstantiationBuilder : JsonBuilder<AsyncInstantiationModel> = new JsonBuilder<AsyncInstantiationModel>();
var asyncRes: Array<any>;
const contextMenuCreateAnotherOne = 'context-menu-create-another-one';
+ const contextMenuNewViewEdit = 'context-menu-new-view-edit';
beforeEach(() => {
cy.clearSessionStorage();
@@ -133,4 +134,19 @@ describe('Instantiation status', function () {
});
});
+ it('clicking on new view edit, go to expected url', function () {
+ //see cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json id:10
+ const jobId = '850dc7d2-5240-437f-9bcd-b1ed7dc339c1';
+ const serviceModelId = 'e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0';
+ const vidBaseUrl = `${Cypress.config().baseUrl}/serviceModels.htm`;
+ const serviceType = 'TYLER%20SILVIA';
+
+ cy.openIframe('app/ui/#/instantiationStatus');
+ clickOnTitleAndThenOnMenuWithJobId(jobId);
+ cy.get('.dropdown-menu').getElementByDataTestsId(contextMenuNewViewEdit).contains('New View/Edit');
+ cy.get('.dropdown-menu').getElementByDataTestsId(contextMenuNewViewEdit).click();
+ cy.location().should((location) => {
+ expect(location.toString()).to.eq(`${vidBaseUrl}#/servicePlanning/EDIT?serviceModelId=${serviceModelId}&serviceType=${serviceType}&jobId=${jobId}`);
+ });
+ });
});
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json
index 7c778c86b..d60b37563 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json
@@ -26,5 +26,6 @@
"FLAG_2006_VFM_SDNC_PRELOAD_FILES" : true,
"FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF": true,
"FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT" :true,
- "FLAG_2006_NETWORK_LOB_MULTI_SELECT" : true
+ "FLAG_2006_NETWORK_LOB_MULTI_SELECT" : true,
+ "FLAG_2006_NEW_VIEW_EDIT_BUTTON_IN_INSTANTIATION_STATUS" : true
}
diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
index 3c45632ee..a6445193c 100644
--- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
+++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts
@@ -189,6 +189,14 @@ export class InstantiationStatusComponentService {
isRecreateVisible(): boolean {
return this._featureFlagsService.getFlagState(Features.FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE);
}
+
+ isNewViewEditVisible(): boolean {
+ return this._featureFlagsService.getFlagState(Features.FLAG_2006_NEW_VIEW_EDIT_BUTTON_IN_INSTANTIATION_STATUS);
+ }
+
+ forwardToNewViewEdit(item: ServiceInfoModel): void {
+ this.navigateToNewViewEdit(item, DrawingBoardModes.EDIT);
+ }
}
diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts
index f27faac60..4dccb9e32 100644
--- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts
+++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts
@@ -59,6 +59,14 @@ export class InstantiationStatusComponent implements OnInit {
visible: () => true,
},
{
+ name: "New View/Edit",
+ dataTestId: "context-menu-new-view-edit",
+ className: "fa-pencil",
+ click: (item: ServiceInfoModel) => this.instantiationStatusComponentService.forwardToNewViewEdit(item),
+ enabled: () => true,
+ visible: () => this.instantiationStatusComponentService.isNewViewEditVisible(),
+ },
+ {
name: "Create another one",
dataTestId: "context-menu-create-another-one",
className: "fa-clone",
diff --git a/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts b/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts
index 78a2b1e67..2a867ee32 100644
--- a/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts
+++ b/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts
@@ -21,6 +21,7 @@ export enum Features {
FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY= 'FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY',
FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF = 'FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF',
FLAG_2006_VNF_LOB_MULTI_SELECT= 'FLAG_2006_VNF_LOB_MULTI_SELECT',
+ FLAG_2006_NEW_VIEW_EDIT_BUTTON_IN_INSTANTIATION_STATUS= 'FLAG_2006_NEW_VIEW_EDIT_BUTTON_IN_INSTANTIATION_STATUS',
}