adding orchestration type to service models view
[vid.git] / vid-automation / src / main / java / vid / automation / test / test / BrowseASDCTest.java
index 3843d6a..eb08c1f 100644 (file)
@@ -1,20 +1,18 @@
 package vid.automation.test.test;
 
 import com.google.common.collect.ImmutableList;
-import org.glassfish.jersey.uri.internal.JerseyUriBuilder;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hamcrest.Matchers;
-import org.opencomp.simulator.presetGenerator.presets.BasePresets.BasePreset;
-import org.opencomp.simulator.presetGenerator.presets.aai.PresetAAIGetServiceModelList;
-import org.opencomp.simulator.presetGenerator.presets.aai.PresetAAIGetServicesGet;
-import org.opencomp.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
-import org.opencomp.simulator.presetGenerator.presets.aai.PresetAAIServiceDesignAndCreationPut;
-import org.opencomp.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
-import org.openecomp.sdc.ci.tests.datatypes.UserCredentials;
-import org.openecomp.sdc.ci.tests.utilities.GeneralUIUtils;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetServicesGet;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIServiceDesignAndCreationPut;
+import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
+import org.onap.sdc.ci.tests.datatypes.UserCredentials;
+import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebElement;
-import org.springframework.http.client.ClientHttpRequestInterceptor;
-import org.springframework.web.client.RestTemplate;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
@@ -27,57 +25,48 @@ import vid.automation.test.model.User;
 import vid.automation.test.sections.*;
 import vid.automation.test.services.ServicesService;
 import vid.automation.test.services.SimulatorApi;
-import vid.automation.test.utils.CookieAndJsonHttpHeadersInterceptor;
 
-import java.net.URI;
-import java.net.URISyntaxException;
 import java.util.List;
 
-import static java.util.Collections.singletonList;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
+import static vid.automation.test.infra.Features.FLAG_5G_IN_NEW_INSTANTIATION_UI;
+import static vid.automation.test.infra.Features.FLAG_SHOW_ORCHESTRATION_TYPE;
+import static vid.automation.test.infra.Features.FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI;
+import static vid.automation.test.infra.ModelInfo.*;
 
 
 public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
-    private final String invariantUUIDAlacarte = "a8dcd72d-d44d-44f2-aa85-53aa9ca99cba";
-    private final String invariantUUIDMacro = "d27e42cf-087e-4d31-88ac-6c4b7585f800";
+    private final String invariantUUIDAlacarte = aLaCarteForBrowseSdc.modelInvariantId;
+    private final String invariantUUIDMacro = macroForBrowseSdc.modelInvariantId;
     private final String instantiationTypeNameAlacarte = "a la carte";
     private final String instantiationTypeNameMacro = "macro";
     private final String oldMacro = "old macro";
-    private String modelInvariantUUID1 = "aeababbc-010b-4a60-8df7-e64c07389466";
-    private String modelInvariantUUID2 = "aa2f8e9c-9e47-4b15-a95c-4a9385599abc";
-    private String modelInvariantUUID3 = "d849c57d-b6fe-4843-8349-4ab8bbb08d71";
-    private String modelUuid = "a8dcd72d-d44d-44f2-aa85-53aa9ca99cba";
-    protected final RestTemplate restTemplate = new RestTemplate();
+    private final String newAlacarte = "new a la carte";
+    public static final String modelInvariantUUID1 = "aeababbc-010b-4a60-8df7-e64c07389466";
+    public static final String modelInvariantUUID2 = "aa2f8e9c-9e47-4b15-a95c-4a9385599abc";
+    public static final String modelInvariantUUID3 = "d849c57d-b6fe-4843-8349-4ab8bbb08d71";
+    public static final String modelUuid = "a8dcd72d-d44d-44f2-aa85-53aa9ca99cba";
 
     private ServicesService servicesService = new ServicesService();
-    final URI envUrI;
-    protected final URI uri;
 
