aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
blob: 2b5a0982309b06639e1d569236b5f2ff93de8ca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
package vid.automation.test.test;

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.ModelInfo.aLaCarteForBrowseSdc;
import static vid.automation.test.infra.ModelInfo.aLaCarteServiceCreationTest;
import static vid.automation.test.infra.ModelInfo.instantiationTypeAlacarte_vidNotionsInstantiationUIByUUID;
import static vid.automation.test.infra.ModelInfo.macroForBrowseSdc;

import com.google.common.collect.ImmutableList;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.hamcrest.Matchers;
import org.onap.sdc.ci.tests.datatypes.UserCredentials;
import org.onap.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.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import vid.automation.test.Constants;
import vid.automation.test.infra.Click;
import vid.automation.test.infra.Exists;
import vid.automation.test.infra.FeatureTogglingTest;
import vid.automation.test.infra.Features;
import vid.automation.test.infra.Get;
import vid.automation.test.infra.ModelInfo;
import vid.automation.test.infra.SelectOption;
import vid.automation.test.model.Service;
import vid.automation.test.model.User;
import vid.automation.test.sections.BrowseASDCPage;
import vid.automation.test.sections.DeployMacroDialogBase;
import vid.automation.test.sections.DeployMacroDialogOld;
import vid.automation.test.sections.SideMenu;
import vid.automation.test.sections.ViewEditPage;
import vid.automation.test.services.ServicesService;
import vid.automation.test.services.SimulatorApi;


public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
    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 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();

    private final Logger logger = LogManager.getLogger(BrowseASDCTest.class);

    @BeforeClass
    public void beforeClass() {
        resetGetServicesCache();
    }

    @BeforeMethod
    public void resetSdcModelCaches() {
        invalidateSdcModelsCache();
    }

    @Override
    protected UserCredentials getUserCredentials() {
        User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
        return new UserCredentials(user.credentials.userId, user.credentials.password, Constants.Users.EMANUEL_EMANUEL, "", "");
    }

    @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
    public void testPNFOnCreatePopup() {
        Service service = servicesService.getService("f39389e4-2a9c-4085-8ac3-04aea9c651be");
        BrowseASDCPage browseASDCPage = new BrowseASDCPage();
        SideMenu.navigateToBrowseASDCPage();
        browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
        assertThatServiceCreationDialogIsVisible();
        validatePNFCreationDialog(service, "Emanuel", "pnf");
    }

    private void validatePNFCreationDialog(Service service, String serviceType, String serviceRole) {
        assertServiceMetadata(serviceType, Constants.SERVICE_TYPE);
        assertServiceMetadata(serviceRole, Constants.SERVICE_ROLE);
        validateServiceCreationDialog(service);
    }

