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/instantiation.templates.modal.e2e.ts2
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts2
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts6
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts12
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.ts4
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts2
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.ts2
7 files changed, 15 insertions, 15 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
index 0db1b099a..168a93617 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
@@ -71,7 +71,7 @@ describe('Template', () => {
cy.route(Cypress.config('baseUrl') + "/getuserID", 'us16807000');
- cy.openPopupIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true&hasTemplate=true');
+ cy.openPopupIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true&isInstantiationTemplateExists=true');
});
diff --git a/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
index 4b27ad008..de29313a3 100644
--- a/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
@@ -36,7 +36,7 @@ describe('Service popup', function () {
res1.global.flags = {};
res1.global.flags["FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"] = true;
cy.setReduxState(<any>res1);
- cy.openPopupIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true&hasTemplate=true');
+ cy.openPopupIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true&isInstantiationTemplateExists=true');
cy.getElementByDataTestsId('templateButton').should('be.visible')
});
});
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
index 9063e6723..19ea9b9ee 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
@@ -89,7 +89,7 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
.subscribe(params => {
this.serviceModelId = params['serviceModelId'];
if (this.serviceModelId && params['isCreate'] == "true") {
- this.onInitForCreateNewServicePopup(params['hasTemplate']);
+ this.onInitForCreateNewServicePopup(params['isInstantiationTemplateExists']);
}
});
@@ -107,7 +107,7 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
}
}
- private onInitForCreateNewServicePopup(hasTemplate : boolean) {
+ private onInitForCreateNewServicePopup(isInstantiationTemplateExists : boolean) {
this._genericFormPopupService.initReduxOnCreateNewService().then((serviceModelId: string) => {
this.uuidData = <any>{
bulkSize: 1,
@@ -117,7 +117,7 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
popupService: this._servicePopupService,
};
- this.showTemplateBtn = this._genericFormPopupService.shouldShowTemplateBtn(hasTemplate);
+ this.showTemplateBtn = this._genericFormPopupService.shouldShowTemplateBtn(isInstantiationTemplateExists);
this.isShowPreviousInstantiationBtn = !!this._store.getState().global.flags["FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER"];
this.uuidData.popupService.closeDialogEvent.subscribe((that) => {
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
index 53f345af0..9680c0655 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
@@ -1074,14 +1074,14 @@ describe('Generic Form popup Service', () => {
const shouldShowTemplateBtnDataProvider = [
- ['shouldShowTemplateBtn : should return true if flag is true and has template', true , true, true],
- ['shouldShowTemplateBtn : should return false if flag is false and has template',false , true, false],
- ['shouldShowTemplateBtn : should return false if flag is true and has no template',true , false, false],
- ['shouldShowTemplateBtn : should return false if flag is false and has no template',false , false, false]];
- each(shouldShowTemplateBtnDataProvider).test('%s', (desc : string, flag : boolean, hasTemplate : boolean, expected : boolean ) => {
+ ['shouldShowTemplateBtn : should return true if flag is true and has instantiation template', true , true, true],
+ ['shouldShowTemplateBtn : should return false if flag is false and has instantiation template',false , true, false],
+ ['shouldShowTemplateBtn : should return false if flag is true and has no instantiation template',true , false, false],
+ ['shouldShowTemplateBtn : should return false if flag is false and has no instantiation template',false , false, false]];
+ each(shouldShowTemplateBtnDataProvider).test('%s', (desc : string, flag : boolean, isInstantiationTemplateExists : boolean, expected : boolean ) => {
spyOn(_featureFlagsService, 'getFlagState').and.returnValue(flag)
- const result: boolean = service.shouldShowTemplateBtn(hasTemplate);
+ const result: boolean = service.shouldShowTemplateBtn(isInstantiationTemplateExists);
expect(result).toEqual(expected);
});
});
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.ts
index 2998ba92b..e3cdaef85 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.ts
@@ -95,10 +95,10 @@ export class GenericFormPopupService {
- shouldShowTemplateBtn = (hasTemplate: boolean) : boolean => {
+ shouldShowTemplateBtn = (isInstantiationTemplateExists: boolean) : boolean => {
const instantiationTemplateFlag = this._featureFlagsService.getFlagState(Features.FLAG_2004_INSTANTIATION_TEMPLATES_POPUP);
if(instantiationTemplateFlag){
- return hasTemplate;
+ return isInstantiationTemplateExists;
}
return false;
}
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts
index 61f75e84b..78614c0f8 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts
@@ -173,7 +173,7 @@ describe('instantiation templates modal service', () => {
service.navigateToNewServiceModal(serviceModelId);
- expect(_router.navigate).toBeCalledWith(["/servicePopup"], {"queryParams": {"isCreate": true, "serviceModelId": serviceModelId, hasTemplate : true}, "queryParamsHandling": "merge"});
+ expect(_router.navigate).toBeCalledWith(["/servicePopup"], {"queryParams": {"isCreate": true, "serviceModelId": serviceModelId, isInstantiationTemplateExists : true}, "queryParamsHandling": "merge"});
})
});
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.ts
index c7c198fcb..5c092e9af 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.ts
@@ -30,7 +30,7 @@ export class InstantiationTemplatesModalService {
navigateToNewServiceModal(serviceModelId: string) {
- this._router.navigate(['/servicePopup'], { queryParams: { serviceModelId: serviceModelId, isCreate:true, hasTemplate : true}, queryParamsHandling: 'merge' });
+ this._router.navigate(['/servicePopup'], { queryParams: { serviceModelId: serviceModelId, isCreate:true, isInstantiationTemplateExists : true}, queryParamsHandling: 'merge' });
}
}