-    public BrowseASDCTest() throws URISyntaxException {
-        this.envUrI = new URI(System.getProperty("ENV_URL"));
-        this.uri = new JerseyUriBuilder().host(envUrI.getHost()).port(envUrI.getPort()).scheme("http").path("vid").build();
-    }
+    private final Logger logger = LogManager.getLogger(BrowseASDCTest.class);
 
     @BeforeClass
-    public void login() {
-        UserCredentials userCredentials = getUserCredentials();
-        final List<ClientHttpRequestInterceptor> interceptors = singletonList(new CookieAndJsonHttpHeadersInterceptor(uri, userCredentials));
-        restTemplate.setInterceptors(interceptors);
+    public void beforeClass() {
+        resetGetServicesCache();
     }
 
     @BeforeMethod
-    public void invalidateTheCacheSelenium() {
-        if (Features.FLAG_SERVICE_MODEL_CACHE.isActive()) {
-            restTemplate.postForObject(uri + "/rest/models/reset", "", Object.class);
-        }
+    public void resetSdcModelCaches() {
+        invalidateSdcModelsCache();
     }
 
     @Override
     protected UserCredentials getUserCredentials() {
-        User user = usersService.getUser(Constants.Users.MOBILITY_MOBILITY);
-        return new UserCredentials(user.credentials.userId, user.credentials.password, Constants.Users.MOBILITY_MOBILITY, "", "");
+        User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
+        return new UserCredentials(user.credentials.userId, user.credentials.password, Constants.Users.EMANUEL_EMANUEL, "", "");
     }
 
     @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
@@ -87,7 +76,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         SideMenu.navigateToBrowseASDCPage();
         browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
         assertThatServiceCreationDialogIsVisible();
-        validatePNFCreationDialog(service, "Mobility", "pnf");
+        validatePNFCreationDialog(service, "Emanuel", "pnf");
     }
 
     private void validatePNFCreationDialog(Service service, String serviceType, String serviceRole) {
@@ -103,7 +92,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
 
     @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
     private void testPNFMacroInstantation() throws Exception {
-        User user = usersService.getUser(Constants.Users.MOBILITY_MOBILITY);
+        User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
         relogin(user.credentials);
 
         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
@@ -115,9 +104,9 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         browseASDCPage.selectProductFamily("ebc3bc3d-62fd-4a3f-a037-f619df4ff034");
         GeneralUIUtils.ultimateWait();
 
-        browseASDCPage.selectServiceTypeByName("Mobility");
+        browseASDCPage.selectServiceTypeByName("Emanuel");
         GeneralUIUtils.ultimateWait();
-        browseASDCPage.selectLcpRegion("mtn16");
+        browseASDCPage.selectLcpRegion("hvf16");
 
         browseASDCPage.selectTenant("a259ae7b7c3f493cb3d91f95a7c18149");
         assertAllIsPermitted(Constants.BrowseASDC.AIC_OPTION_CLASS);
@@ -136,15 +125,6 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         viewEditPage.clickActivateButton();
     }
 
-//    @Test
-//    private void browseServiceModel_deployServiceUnexpectedDeploymentMode_creationPopupIsMacro() throws Exception {
-//        deployServiceAndAssertInstantiationType(
-//                "don't know.zip",
-//                "a8dcd72d-d44d-44f2-aa85-53aa9ca99cba",
-//                "macro"
-//        );
-//    }
-
     @Test
     private void browseServiceModel_deployServiceALaCarteByBackendInput_creationPopupIsALaCarte() throws Exception {
         // model uuid should be of macro
@@ -155,6 +135,15 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         );
     }
 
+    @Test
+    @FeatureTogglingTest(FLAG_5G_IN_NEW_INSTANTIATION_UI)
+    private void browseServiceModel_deployServiceALaCarteByBackendInputHintNewUI_creationPopupIsAngular2() throws Exception {
+        deployServiceAndAssertInstantiationType(
+                instantiationTypeAlacarte_vidNotionsInstantiationUIByUUID,
+                newAlacarte
+        );
+    }
+
     @Test
     private void browseServiceModel_deployServiceALaCarteBecauseNotOnMACRO_SERVICESConfig_creationPopupIsALaCarte() throws Exception {
         deployServiceAndAssertInstantiationType(
@@ -167,7 +156,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
     @Test
     private void browseServiceModel_deployServiceMacroByBackendInput_creationPopupIsMacro() throws Exception {
         deployServiceAndAssertInstantiationType(
-                "csar15782222_instantiationTypeMacro_invariantUUIDAlacarte.zip",
+                "csar15782222_instantiationTypeMacro_invariantUUIDAlacarte_withoutNetworks.zip",
                 invariantUUIDAlacarte,
                 instantiationTypeNameMacro
         );
@@ -194,7 +183,8 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
     }
 
     @Test
-    private void browseServiceModel_deployServiceMacroWithCR_creationPopupIsOldMacro() throws Exception {
+    @FeatureTogglingTest(flagActive = false, value = FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI)
+    public void browseServiceModel_deployServiceMacroWithCR_creationPopupIsOldMacro() throws Exception {
         deployServiceAndAssertInstantiationType(
                 "csar15782222_instantiationTypeMacroWithCR.zip",
                 invariantUUIDMacro,
@@ -205,7 +195,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
 
     @Test
     private void browseServiceModel_deployServiceMacroWithNetwork_creationPopupIsMacroByFF() throws Exception {
-        String macroInstantiationAccordingFF = Features.FLAG_ASYNC_INSTANTIATION.isActive() && Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION.isActive() ? instantiationTypeNameMacro : oldMacro;
+        String macroInstantiationAccordingFF = Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION.isActive() ? instantiationTypeNameMacro : oldMacro;
         deployServiceAndAssertInstantiationType(
                 "csar15782222_instantiationTypeMacroWithNetwork.zip",
                 invariantUUIDMacro,
@@ -215,17 +205,20 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
 
 
     private void deployServiceAndAssertInstantiationType(String modelZipFileName, String modelInvariantId, String expectedInstantiationType) throws Exception {
-        String modelVersionId = "4d71990b-d8ad-4510-ac61-496288d9078e";
+        deployServiceAndAssertInstantiationType(new ModelInfo("4d71990b-d8ad-4510-ac61-496288d9078e", modelInvariantId, modelZipFileName), expectedInstantiationType);
+    }
+
+    private void deployServiceAndAssertInstantiationType(ModelInfo modelInfo, String expectedInstantiationType) throws Exception {
 
-        registerExpectationForLegacyServiceDeployment(modelVersionId, modelInvariantId, modelZipFileName, null);
-        User user = usersService.getUser(Constants.Users.MOBILITY_MOBILITY);
+        registerExpectationForLegacyServiceDeployment(modelInfo, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
+        User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
         relogin(user.credentials);
 
         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
         SideMenu.navigateToBrowseASDCPage();
 
         GeneralUIUtils.ultimateWait();
-        browseASDCPage.clickDeployServiceButtonByServiceUUID(modelVersionId);
+        browseASDCPage.clickDeployServiceButtonByServiceUUID(modelInfo.modelVersionId);
         DeployMacroDialogBase macroDialog = null;
         if (expectedInstantiationType.equals(instantiationTypeNameAlacarte)) {
             GeneralUIUtils.ultimateWait();
@@ -239,28 +232,26 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
 
     @Test
     private void testServiceInstantiationAlaCarte() throws Exception {
-        User user = usersService.getUser(Constants.Users.MOBILITY_MOBILITY);
+        User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
         relogin(user.credentials);
 
-        String zipFileName = "serviceCreationTest.zip";
-        String modelVersionId = "aa2f8e9c-9e47-4b15-a95c-4a9385599abc"; //uuid of model. must be same as in serviceCreationTest.zip
-        String modelInvariantId = invariantUUIDAlacarte; //must be same as in serviceCreationTest.zip
-
-        registerExpectationForLegacyServiceDeployment(modelVersionId, modelInvariantId, zipFileName, null);
+        registerExpectationForLegacyServiceDeployment(aLaCarteServiceCreationTest, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
 
         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
         SideMenu.navigateToBrowseASDCPage();
 
         Service service = new Service(
                 "pnf",
-                modelVersionId,
-                modelInvariantId,
+                aLaCarteServiceCreationTest.modelVersionId,
+                aLaCarteServiceCreationTest.modelInvariantId,
                 "action-data",
                 "1.0",
                 "Network L1-3",
-                "ADIOD vMX vPE based on Juniper 17.2 release. Updated with updated VF for v8.0 of VLM",
+                "PASQUALE vMX vPE based on Juniper 17.2 release. Updated with updated VF for v8.0 of VLM",
                 null);
 
+
+        logger.info("Expected service model properties: "+service.toString());
         browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
         validateServiceCreationDialog(service);
 
@@ -269,7 +260,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
         browseASDCPage.selectSubscriberById("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
 
-        String serviceType = "Mobility";
+        String serviceType = "Emanuel";
         GeneralUIUtils.findAndWaitByText(serviceType, 30);
 
         assertDropdownPermittedItemsByValue(user.serviceTypes, Constants.CreateNewInstance.SERVICE_TYPE_OPTION_CLASS);
@@ -297,14 +288,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
 
     @Test(dataProvider = "filterTexts")
     public void testFilterOptionsInBrowseSdc(String filterText){
-        SimulatorApi.registerExpectation(SimulatorApi.RegistrationStrategy.APPEND,
-                "ecompportal_getSessionSlotCheckInterval.json",
-                "browseASDC/aai_get_services.json",
-                "browseASDC/get_aai_get_subscribers.json",
-                "browseASDC/get_sdc_catalog_services_2f80c596.json",
-                "browseASDC/service_design_and_creation.json");
-        SideMenu.navigateToBrowseASDCPage();
-        BrowseASDCPage browseAsdcPage = new BrowseASDCPage();
+        BrowseASDCPage browseAsdcPage = registerSimulatorAndGoToBrowseSDC();
         GeneralUIUtils.ultimateWait();
         assertThat(browseAsdcPage.countCurrentRowsInTable(),(Matchers.greaterThan(1)));
         browseAsdcPage.fillFilterText(filterText);
@@ -316,16 +300,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
 
     @Test
     private void testCategoryParamsDropdownsExistsInCreationDialog() throws Exception {
-        SimulatorApi.registerExpectation(SimulatorApi.RegistrationStrategy.APPEND,
-                "ecompportal_getSessionSlotCheckInterval.json",
-                "browseASDC/aai_get_services.json",
-                "browseASDC/get_aai_get_subscribers.json",
-                "browseASDC/get_sdc_catalog_services_2f80c596.json",
-                "browseASDC/service_design_and_creation.json");
-        User user = usersService.getUser(Constants.Users.USP_VOICE_VIRTUAL_USP);
-        relogin(user.credentials);
-        BrowseASDCPage browseASDCPage = new BrowseASDCPage();
-        SideMenu.navigateToBrowseASDCPage();
+        BrowseASDCPage browseASDCPage = registerSimulatorAndGoToBrowseSDC();
         Service service = servicesService.getService("2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd");
         browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
         DeployMacroDialogBase deployMacroDialog = getMacroDialog();
@@ -334,9 +309,24 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         deployMacroDialog.clickOwningEntitySelect();
     }
 
+    private BrowseASDCPage registerSimulatorAndGoToBrowseSDC() {
+        SimulatorApi.registerExpectation(SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET,
+                "ecompportal_getSessionSlotCheckInterval.json",
+                "browseASDC/aai_get_services.json",
+                "browseASDC/get_sdc_catalog_services_2f80c596.json"
+        );
+        SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
+                    new PresetAAIGetSubscribersGet(),
+                    new PresetAAIServiceDesignAndCreationPut()
+                ),
+                SimulatorApi.RegistrationStrategy.APPEND);
+        SideMenu.navigateToBrowseASDCPage();
+        return new BrowseASDCPage();
+    }
+
     @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
     private void testOwningEntityRequiredAndProjectOptional() throws Exception {
-        User user = usersService.getUser(Constants.Users.USP_VOICE_VIRTUAL_USP);
+        User user = usersService.getUser(Constants.Users.SILVIA_ROBBINS_TYLER_SILVIA);
         relogin(user.credentials);
 
         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
@@ -352,7 +342,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
         browseASDCPage.selectSubscriberById("e433710f-9217-458d-a79d-1c7aff376d89");
 
-        String serviceType = "VIRTUAL USP";
+        String serviceType = "TYLER SILVIA";
         GeneralUIUtils.findAndWaitByText(serviceType, 30);
 
         assertDropdownPermittedItemsByValue(user.serviceTypes, Constants.CreateNewInstance.SERVICE_TYPE_OPTION_CLASS);
@@ -371,7 +361,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
     @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
     protected void testLineOfBusinessOptionalAndPlatformRequired() throws Exception {
 
-        User user = usersService.getUser(Constants.Users.USP_VOICE_VIRTUAL_USP);
+        User user = usersService.getUser(Constants.Users.SILVIA_ROBBINS_TYLER_SILVIA);
         relogin(user.credentials);
 
         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
@@ -387,7 +377,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
         browseASDCPage.selectSubscriberById("e433710f-9217-458d-a79d-1c7aff376d89");
 
-        String serviceType = "VIRTUAL USP";
+        String serviceType = "TYLER SILVIA";
         GeneralUIUtils.findAndWaitByText(serviceType, 30);
 
         assertDropdownPermittedItemsByValue(user.serviceTypes, Constants.CreateNewInstance.SERVICE_TYPE_OPTION_CLASS);
@@ -404,10 +394,10 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         //now add the VNF
         ViewEditPage viewEditPage = new ViewEditPage();
 
-        viewEditPage.selectNodeInstanceToAdd("VID-PCRF-05-15-17 0");
+        viewEditPage.selectNodeInstanceToAdd("VID-RODERICK-05-15-17 0");
         viewEditPage.generateAndSetInstanceName(Constants.ViewEdit.VNF_INSTANCE_NAME_PREFIX);
         viewEditPage.selectProductFamily("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
-        viewEditPage.selectLCPRegion("AAIAIC25");
+        viewEditPage.selectLcpRegion("AAIAIC25", "AIC");
         viewEditPage.selectTenant("092eb9e8e4b7412e8787dd091bc58e86");
         viewEditPage.setLegacyRegion("llkjhlkjhlkjh");
 
@@ -427,7 +417,7 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         ImmutableList<BasePreset> presets = ImmutableList.of(
                 new PresetGetSessionSlotCheckIntervalGet(),
                 new PresetAAIGetSubscribersGet(),
-                new PresetAAIGetServiceModelList(modelUuid, modelInvariantUUID1, modelInvariantUUID2, modelInvariantUUID3),
+                new PresetAAIServiceDesignAndCreationPut(),
                 new PresetAAIGetServicesGet());
 
         SimulatorApi.registerExpectationFromPresets(presets, SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET);
@@ -437,6 +427,8 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
     private void browseSDCServiceModelListCheckAAIResponse(){
         prepareSimulatorWithServiceModelListBeforeBrowseASDCService();
         SideMenu.navigateToBrowseASDCPage();
+        BrowseASDCPage browseASDCPage = new BrowseASDCPage();
+        browseASDCPage.fillFilterText("CheckAAIResponse");
         GeneralUIUtils.ultimateWait();
 
         WebElement sdcTableElement = Get.byId("sdcModelsTable");
@@ -460,9 +452,9 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
 
         //Check Names
         By name = By.className("name");
-        assertEquals("AAAvIRC_mm779p_Service" , sdcFirstModel.findElement(name).getText());
-        assertEquals("BBBvIRC_mm779p_Service" , sdcSecondModel.findElement(name).getText());
-        assertEquals("CCCvIRC_mm779p_Service" , sdcThirdModel.findElement(name).getText());
+        assertEquals("CheckAAIResponse_AAAvIRC_mm779p_Service" , sdcFirstModel.findElement(name).getText());
+        assertEquals("CheckAAIResponse_BBBvIRC_mm779p_Service" , sdcSecondModel.findElement(name).getText());
+        assertEquals("CheckAAIResponse_CCCvIRC_mm779p_Service" , sdcThirdModel.findElement(name).getText());
 
         //Check distribution Status
         By distributionStatus = By.className("distributionStatus");
@@ -474,8 +466,10 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         assertEquals("service" , sdcFirstModel.findElement(By.className("category")).getText());
         assertEquals("1.0" , sdcFirstModel.findElement(By.className("version")).getText());
     }
+
     @Test
-    public void browseSdcModel_getEmptyList_noModelsMessageIsShown() throws Exception {
+    public void browseSdcModel_getEmptyList_noModelsMessageIsShown() {
+        resetGetServicesCache();
         SimulatorApi.clearAll();
         SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
                 new PresetAAIServiceDesignAndCreationPut(true),
@@ -484,5 +478,41 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
         GeneralUIUtils.ultimateWait();
         WebElement serviceModelsTbody = Get.byXpath("//table[@data-tests-id='serviceModelsTable']/tbody");
         assertFalse(Exists.tagNameInAnotherElement(serviceModelsTbody, "tr"), "Table should be empty on empty results");
+        resetGetServicesCache();
+    }
+
+    private static final String[] macroModelsIds = {
+            "f1bde010-cc5f-4765-941f-75f15b24f9fc",
+            "lmoser410-connector-model-version-id",
+            "ipe-resource-id-ps-02",
+            "797a6c41-0f80-4d35-a288-3920c4e06baa",
+    };
+    private static final String[] alacarteModelsIds = {
+            "0903e1c0-8e03-4936-b5c2-260653b96413",
+            "666a06ee-4b57-46df-bacf-908da8f10c3f",
+            "20c4431c-246d-11e7-93ae-92361f002671",
+    };
+
+    @DataProvider
+    public static Object[][] filterOrchestrationType() {
+        return new Object[][]{{"a la carte", 3, alacarteModelsIds},{"macro", 4, macroModelsIds}};
+    }
+
+    @Test(dataProvider = "filterOrchestrationType")
+    @FeatureTogglingTest(FLAG_SHOW_ORCHESTRATION_TYPE)
+    public void browseSdcModel_filterModelsWithOrchestrationType_alacarte(
+            String orchestrationType,int numberOfOccurrence, String[] expectedModelsIds) {
+        resetGetServicesCache();
+        SimulatorApi.clearAll();
+        BrowseASDCPage browseAsdcPage = registerSimulatorAndGoToBrowseSDC();
+        GeneralUIUtils.ultimateWait();
+        assertThat(browseAsdcPage.countCurrentRowsInTable(),(Matchers.greaterThan(numberOfOccurrence)));
+        browseAsdcPage.fillFilterText(orchestrationType);
+        Assert.assertEquals(browseAsdcPage.countCurrentRowsInTable(),numberOfOccurrence);
+        for(String id : expectedModelsIds) {
+            Assert.assertTrue(browseAsdcPage.isModelWithGivenServiceUUIDVisible(id));
+        }
+        browseAsdcPage.fillFilterText("");
     }
+
 }