//    @BeforeMethod
//    public void clearSimulator() {
//        SimulatorApi.clearAll();
//    }

    @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
    private void testPNFMacroInstantation() throws Exception {
        User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
        relogin(user.credentials);

        BrowseASDCPage browseASDCPage = new BrowseASDCPage();
        SideMenu.navigateToBrowseASDCPage();
        browseASDCPage.clickDeployServiceButtonByServiceUUID("f39389e4-2a9c-4085-8ac3-04aea9c651be");
        assertThatServiceCreationDialogIsVisible();
        assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
        browseASDCPage.selectSubscriberById("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
        browseASDCPage.selectProductFamily("ebc3bc3d-62fd-4a3f-a037-f619df4ff034");
        GeneralUIUtils.ultimateWait();

        browseASDCPage.selectServiceTypeByName("Emanuel");
        GeneralUIUtils.ultimateWait();
        browseASDCPage.selectLcpRegion("hvf16");

        browseASDCPage.selectTenant("a259ae7b7c3f493cb3d91f95a7c18149");
        assertAllIsPermitted(Constants.BrowseASDC.AIC_OPTION_CLASS);
        browseASDCPage.selectAicZone("NFT1");

        Click.onFirstSelectOptionById(Constants.OwningEntity.PROJECT_SELECT_TEST_ID);
        Click.onFirstSelectOptionById(Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);

        browseASDCPage.clickConfirmButton();

        assertSuccessfulServiceInstanceCreation();

        browseASDCPage.clickCloseButton();

        ViewEditPage viewEditPage = new ViewEditPage();
        viewEditPage.clickActivateButton();
    }

    @Test
    private void browseServiceModel_deployServiceALaCarteByBackendInput_creationPopupIsALaCarte() throws Exception {
        // model uuid should be of macro
        deployServiceAndAssertInstantiationType(
                "csar15782222_instantiationTypeAlacarte_invariantUUIDMacro.zip",
                invariantUUIDMacro,
                instantiationTypeNameAlacarte
        );
    }

    @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(
                "csar15782222_instantiationTypeEmpty_invariantUUIDAlacarte.zip",
                invariantUUIDAlacarte,
                instantiationTypeNameAlacarte
        );
    }

    @Test
    private void browseServiceModel_deployServiceMacroByBackendInput_creationPopupIsMacro() throws Exception {
        deployServiceAndAssertInstantiationType(
                "csar15782222_instantiationTypeMacro_invariantUUIDAlacarte_withoutNetworks.zip",
                invariantUUIDAlacarte,
                instantiationTypeNameMacro
        );
    }

    @Test
    private void browseServiceModel_deployServiceMacroByMACRO_SERVICESConfig_creationPopupIsOldMacro() throws Exception {
        deployServiceAndAssertInstantiationType(
                "csar15782222_invariantUUIDMacro.zip",
                invariantUUIDMacro,
                oldMacro

        );
    }

    @Test
    private void browseServiceModel_deployServiceMacroWithPnf_creationPopupIsOldMacro() throws Exception {
        deployServiceAndAssertInstantiationType(
                "csar15782222_instantiationTypeMacroWithPnf.zip",
                invariantUUIDMacro,
                oldMacro

        );
    }

    @Test
    private void browseServiceModel_deployServiceMacroWithCR_creationPopupIsOldMacro() throws Exception {
        deployServiceAndAssertInstantiationType(
                "csar15782222_instantiationTypeMacroWithCR.zip",
                invariantUUIDMacro,
                oldMacro

        );
    }

    @Test
    private void browseServiceModel_deployServiceMacroWithNetwork_creationPopupIsMacroByFF() throws Exception {
        String macroInstantiationAccordingFF = Features.FLAG_ASYNC_INSTANTIATION.isActive() && Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION.isActive() ? instantiationTypeNameMacro : oldMacro;
        deployServiceAndAssertInstantiationType(
                "csar15782222_instantiationTypeMacroWithNetwork.zip",
                invariantUUIDMacro,
                macroInstantiationAccordingFF
        );
    }


    private void deployServiceAndAssertInstantiationType(String modelZipFileName, String modelInvariantId, String expectedInstantiationType) throws Exception {
        deployServiceAndAssertInstantiationType(new ModelInfo("4d71990b-d8ad-4510-ac61-496288d9078e", modelInvariantId, modelZipFileName), expectedInstantiationType);
    }

    private void deployServiceAndAssertInstantiationType(ModelInfo modelInfo, String expectedInstantiationType) throws Exception {

        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(modelInfo.modelVersionId);
        DeployMacroDialogBase macroDialog = null;
        if (expectedInstantiationType.equals(instantiationTypeNameAlacarte)) {
            GeneralUIUtils.ultimateWait();
            browseASDCPage.clickCancelButtonByTestID();
        } else { //macro
            macroDialog = expectedInstantiationType.equals(oldMacro) ? new DeployMacroDialogOld() : getMacroDialog();
            macroDialog.assertTitle();
            macroDialog.closeDialog();
        }
    }

    @Test
    private void testServiceInstantiationAlaCarte() throws Exception {
        User user = usersService.getUser(Constants.Users.EMANUEL_EMANUEL);
        relogin(user.credentials);

        registerExpectationForLegacyServiceDeployment(aLaCarteServiceCreationTest, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");

        BrowseASDCPage browseASDCPage = new BrowseASDCPage();
        SideMenu.navigateToBrowseASDCPage();

        Service service = new Service(
                "pnf",
                aLaCarteServiceCreationTest.modelVersionId,
                aLaCarteServiceCreationTest.modelInvariantId,
                "action-data",
                "1.0",
                "Network L1-3",
                "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);

        browseASDCPage.setInstanceName(browseASDCPage.generateInstanceName());

        assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
        browseASDCPage.selectSubscriberById("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");

        String serviceType = "Emanuel";
        GeneralUIUtils.findAndWaitByText(serviceType, 30);

        assertDropdownPermittedItemsByValue(user.serviceTypes, Constants.CreateNewInstance.SERVICE_TYPE_OPTION_CLASS);
        browseASDCPage.selectServiceTypeByName(serviceType);

        SelectOption.byTestIdAndVisibleText("yyy1", Constants.OwningEntity.PROJECT_SELECT_TEST_ID);
        SelectOption.byTestIdAndVisibleText("aaa1", Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);

        browseASDCPage.selectSuppressRollback("false");

        browseASDCPage.clickConfirmButton();

        assertSuccessfulServiceInstanceCreation();
    }

    private static final String serviceName = "CONTRAIL30_L2NODHCP";
    private static final String modelInvariantId = "5b607929-6088-4614-97ef-cac817508e0e";
    private static final String serviceUuid = "797a6c41-0f80-4d35-a288-3920c4e06baa";


    @DataProvider
    public static Object[][] filterTexts() {
        return new Object[][]{{serviceName},{modelInvariantId},{serviceUuid}};
    }

    @Test(dataProvider = "filterTexts")
    public void testFilterOptionsInBrowseSdc(String filterText){
        BrowseASDCPage browseAsdcPage = registerSimulatorAndGoToBrowseSDC();
        GeneralUIUtils.ultimateWait();
        assertThat(browseAsdcPage.countCurrentRowsInTable(),(Matchers.greaterThan(1)));
        browseAsdcPage.fillFilterText(filterText);
        Assert.assertEquals(browseAsdcPage.countCurrentRowsInTable(),1);
        Assert.assertTrue(Exists.byTestId("deploy-" + serviceUuid));
        browseAsdcPage.fillFilterText("");

    }

    @Test
    private void testCategoryParamsDropdownsExistsInCreationDialog() throws Exception {
        BrowseASDCPage browseASDCPage = registerSimulatorAndGoToBrowseSDC();
        Service service = servicesService.getService("2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd");
        browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
        DeployMacroDialogBase deployMacroDialog = getMacroDialog();
        deployMacroDialog.assertDialogExists();
        deployMacroDialog.clickProjectSelect();
        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.SILVIA_ROBBINS_TYLER_SILVIA);
        relogin(user.credentials);

        BrowseASDCPage browseASDCPage = new BrowseASDCPage();
        SideMenu.navigateToBrowseASDCPage();

        Service service = servicesService.getService("c079d859-4d81-4add-a9c3-94551f96e2b0");

        browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
        validateServiceCreationDialog(service);

        browseASDCPage.setInstanceName(browseASDCPage.generateInstanceName());

        assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
        browseASDCPage.selectSubscriberById("e433710f-9217-458d-a79d-1c7aff376d89");

        String serviceType = "TYLER SILVIA";
        GeneralUIUtils.findAndWaitByText(serviceType, 30);

        assertDropdownPermittedItemsByValue(user.serviceTypes, Constants.CreateNewInstance.SERVICE_TYPE_OPTION_CLASS);
        browseASDCPage.selectServiceTypeByName(serviceType);

        browseASDCPage.clickConfirmButton();

        GeneralUIUtils.findAndWaitByText("Missing data", 5);

        Click.onFirstSelectOptionById(Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);

        browseASDCPage.clickConfirmButton();
        assertSuccessfulServiceInstanceCreation();
    }

    @Test(groups = {"shouldBeMigratedToWorkWithSimulator"})
    protected void testLineOfBusinessOptionalAndPlatformRequired() throws Exception {

        User user = usersService.getUser(Constants.Users.SILVIA_ROBBINS_TYLER_SILVIA);
        relogin(user.credentials);

        BrowseASDCPage browseASDCPage = new BrowseASDCPage();
        SideMenu.navigateToBrowseASDCPage();

        Service service = servicesService.getService("c079d859-4d81-4add-a9c3-94551f96e2b0");

        browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
        validateServiceCreationDialog(service);

        browseASDCPage.setInstanceName(browseASDCPage.generateInstanceName());

        assertDropdownPermittedItemsByLabel(user.subscriberNames, Constants.CreateNewInstance.SUBSCRIBER_NAME_OPTION_CLASS);
        browseASDCPage.selectSubscriberById("e433710f-9217-458d-a79d-1c7aff376d89");

        String serviceType = "TYLER SILVIA";
        GeneralUIUtils.findAndWaitByText(serviceType, 30);

        assertDropdownPermittedItemsByValue(user.serviceTypes, Constants.CreateNewInstance.SERVICE_TYPE_OPTION_CLASS);
        browseASDCPage.selectServiceTypeByName(serviceType);

        Click.onFirstSelectOptionById(Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);

        browseASDCPage.clickConfirmButton();
        assertSuccessfulServiceInstanceCreation();

        browseASDCPage.clickCloseButton();
        GeneralUIUtils.ultimateWait();

        //now add the VNF
        ViewEditPage viewEditPage = new ViewEditPage();

        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("JANET25", "AIC");
        viewEditPage.selectTenant("092eb9e8e4b7412e8787dd091bc58e86");
        viewEditPage.setLegacyRegion("llkjhlkjhlkjh");

        browseASDCPage.clickConfirmButton();

        GeneralUIUtils.findAndWaitByText("Missing data", 5);

        Click.onFirstSelectOptionById(Constants.OwningEntity.PLATFORM_SELECT_TEST_ID);

        viewEditPage.clickConfirmButton();
        assertSuccessfulVNFCreation();
    }

    private void prepareSimulatorWithServiceModelListBeforeBrowseASDCService(){
        SimulatorApi.clearAll();

        ImmutableList<BasePreset> presets = ImmutableList.of(
                new PresetGetSessionSlotCheckIntervalGet(),
                new PresetAAIGetSubscribersGet(),
                new PresetAAIServiceDesignAndCreationPut(),
                new PresetAAIGetServicesGet());

        SimulatorApi.registerExpectationFromPresets(presets, SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET);
    }

    @Test
    private void browseSDCServiceModelListCheckAAIResponse(){
        prepareSimulatorWithServiceModelListBeforeBrowseASDCService();
        SideMenu.navigateToBrowseASDCPage();
        BrowseASDCPage browseASDCPage = new BrowseASDCPage();
        browseASDCPage.fillFilterText("CheckAAIResponse");
        GeneralUIUtils.ultimateWait();

        WebElement sdcTableElement = Get.byId("sdcModelsTable");
        List<WebElement> sdcModelList = sdcTableElement.findElements(By.className("sdcServiceModel"));

        WebElement sdcFirstModel = sdcModelList.get(0);
        WebElement sdcSecondModel = sdcModelList.get(1);
        WebElement sdcThirdModel = sdcModelList.get(2);

        //Check uuid
        By uuid = By.className("uuid");
        assertEquals(modelUuid, sdcFirstModel.findElement(uuid).getText());
        assertEquals("1dae721c-a1ef-435f-b811-760c23f467bf" , sdcSecondModel.findElement(uuid).getText());
        assertEquals("29236d45-e790-4c17-a115-1533cc09b7b1" , sdcThirdModel.findElement(uuid).getText());

        //Check invariantUUID
        By invariantUUID = By.className("invariantUUID");
        assertEquals(modelInvariantUUID1, sdcFirstModel.findElement(invariantUUID).getText());
        assertEquals(modelInvariantUUID2, sdcSecondModel.findElement(invariantUUID).getText());
        assertEquals(modelInvariantUUID3, sdcThirdModel.findElement(invariantUUID).getText());

        //Check Names
        By name = By.className("name");
        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");
        assertEquals("DISTRIBUTION_COMPLETE_OK" , sdcFirstModel.findElement(distributionStatus).getText());
        assertEquals("", sdcSecondModel.findElement(distributionStatus).getText());
        assertEquals("DISTRIBUTION_COMPLETE_ERROR" , sdcThirdModel.findElement(distributionStatus).getText());

        //Check another fields
        assertEquals("service" , sdcFirstModel.findElement(By.className("category")).getText());
        assertEquals("1.0" , sdcFirstModel.findElement(By.className("version")).getText());
    }

    @Test
    public void browseSdcModel_getEmptyList_noModelsMessageIsShown() {
        resetGetServicesCache();
        SimulatorApi.clearAll();
        SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
                new PresetAAIServiceDesignAndCreationPut(true),
                new PresetAAIGetSubscribersGet()), SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET);
        SideMenu.navigateToBrowseASDCPage();
        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();
    }
}