aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.spec.ts24
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts2
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts4
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html2
4 files changed, 28 insertions, 4 deletions
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>