summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-08-29 15:55:20 +0300
committerEylon Malin <eylon.malin@intl.att.com>2019-08-29 15:55:20 +0300
commit955722b6ddf8ddeab3d1904f5514a5be9226a59f (patch)
treeee7da90f66b7bbd8bb89da8ab203e93fbe5408d3 /vid-automation/src/main
parent44d49cc9257c70ffdf70b9f6c8252792e706c48b (diff)
edit of macro services in new view edit screen
Fix Vid Notion Builder behavior according - all macro non transport services should open the new view edit screen Issue-ID: VID-378 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Change-Id: Icd45fcbfcb4bf8928f44f73fb3ddd84ac1f1d341
Diffstat (limited to 'vid-automation/src/main')
-rw-r--r--vid-automation/src/main/java/vid/automation/test/infra/Features.java3
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java104
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java49
3 files changed, 106 insertions, 50 deletions
diff --git a/vid-automation/src/main/java/vid/automation/test/infra/Features.java b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
index 2cc790f02..059500cd5 100644
--- a/vid-automation/src/main/java/vid/automation/test/infra/Features.java
+++ b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
@@ -41,7 +41,8 @@ public enum Features implements Feature {
FLAG_1908_RESUME_MACRO_SERVICE,
FLAG_1908_RELEASE_TENANT_ISOLATION,
FLAG_1908_VNF_FC_NEW_INSTANTIATION_UI,
- FLAG_HANDLE_SO_WORKFLOWS
+ FLAG_HANDLE_SO_WORKFLOWS,
+ FLAG_1908_MACRO_NOT_TRANSPORT_NEW_VIEW_EDIT,
;
public boolean isActive() {
diff --git a/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
index 7e9dac406..d7903ceef 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
@@ -1,19 +1,75 @@
package vid.automation.test.test;
//import com.automation.common.report_portal_integration.annotations.Step;
+
+import static junit.framework.TestCase.assertNull;
+import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
+import static org.hamcrest.CoreMatchers.startsWith;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId.PRESET_SOME_LEGACY_REGION_TO_ATT_AIC;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet.COMPLETE;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet.DEFAULT_SERVICE_INSTANCE_ID;
+import static org.testng.Assert.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import static vid.automation.test.infra.Features.FLAG_1902_VNF_GROUPING;
+import static vid.automation.test.infra.Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI;
+import static vid.automation.test.infra.Features.FLAG_1908_INFRASTRUCTURE_VPN;
+import static vid.automation.test.infra.Features.FLAG_1908_MACRO_NOT_TRANSPORT_NEW_VIEW_EDIT;
+import static vid.automation.test.infra.Features.FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI;
+import static vid.automation.test.infra.Features.FLAG_5G_IN_NEW_INSTANTIATION_UI;
+import static vid.automation.test.infra.Features.FLAG_ENABLE_WEBPACK_MODERN_UI;
+import static vid.automation.test.infra.ModelInfo.aLaCarteNetworkProvider5G;
+import static vid.automation.test.infra.ModelInfo.aLaCarteVnfGroupingService;
+import static vid.automation.test.infra.ModelInfo.collectionResourceService;
+import static vid.automation.test.infra.ModelInfo.infrastructureVpnService;
+import static vid.automation.test.infra.ModelInfo.macroSriovNoDynamicFieldsEcompNamingFalseFullModelDetails;
+import static vid.automation.test.infra.ModelInfo.macroSriovNoDynamicFieldsEcompNamingFalseFullModelDetailsVnfEcompNamingFalse;
+import static vid.automation.test.infra.ModelInfo.macroSriovWithDynamicFieldsEcompNamingFalsePartialModelDetailsVnfEcompNamingFalse;
+import static vid.automation.test.infra.ModelInfo.macroSriovWithDynamicFieldsEcompNamingTruePartialModelDetails;
+import static vid.automation.test.infra.ModelInfo.pasqualeVmxVpeBvService488Annotations;
+import static vid.automation.test.infra.ModelInfo.transportWithPnfsService;
+import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.APPEND;
+import static vid.automation.test.services.SimulatorApi.registerExpectationFromPreset;
+import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
+import static vid.automation.test.test.ALaCarteflowTest.AIC;
+
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import java.util.stream.Collectors;
import org.apache.commons.lang3.mutable.MutableInt;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.hamcrest.Matchers;
-import org.onap.simulator.presetGenerator.presets.aai.*;
-import org.onap.simulator.presetGenerator.presets.mso.*;
-import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsGet5GServiceInstanceAndNetwork.ResponseDetails;
-import org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys;
import org.onap.sdc.ci.tests.datatypes.UserCredentials;
import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetL3NetworksByCloudRegionSpecificState;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetTenants;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetVpnsByType;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIPostNamedQueryForViewEdit;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateNetworkALaCarte5G;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceAlacarte5GServiceWithNetwork;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2WithNamesAlacarteGroupingService;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2WithNamesEcompNamingFalse;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsGet5GServiceInstanceAndNetwork;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsGet5GServiceInstanceAndNetwork.ResponseDetails;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMsoCreateMacroCommonPre1806;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.RemoteWebElement;
@@ -24,38 +80,27 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import vid.automation.test.Constants;
import vid.automation.test.Constants.BrowseASDC.NewServicePopup;
-import vid.automation.test.infra.*;
+import vid.automation.test.infra.Click;
+import vid.automation.test.infra.FeatureTogglingTest;
+import vid.automation.test.infra.Features;
+import vid.automation.test.infra.Get;
+import vid.automation.test.infra.Input;
+import vid.automation.test.infra.ModelInfo;
+import vid.automation.test.infra.SelectOption;
+import vid.automation.test.infra.Wait;
import vid.automation.test.model.Service;
import vid.automation.test.model.User;
-import vid.automation.test.sections.*;
+import vid.automation.test.sections.BrowseASDCPage;
+import vid.automation.test.sections.DrawingBoardPage;
+import vid.automation.test.sections.InstantiationStatusPage;
+import vid.automation.test.sections.SideMenu;
+import vid.automation.test.sections.VidBasePage;
import vid.automation.test.services.AsyncJobsService;
import vid.automation.test.services.ServicesService;
import vid.automation.test.services.SimulatorApi;
import vid.automation.test.test.NewServiceInstanceTest.ServiceData.IS_GENERATED_NAMING;
import vid.automation.test.utils.ReadFile;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.stream.Collectors;
-
-import static junit.framework.TestCase.assertNull;
-import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
-import static org.hamcrest.CoreMatchers.startsWith;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.containsInAnyOrder;
-import static org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId.PRESET_SOME_LEGACY_REGION_TO_ATT_AIC;
-import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet.COMPLETE;
-import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet.DEFAULT_SERVICE_INSTANCE_ID;
-import static org.testng.Assert.assertEquals;
-import static org.testng.AssertJUnit.assertTrue;
-import static vid.automation.test.infra.Features.*;
-import static vid.automation.test.infra.ModelInfo.*;
-import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.APPEND;
-import static vid.automation.test.services.SimulatorApi.registerExpectationFromPreset;
-import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
-import static vid.automation.test.test.ALaCarteflowTest.AIC;
-
@FeatureTogglingTest(FLAG_ENABLE_WEBPACK_MODERN_UI)
public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
@@ -663,10 +708,9 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
//@Step("verify open view edit")
private void verifyOpenViewEdit(String serviceInstanceName) {
boolean[] openEnabled = {true, false, false};
- String[] statuses = {COMPLETED, IN_PROGRESS, PENDING};
ImmutableList.of(0, 1, 2).forEach(i -> {
String actualInstanceName = getActualInstanceName(serviceInstanceName, i);
- if (Features.FLAG_1902_NEW_VIEW_EDIT.isActive()) {
+ if (Features.FLAG_1902_NEW_VIEW_EDIT.isActive() || FLAG_1908_MACRO_NOT_TRANSPORT_NEW_VIEW_EDIT.isActive()) {
InstantiationStatusPage.verifyOpenNewViewEdit(actualInstanceName, openEnabled[i], "EDIT");
}
else {
diff --git a/vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java b/vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java
index 76cc7a44b..40af6f8a1 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java
@@ -1,15 +1,40 @@
package vid.automation.test.test;
+import static org.onap.simulator.presetGenerator.presets.aai.PresetAAIStandardQueryGet.defaultPlacement;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.SERVICE_NAME;
+import static vid.automation.test.Constants.DrawingBoard.CONTEXT_MENU_BUTTON_HEADER;
+import static vid.automation.test.Constants.DrawingBoard.CONTEXT_MENU_HEADER_RESUME_ITEM;
+import static vid.automation.test.infra.ModelInfo.aLaCarteVnfGroupingService;
+import static vid.automation.test.infra.ModelInfo.collectionResourceForResume;
+import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
+import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
+
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMultimap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
-import org.onap.simulator.presetGenerator.presets.aai.*;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIFilterServiceInstanceById;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetServicesGet;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubDetailsGetSpecificService;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubDetailsWithoutInstancesGetSpecificService;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIModelsByInvariantIdGet;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIModelsByInvariantIdGetForServiceWithCR;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIStandardQueryGet;
import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
-import org.onap.simulator.presetGenerator.presets.mso.*;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOAddOrRemoveOneInstanceGroupMember;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2WithNamesAlacarteGroupingService;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteInstanceGroup;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsGetByServiceInstanceId;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOResumeRequest;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames;
import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceMetadataGet;
import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet;
-import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
import org.testng.annotations.Test;
import vid.automation.test.Constants;
import vid.automation.test.infra.Click;
@@ -19,23 +44,9 @@ import vid.automation.test.infra.ModelInfo;
import vid.automation.test.sections.DrawingBoardPage;
import vid.automation.test.services.SimulatorApi;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-import static org.onap.simulator.presetGenerator.presets.aai.PresetAAIStandardQueryGet.defaultPlacement;
-import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.SERVICE_NAME;
-import static vid.automation.test.Constants.DrawingBoard.CONTEXT_MENU_BUTTON_HEADER;
-import static vid.automation.test.Constants.DrawingBoard.CONTEXT_MENU_HEADER_RESUME_ITEM;
-import static vid.automation.test.infra.ModelInfo.aLaCarteVnfGroupingService;
-import static vid.automation.test.infra.ModelInfo.collectionResourceForResume;
-import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
-import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
-
public class ViewEditWithDrawingBoardTest extends VidBaseTestCase {
private static final String MSO_COMPLETE_STATUS = "COMPLETE";
- private static final String COMPLETED = "COMPLETED";
private String vnfGroupInstanceId;
private String serviceInstanceToDeleteName;
private String vnf1Name;
@@ -77,7 +88,7 @@ public class ViewEditWithDrawingBoardTest extends VidBaseTestCase {
GeneralUIUtils.ultimateWait();
DrawingBoardPage drawingBoardPage = new DrawingBoardPage();
- drawingBoardPage.goToIframe();
+ DrawingBoardPage.goToIframe();
GeneralUIUtils.ultimateWait();
action.run();
GeneralUIUtils.ultimateWait();
@@ -173,7 +184,7 @@ public class ViewEditWithDrawingBoardTest extends VidBaseTestCase {
);
}
- @FeatureTogglingTest({Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI, Features.FLAG_1908_RESUME_MACRO_SERVICE})
+ @FeatureTogglingTest({Features.FLAG_1908_MACRO_NOT_TRANSPORT_NEW_VIEW_EDIT, Features.FLAG_1908_RESUME_MACRO_SERVICE})
@Test
public void testResumeServiceInstanceWithCollectionResource() {