aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
diff options
context:
space:
mode:
authorAlexey Sandler <alexey.sandler@intl.att.com>2020-02-13 09:53:14 +0200
committerAlexey Sandler <alexey.sandler@intl.att.com>2020-02-13 16:43:49 +0200
commit560933802c75e62c7ba9199025edf871bc9a74d5 (patch)
tree119a96d885741930491e7e8fad1ddf44736f426f /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
parentf3ae1b251eecdf18c2827eb03db23e10ad9ddb76 (diff)
create unit test for shouldShowUpgrade function
Issue-ID: VID-758 Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com> Change-Id: I11790efb51007275b8b1331dbfd31ada7eabd3e2 Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts12
1 files changed, 6 insertions, 6 deletions
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 9e7a0211e..de859e4ea 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
@@ -216,13 +216,13 @@ export class SharedTreeService {
* should return true if customer can upgrade a VFM *
****************************************************/
shouldShowUpgrade(node, serviceModelId): boolean {
- if (FeatureFlagsService.getFlagState(Features.FLAG_FLASH_REPLACE_VF_MODULE, this._store) &&
- (this.isThereAnUpdatedLatestVersion(serviceModelId)) || this.isVfmoduleAlmostPartOfModelOnlyCustomizationUuidDiffer(node, serviceModelId)) {
- return this.shouldShowButtonGeneric(node, VNFMethods.UPGRADE, serviceModelId);
- }
- else {
- return false
+ return (this.isVfMoudleCouldBeUpgraded(node, serviceModelId))
+ && this.shouldShowButtonGeneric(node, VNFMethods.UPGRADE, serviceModelId) ;
}
+
+ isVfMoudleCouldBeUpgraded(node, serviceModelId): boolean{
+ return (FeatureFlagsService.getFlagState(Features.FLAG_FLASH_REPLACE_VF_MODULE, this._store) &&
+ ((this.isThereAnUpdatedLatestVersion(serviceModelId)) || this.isVfmoduleAlmostPartOfModelOnlyCustomizationUuidDiffer(node, serviceModelId)))
}