Merge automation from ECOMP's repository
[vid.git] / vid-automation / src / main / java / vid / automation / test / test / BrowseASDCTest.java
1 package vid.automation.test.test;
2
3 import static org.hamcrest.MatcherAssert.assertThat;
4 import static org.testng.Assert.assertEquals;
5 import static org.testng.Assert.assertFalse;
6 import static vid.automation.test.infra.Features.FLAG_5G_IN_NEW_INSTANTIATION_UI;
7 import static vid.automation.test.infra.ModelInfo.aLaCarteForBrowseSdc;
8 import static vid.automation.test.infra.ModelInfo.aLaCarteServiceCreationTest;
9 import static vid.automation.test.infra.ModelInfo.instantiationTypeAlacarte_vidNotionsInstantiationUIByUUID;
10 import static vid.automation.test.infra.ModelInfo.macroForBrowseSdc;
11
12 import com.google.common.collect.ImmutableList;
13 import java.util.List;
14 import org.apache.logging.log4j.LogManager;
15 import org.apache.logging.log4j.Logger;
16 import org.hamcrest.Matchers;
17 import org.onap.sdc.ci.tests.datatypes.UserCredentials;
18 import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
19 import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
20 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetServicesGet;
21 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
22 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIServiceDesignAndCreationPut;
23 import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
24 import org.openqa.selenium.By;
25 import org.openqa.selenium.WebElement;
26 import org.testng.Assert;
27 import org.testng.annotations.BeforeClass;
28 import org.testng.annotations.BeforeMethod;
29 import org.testng.annotations.DataProvider;
30 import org.testng.annotations.Test;
31 import vid.automation.test.Constants;
32 import vid.automation.test.infra.Click;
33 import vid.automation.test.infra.Exists;
34 import vid.automation.test.infra.FeatureTogglingTest;
35 import vid.automation.test.infra.Features;
36 import vid.automation.test.infra.Get;
37 import vid.automation.test.infra.ModelInfo;
38 import vid.automation.test.infra.SelectOption;
39 import vid.automation.test.model.Service;
40 import vid.automation.test.model.User;
41 import vid.automation.test.sections.BrowseASDCPage;
42 import vid.automation.test.sections.DeployMacroDialogBase;
43 import vid.automation.test.sections.DeployMacroDialogOld;
44 import vid.automation.test.sections.SideMenu;
45 import vid.automation.test.sections.ViewEditPage;
46 import vid.automation.test.services.ServicesService;
47 import vid.automation.test.services.SimulatorApi;
48
49
50 public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
51     private final String invariantUUIDAlacarte = aLaCarteForBrowseSdc.modelInvariantId;
52     private final String invariantUUIDMacro = macroForBrowseSdc.modelInvariantId;
53     private final String instantiationTypeNameAlacarte = "a la carte";
54     private final String instantiationTypeNameMacro = "macro";
55     private final String oldMacro = "old macro";
56     private final String newAlacarte = "new a la carte";
57     public static final String modelInvariantUUID1 = "aeababbc-010b-4a60-8df7-e64c07389466";
58     public static final String modelInvariantUUID2 = "aa2f8e9c-9e47-4b15-a95c-4a9385599abc";
59     public static final String modelInvariantUUID3 = "d849c57d-b6fe-4843-8349-4ab8bbb08d71";
60     public static final String modelUuid = "a8dcd72d-d44d-44f2-aa85-53aa9ca99cba";
61
62     private ServicesService servicesService = new ServicesService();
63
64     private final Logger logger = LogManager.getLogger(BrowseASDCTest.class);
65
66     @BeforeClass
67     public void beforeClass() {
68         resetGetServicesCache();
69     }
70
71     @BeforeMethod
72     public void resetSdcModelCaches() {
73         invalidateSdcModelsCache();
74     }
75
76     @Override
77     protected UserCredentials getUserCredentials() {
78         User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
79         return new UserCredentials(user.credentials.userId, user.credentials.password, Constants.Users.EMANUEL_EMANUEL, "", "");
80     }
81
82     @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
83     public void testPNFOnCreatePopup() {
84         Service service = servicesService.getService("f39389e4-2a9c-4085-8ac3-04aea9c651be");
85         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
86         SideMenu.navigateToBrowseASDCPage();
87         browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
88         assertThatServiceCreationDialogIsVisible();
89         validatePNFCreationDialog(service, "Emanuel", "pnf");
90     }
91
92     private void validatePNFCreationDialog(Service service, String serviceType, String serviceRole) {
93         assertServiceMetadata(serviceType, Constants.SERVICE_TYPE);
94         assertServiceMetadata(serviceRole, Constants.SERVICE_ROLE);
95         validateServiceCreationDialog(service);
96     }
97
98 //    @BeforeMethod
99 //    public void clearSimulator() {
100 //        SimulatorApi.clearAll();
101 //    }
102
103     @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
104     private void testPNFMacroInstantation() throws Exception {
105         User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
106         relogin(user.credentials);
107
108         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
109         SideMenu.navigateToBrowseASDCPage();
110         browseASDCPage.clickDeployServiceButtonByServiceUUID("f39389e4-2a9c-4085-8ac3-04aea9c651be");
111         assertThatServiceCreationDialogIsVisible();
112         assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
113         browseASDCPage.selectSubscriberById("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
114         browseASDCPage.selectProductFamily("ebc3bc3d-62fd-4a3f-a037-f619df4ff034");
115         GeneralUIUtils.ultimateWait();
116
117         browseASDCPage.selectServiceTypeByName("Emanuel");
118         GeneralUIUtils.ultimateWait();
119         browseASDCPage.selectLcpRegion("hvf16");
120
121         browseASDCPage.selectTenant("a259ae7b7c3f493cb3d91f95a7c18149");
122         assertAllIsPermitted(Constants.BrowseASDC.AIC_OPTION_CLASS);
123         browseASDCPage.selectAicZone("NFT1");
124
125         Click.onFirstSelectOptionById(Constants.OwningEntity.PROJECT_SELECT_TEST_ID);
126         Click.onFirstSelectOptionById(Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);
127
128         browseASDCPage.clickConfirmButton();
129
130         assertSuccessfulServiceInstanceCreation();
131
132         browseASDCPage.clickCloseButton();
133
134         ViewEditPage viewEditPage = new ViewEditPage();
135         viewEditPage.clickActivateButton();
136     }
137
138     @Test
139     private void browseServiceModel_deployServiceALaCarteByBackendInput_creationPopupIsALaCarte() throws Exception {
140         // model uuid should be of macro
141         deployServiceAndAssertInstantiationType(
142                 "csar15782222_instantiationTypeAlacarte_invariantUUIDMacro.zip",
143                 invariantUUIDMacro,
144                 instantiationTypeNameAlacarte
145         );
146     }
147
148     @Test
149     @FeatureTogglingTest(FLAG_5G_IN_NEW_INSTANTIATION_UI)
150     private void browseServiceModel_deployServiceALaCarteByBackendInputHintNewUI_creationPopupIsAngular2() throws Exception {
151         deployServiceAndAssertInstantiationType(
152                 instantiationTypeAlacarte_vidNotionsInstantiationUIByUUID,
153                 newAlacarte
154         );
155     }
156
157     @Test
158     private void browseServiceModel_deployServiceALaCarteBecauseNotOnMACRO_SERVICESConfig_creationPopupIsALaCarte() throws Exception {
159         deployServiceAndAssertInstantiationType(
160                 "csar15782222_instantiationTypeEmpty_invariantUUIDAlacarte.zip",
161                 invariantUUIDAlacarte,
162                 instantiationTypeNameAlacarte
163         );
164     }
165
166     @Test
167     private void browseServiceModel_deployServiceMacroByBackendInput_creationPopupIsMacro() throws Exception {
168         deployServiceAndAssertInstantiationType(
169                 "csar15782222_instantiationTypeMacro_invariantUUIDAlacarte_withoutNetworks.zip",
170                 invariantUUIDAlacarte,
171                 instantiationTypeNameMacro
172         );
173     }
174
175     @Test
176     private void browseServiceModel_deployServiceMacroByMACRO_SERVICESConfig_creationPopupIsOldMacro() throws Exception {
177         deployServiceAndAssertInstantiationType(
178                 "csar15782222_invariantUUIDMacro.zip",
179                 invariantUUIDMacro,
180                 oldMacro
181
182         );
183     }
184
185     @Test
186     private void browseServiceModel_deployServiceMacroWithPnf_creationPopupIsOldMacro() throws Exception {
187         deployServiceAndAssertInstantiationType(
188                 "csar15782222_instantiationTypeMacroWithPnf.zip",
189                 invariantUUIDMacro,
190                 oldMacro
191
192         );
193     }
194
195     @Test
196     private void browseServiceModel_deployServiceMacroWithCR_creationPopupIsOldMacro() throws Exception {
197         deployServiceAndAssertInstantiationType(
198                 "csar15782222_instantiationTypeMacroWithCR.zip",
199                 invariantUUIDMacro,
200                 oldMacro
201
202         );
203     }
204
205     @Test
206     private void browseServiceModel_deployServiceMacroWithNetwork_creationPopupIsMacroByFF() throws Exception {
207         String macroInstantiationAccordingFF = Features.FLAG_ASYNC_INSTANTIATION.isActive() && Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION.isActive() ? instantiationTypeNameMacro : oldMacro;
208         deployServiceAndAssertInstantiationType(
209                 "csar15782222_instantiationTypeMacroWithNetwork.zip",
210                 invariantUUIDMacro,
211                 macroInstantiationAccordingFF
212         );
213     }
214
215
216     private void deployServiceAndAssertInstantiationType(String modelZipFileName, String modelInvariantId, String expectedInstantiationType) throws Exception {
217         deployServiceAndAssertInstantiationType(new ModelInfo("4d71990b-d8ad-4510-ac61-496288d9078e", modelInvariantId, modelZipFileName), expectedInstantiationType);
218     }
219
220     private void deployServiceAndAssertInstantiationType(ModelInfo modelInfo, String expectedInstantiationType) throws Exception {
221
222         registerExpectationForLegacyServiceDeployment(modelInfo, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
223         User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
224         relogin(user.credentials);
225
226         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
227         SideMenu.navigateToBrowseASDCPage();
228
229         GeneralUIUtils.ultimateWait();
230         browseASDCPage.clickDeployServiceButtonByServiceUUID(modelInfo.modelVersionId);
231         DeployMacroDialogBase macroDialog = null;
232         if (expectedInstantiationType.equals(instantiationTypeNameAlacarte)) {
233             GeneralUIUtils.ultimateWait();
234             browseASDCPage.clickCancelButtonByTestID();
235         } else { //macro
236             macroDialog = expectedInstantiationType.equals(oldMacro) ? new DeployMacroDialogOld() : getMacroDialog();
237             macroDialog.assertTitle();
238             macroDialog.closeDialog();
239         }
240     }
241
242     @Test
243     private void testServiceInstantiationAlaCarte() throws Exception {
244         User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
245         relogin(user.credentials);
246
247         registerExpectationForLegacyServiceDeployment(aLaCarteServiceCreationTest, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
248
249         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
250         SideMenu.navigateToBrowseASDCPage();
251
252         Service service = new Service(
253                 "pnf",
254                 aLaCarteServiceCreationTest.modelVersionId,
255                 aLaCarteServiceCreationTest.modelInvariantId,
256                 "action-data",
257                 "1.0",
258                 "Network L1-3",
259                 "PASQUALE vMX vPE based on Juniper 17.2 release. Updated with updated VF for v8.0 of VLM",
260                 null);
261
262
263         logger.info("Expected service model properties: "+service.toString());
264         browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
265         validateServiceCreationDialog(service);
266
267         browseASDCPage.setInstanceName(browseASDCPage.generateInstanceName());
268
269         assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
270         browseASDCPage.selectSubscriberById("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
271
272         String serviceType = "Emanuel";
273         GeneralUIUtils.findAndWaitByText(serviceType, 30);
274
275         assertDropdownPermittedItemsByValue(user.serviceTypes, Constants.CreateNewInstance.SERVICE_TYPE_OPTION_CLASS);
276         browseASDCPage.selectServiceTypeByName(serviceType);
277
278         SelectOption.byTestIdAndVisibleText("yyy1", Constants.OwningEntity.PROJECT_SELECT_TEST_ID);
279         SelectOption.byTestIdAndVisibleText("aaa1", Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);
280
281         browseASDCPage.selectSuppressRollback("false");
282
283         browseASDCPage.clickConfirmButton();
284
285         assertSuccessfulServiceInstanceCreation();
286     }
287
288     private static final String serviceName = "CONTRAIL30_L2NODHCP";
289     private static final String modelInvariantId = "5b607929-6088-4614-97ef-cac817508e0e";
290     private static final String serviceUuid = "797a6c41-0f80-4d35-a288-3920c4e06baa";
291
292
293     @DataProvider
294     public static Object[][] filterTexts() {
295         return new Object[][]{{serviceName},{modelInvariantId},{serviceUuid}};
296     }
297
298     @Test(dataProvider = "filterTexts")
299     public void testFilterOptionsInBrowseSdc(String filterText){
300         BrowseASDCPage browseAsdcPage = registerSimulatorAndGoToBrowseSDC();
301         GeneralUIUtils.ultimateWait();
302         assertThat(browseAsdcPage.countCurrentRowsInTable(),(Matchers.greaterThan(1)));
303         browseAsdcPage.fillFilterText(filterText);
304         Assert.assertEquals(browseAsdcPage.countCurrentRowsInTable(),1);
305         Assert.assertTrue(Exists.byTestId("deploy-" + serviceUuid));
306         browseAsdcPage.fillFilterText("");
307
308     }
309
310     @Test
311     private void testCategoryParamsDropdownsExistsInCreationDialog() throws Exception {
312         BrowseASDCPage browseASDCPage = registerSimulatorAndGoToBrowseSDC();
313         Service service = servicesService.getService("2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd");
314         browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
315         DeployMacroDialogBase deployMacroDialog = getMacroDialog();
316         deployMacroDialog.assertDialogExists();
317         deployMacroDialog.clickProjectSelect();
318         deployMacroDialog.clickOwningEntitySelect();
319     }
320
321     private BrowseASDCPage registerSimulatorAndGoToBrowseSDC() {
322         SimulatorApi.registerExpectation(SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET,
323                 "ecompportal_getSessionSlotCheckInterval.json",
324                 "browseASDC/aai_get_services.json",
325                 "browseASDC/get_sdc_catalog_services_2f80c596.json"
326         );
327         SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
328                     new PresetAAIGetSubscribersGet(),
329                     new PresetAAIServiceDesignAndCreationPut()
330                 ),
331                 SimulatorApi.RegistrationStrategy.APPEND);
332         SideMenu.navigateToBrowseASDCPage();
333         return new BrowseASDCPage();
334     }
335
336     @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
337     private void testOwningEntityRequiredAndProjectOptional() throws Exception {
338         User user = usersService.getUser(Constants.Users.SILVIA_ROBBINS_TYLER_SILVIA);
339         relogin(user.credentials);
340
341         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
342         SideMenu.navigateToBrowseASDCPage();
343
344         Service service = servicesService.getService("c079d859-4d81-4add-a9c3-94551f96e2b0");
345
346         browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
347         validateServiceCreationDialog(service);
348
349         browseASDCPage.setInstanceName(browseASDCPage.generateInstanceName());
350
351         assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
352         browseASDCPage.selectSubscriberById("e433710f-9217-458d-a79d-1c7aff376d89");
353
354         String serviceType = "TYLER SILVIA";
355         GeneralUIUtils.findAndWaitByText(serviceType, 30);
356
357         assertDropdownPermittedItemsByValue(user.serviceTypes, Constants.CreateNewInstance.SERVICE_TYPE_OPTION_CLASS);
358         browseASDCPage.selectServiceTypeByName(serviceType);
359
360         browseASDCPage.clickConfirmButton();
361
362         GeneralUIUtils.findAndWaitByText("Missing data", 5);
363
364         Click.onFirstSelectOptionById(Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);
365
366         browseASDCPage.clickConfirmButton();
367         assertSuccessfulServiceInstanceCreation();
368     }
369
370     @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
371     protected void testLineOfBusinessOptionalAndPlatformRequired() throws Exception {
372
373         User user = usersService.getUser(Constants.Users.SILVIA_ROBBINS_TYLER_SILVIA);
374         relogin(user.credentials);
375
376         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
377         SideMenu.navigateToBrowseASDCPage();
378
379         Service service = servicesService.getService("c079d859-4d81-4add-a9c3-94551f96e2b0");
380
381         browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
382         validateServiceCreationDialog(service);
383
384         browseASDCPage.setInstanceName(browseASDCPage.generateInstanceName());
385
386         assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
387         browseASDCPage.selectSubscriberById("e433710f-9217-458d-a79d-1c7aff376d89");
388
389         String serviceType = "TYLER SILVIA";
390         GeneralUIUtils.findAndWaitByText(serviceType, 30);
391
392         assertDropdownPermittedItemsByValue(user.serviceTypes, Constants.CreateNewInstance.SERVICE_TYPE_OPTION_CLASS);
393         browseASDCPage.selectServiceTypeByName(serviceType);
394
395         Click.onFirstSelectOptionById(Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);
396
397         browseASDCPage.clickConfirmButton();
398         assertSuccessfulServiceInstanceCreation();
399
400         browseASDCPage.clickCloseButton();
401         GeneralUIUtils.ultimateWait();
402
403         //now add the VNF
404         ViewEditPage viewEditPage = new ViewEditPage();
405
406         viewEditPage.selectNodeInstanceToAdd("VID-RODERICK-05-15-17 0");
407         viewEditPage.generateAndSetInstanceName(Constants.ViewEdit.VNF_INSTANCE_NAME_PREFIX);
408         viewEditPage.selectProductFamily("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
409         viewEditPage.selectLcpRegion("JANET25", "AIC");
410         viewEditPage.selectTenant("092eb9e8e4b7412e8787dd091bc58e86");
411         viewEditPage.setLegacyRegion("llkjhlkjhlkjh");
412
413         browseASDCPage.clickConfirmButton();
414
415         GeneralUIUtils.findAndWaitByText("Missing data", 5);
416
417         Click.onFirstSelectOptionById(Constants.OwningEntity.PLATFORM_SELECT_TEST_ID);
418
419         viewEditPage.clickConfirmButton();
420         assertSuccessfulVNFCreation();
421     }
422
423     private void prepareSimulatorWithServiceModelListBeforeBrowseASDCService(){
424         SimulatorApi.clearAll();
425
426         ImmutableList<BasePreset> presets = ImmutableList.of(
427                 new PresetGetSessionSlotCheckIntervalGet(),
428                 new PresetAAIGetSubscribersGet(),
429                 new PresetAAIServiceDesignAndCreationPut(),
430                 new PresetAAIGetServicesGet());
431
432         SimulatorApi.registerExpectationFromPresets(presets, SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET);
433     }
434
435     @Test
436     private void browseSDCServiceModelListCheckAAIResponse(){
437         prepareSimulatorWithServiceModelListBeforeBrowseASDCService();
438         SideMenu.navigateToBrowseASDCPage();
439         BrowseASDCPage browseASDCPage = new BrowseASDCPage();
440         browseASDCPage.fillFilterText("CheckAAIResponse");
441         GeneralUIUtils.ultimateWait();
442
443         WebElement sdcTableElement = Get.byId("sdcModelsTable");
444         List<WebElement> sdcModelList = sdcTableElement.findElements(By.className("sdcServiceModel"));
445
446         WebElement sdcFirstModel = sdcModelList.get(0);
447         WebElement sdcSecondModel = sdcModelList.get(1);
448         WebElement sdcThirdModel = sdcModelList.get(2);
449
450         //Check uuid
451         By uuid = By.className("uuid");
452         assertEquals(modelUuid, sdcFirstModel.findElement(uuid).getText());
453         assertEquals("1dae721c-a1ef-435f-b811-760c23f467bf" , sdcSecondModel.findElement(uuid).getText());
454         assertEquals("29236d45-e790-4c17-a115-1533cc09b7b1" , sdcThirdModel.findElement(uuid).getText());
455
456         //Check invariantUUID
457         By invariantUUID = By.className("invariantUUID");
458         assertEquals(modelInvariantUUID1, sdcFirstModel.findElement(invariantUUID).getText());
459         assertEquals(modelInvariantUUID2, sdcSecondModel.findElement(invariantUUID).getText());
460         assertEquals(modelInvariantUUID3, sdcThirdModel.findElement(invariantUUID).getText());
461
462         //Check Names
463         By name = By.className("name");
464         assertEquals("CheckAAIResponse_AAAvIRC_mm779p_Service" , sdcFirstModel.findElement(name).getText());
465         assertEquals("CheckAAIResponse_BBBvIRC_mm779p_Service" , sdcSecondModel.findElement(name).getText());
466         assertEquals("CheckAAIResponse_CCCvIRC_mm779p_Service" , sdcThirdModel.findElement(name).getText());
467
468         //Check distribution Status
469         By distributionStatus = By.className("distributionStatus");
470         assertEquals("DISTRIBUTION_COMPLETE_OK" , sdcFirstModel.findElement(distributionStatus).getText());
471         assertEquals("", sdcSecondModel.findElement(distributionStatus).getText());
472         assertEquals("DISTRIBUTION_COMPLETE_ERROR" , sdcThirdModel.findElement(distributionStatus).getText());
473
474         //Check another fields
475         assertEquals("service" , sdcFirstModel.findElement(By.className("category")).getText());
476         assertEquals("1.0" , sdcFirstModel.findElement(By.className("version")).getText());
477     }
478
479     @Test
480     public void browseSdcModel_getEmptyList_noModelsMessageIsShown() {
481         resetGetServicesCache();
482         SimulatorApi.clearAll();
483         SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
484                 new PresetAAIServiceDesignAndCreationPut(true),
485                 new PresetAAIGetSubscribersGet()), SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET);
486         SideMenu.navigateToBrowseASDCPage();
487         GeneralUIUtils.ultimateWait();
488         WebElement serviceModelsTbody = Get.byXpath("//table[@data-tests-id='serviceModelsTable']/tbody");
489         assertFalse(Exists.tagNameInAnotherElement(serviceModelsTbody, "tr"), "Table should be empty on empty results");
490         resetGetServicesCache();
491     }
492 }