summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard
diff options
context:
space:
mode:
authorikram <ikram@research.att.com>2020-07-22 10:28:15 -0400
committerikram <ikram@research.att.com>2020-07-29 12:10:13 -0400
commit09a6562a16715a2b89be11c941486be783c72364 (patch)
tree1be9688b1cf602b3c2e07852bd15772db2f9a546 /vid-webpack-master/src/app/drawingBoard
parenta643d19710317384571fb49f28d9de4f1a17778d (diff)
Test Cases Addition and Fixes
Issue-ID: VID-858 Integration Tests are edited in this patch to support functionality in VID-858. Signed-off-by: ikram <ikram@research.att.com> Change-Id: I378cb2afd0f2c994a856ad31895cec3fca376b33
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.spec.ts5
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.ts3
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts10
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts14
4 files changed, 26 insertions, 6 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.spec.ts
index 90ecb8565..f76cf2133 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.spec.ts
@@ -75,9 +75,10 @@ describe('Drawing board tree Service', () => {
new TreeNodeContextMenuModel('undoDelete', 'context-menu-undoDelete', 'Undo Delete', 'undo-delete'),
new TreeNodeContextMenuModel('undoUpgrade', 'context-menu-undoUpgrade', 'Undo Upgrade', 'undo-delete'),
new TreeNodeContextMenuModel('changeAssociations', 'context-menu-changeAssociations', 'Change Associations', 'edit-file-o'),
- new TreeNodeContextMenuModel('pauseInstantiation', 'context-menu-pause', 'Add pause upon completion', 'pause-upon-completion')
+ new TreeNodeContextMenuModel('pauseInstantiation', 'context-menu-pause', 'Add pause upon completion', 'pause-upon-completion'),
+ new TreeNodeContextMenuModel('removePause', 'context-menu-removePause', 'Remove Pause', 'pause-upon-completion')
];
- expect(options.length).toEqual(11);
+ expect(options.length).toEqual(12);
expect(options).toEqual(expected);
});
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.ts
index 3fc5c531c..fe3f0932a 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.ts
@@ -54,7 +54,8 @@ export class DrawingBoardTreeService {
new TreeNodeContextMenuModel('undoDelete', 'context-menu-undoDelete', 'Undo Delete', 'undo-delete'),
new TreeNodeContextMenuModel('undoUpgrade', 'context-menu-undoUpgrade', 'Undo Upgrade', 'undo-delete'),
new TreeNodeContextMenuModel('changeAssociations', 'context-menu-changeAssociations', 'Change Associations', 'edit-file-o'),
- new TreeNodeContextMenuModel('pauseInstantiation', 'context-menu-pause', 'Add pause upon completion', 'pause-upon-completion')
+ new TreeNodeContextMenuModel('pauseInstantiation', 'context-menu-pause', 'Add pause upon completion', 'pause-upon-completion'),
+ new TreeNodeContextMenuModel('removePause', 'context-menu-removePause', 'Remove Pause', 'pause-upon-completion')
];
}
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
index f7bf35abd..33ec0804f 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
@@ -23,6 +23,7 @@ import {
deleteActionVfModuleInstance,
deleteVFModuleField,
pauseActionVFModuleInstance,
+ removePauseActionVFModuleInstance,
removeVfModuleInstance,
undoDeleteVfModuleInstance,
undoUgradeVFModule,
@@ -393,7 +394,14 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
method: (node, serviceModelId) => {
this._store.dispatch(pauseActionVFModuleInstance(node.data.dynamicModelName, node.parent.data.vnfStoreKey, serviceModelId, node.data.modelName));
},
- visible: () => this._sharedTreeService.shouldShowPauseInstantiation(),
+ visible: () => this._sharedTreeService.shouldShowPauseInstantiation(node),
+ enable: () => true,
+ },
+ removePause: {
+ method: (node, serviceModelId) => {
+ this._store.dispatch(removePauseActionVFModuleInstance(node.data.dynamicModelName, node.parent.data.vnfStoreKey, serviceModelId, node.data.modelName));
+ },
+ visible: () => this._sharedTreeService.shouldShowRemovePause(node),
enable: () => true,
}
};
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
index 98edb4161..3b00e64c3 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
@@ -1,7 +1,7 @@
import {Injectable} from "@angular/core";
import {NgRedux} from "@angular-redux/store";
import {AppState} from "../../../shared/store/reducers";
-import {ServiceInstanceActions} from "../../../shared/models/serviceInstanceActions";
+import {PauseStatus, ServiceInstanceActions} from "../../../shared/models/serviceInstanceActions";
import {MessageBoxData} from "../../../shared/components/messageBox/messageBox.data";
import {MessageBoxService} from "../../../shared/components/messageBox/messageBox.service";
import * as _ from "lodash";
@@ -222,7 +222,17 @@ export class SharedTreeService {
}
}
- shouldShowPauseInstantiation(): boolean {
+ shouldShowRemovePause(node) : boolean {
+ if(FeatureFlagsService.getFlagState(Features.FLAG_2008_REMOVE_PAUSE_INSTANTIATION, this._store)){
+ return node.pauseInstantiation === PauseStatus.AFTER_COMPLETION;
+ }
+ return false;
+ }
+
+ shouldShowPauseInstantiation(node): boolean {
+ if(FeatureFlagsService.getFlagState(Features.FLAG_2008_REMOVE_PAUSE_INSTANTIATION, this._store)){
+ return (FeatureFlagsService.getFlagState(Features.FLAG_2006_PAUSE_VFMODULE_INSTANTIATION_CREATION, this._store) && node.pauseInstantiation == null);
+ }
return (FeatureFlagsService.getFlagState(Features.FLAG_2006_PAUSE_VFMODULE_INSTANTIATION_CREATION, this._store));
}
/****************************************************