From decd21f501cbd5df2ec7436cce98b0a75f61ee29 Mon Sep 17 00:00:00 2001 From: Amichai Hemli Date: Sun, 1 Mar 2020 16:36:19 +0200 Subject: when signaling the frontend about templates check the correct flag FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE Issue-ID: VID-739 Signed-off-by: Amichai Hemli Change-Id: Iaed25f1932eed675310c8d0003d415352991d19e --- .../java/org/onap/vid/services/InstantiationTemplatesService.java | 2 +- .../java/org/onap/vid/services/InstantiationTemplatesServiceTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'vid-app-common') diff --git a/vid-app-common/src/main/java/org/onap/vid/services/InstantiationTemplatesService.java b/vid-app-common/src/main/java/org/onap/vid/services/InstantiationTemplatesService.java index 17520eef4..8837798ef 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/InstantiationTemplatesService.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/InstantiationTemplatesService.java @@ -76,7 +76,7 @@ public class InstantiationTemplatesService { } public Collection setOnEachServiceIsTemplateExists(Collection services){ - if (!featureManager.isActive(Features.FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE)){ + if (!featureManager.isActive(Features.FLAG_2004_INSTANTIATION_TEMPLATES_POPUP)){ return unsetTemplateExistsToAllServices(services); } diff --git a/vid-app-common/src/test/java/org/onap/vid/services/InstantiationTemplatesServiceTest.java b/vid-app-common/src/test/java/org/onap/vid/services/InstantiationTemplatesServiceTest.java index de9fc2bcb..48895fe84 100644 --- a/vid-app-common/src/test/java/org/onap/vid/services/InstantiationTemplatesServiceTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/services/InstantiationTemplatesServiceTest.java @@ -140,7 +140,7 @@ public class InstantiationTemplatesServiceTest { @Test public void setTemplatesExistance_givenCollection__flagIsActive_thenSameCollectionReturnedWithTemplateExistsProperty(){ - when(featureManager.isActive(Features.FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE)).thenReturn(true); + when(featureManager.isActive(Features.FLAG_2004_INSTANTIATION_TEMPLATES_POPUP)).thenReturn(true); when(asyncInstantiationRepository.getAllTemplatesServiceModelIds()).thenReturn(ImmutableSet.of("1", "2")); Collection actualCollection = instantiationTemplatesService.setOnEachServiceIsTemplateExists(createGivenCollection()); assertThat(actualCollection, containsInAnyOrder( @@ -151,7 +151,7 @@ public class InstantiationTemplatesServiceTest { @Test public void setTemplatesExistance_givenCollection_flagIsNotActive_thenTemplatesExistNotAdded(){ - when(featureManager.isActive(Features.FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE)).thenReturn(false); + when(featureManager.isActive(Features.FLAG_2004_INSTANTIATION_TEMPLATES_POPUP)).thenReturn(false); Collection actualCollection = instantiationTemplatesService.setOnEachServiceIsTemplateExists(createGivenCollection()); assertThat("was " + actualCollection, actualCollection, containsInAnyOrder( allOf(hasProperty("uuid", is("1")), hasProperty("isInstantiationTemplateExists", is(false))), -- cgit 1.2.3-korg