aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation')
-rw-r--r--vid-automation/src/main/java/vid/automation/test/Constants.java1
-rw-r--r--vid-automation/src/main/java/vid/automation/test/sections/ServiceProxyPage.java14
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java14
3 files changed, 26 insertions, 3 deletions
diff --git a/vid-automation/src/main/java/vid/automation/test/Constants.java b/vid-automation/src/main/java/vid/automation/test/Constants.java
index e639ee0a2..1130107b3 100644
--- a/vid-automation/src/main/java/vid/automation/test/Constants.java
+++ b/vid-automation/src/main/java/vid/automation/test/Constants.java
@@ -450,6 +450,7 @@ public class Constants {
public static final String SOURCE_DROPDOWN_TEST_ID = "sourceDropDown";
public static final String COLLECTOR_DROPDOWN_TEST_ID = "collectorDropDown";
public static final String COLLECTOR_INSTANCE_NAME_TEST_ID = "collectorInstanceName";
+ public static final String SOURCE_SUBSCRIBER_NAME = "sourceSubscriberName";
public static final String SOURCE_INSTANCE_NAME_TEST_ID = "sourceInstanceName";
public static final String MODEL_NAME_TEST_ID = "modelName";
public static final String COLLECTOR_NO_RESULT_MSG_TEST_ID = "collectorNoResults";
diff --git a/vid-automation/src/main/java/vid/automation/test/sections/ServiceProxyPage.java b/vid-automation/src/main/java/vid/automation/test/sections/ServiceProxyPage.java
index b96a7d38d..e3b924ab4 100644
--- a/vid-automation/src/main/java/vid/automation/test/sections/ServiceProxyPage.java
+++ b/vid-automation/src/main/java/vid/automation/test/sections/ServiceProxyPage.java
@@ -4,6 +4,7 @@ import org.junit.Assert;
import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
import org.openqa.selenium.WebElement;
import vid.automation.test.Constants;
+import vid.automation.test.Constants.ConfigurationCreation;
import vid.automation.test.Constants.ViewEdit;
import vid.automation.test.infra.SelectOption;
@@ -15,6 +16,13 @@ public class ServiceProxyPage extends VidBasePage {
SelectOption.byTestIdAndVisibleText(source, Constants.ConfigurationCreation.SOURCE_DROPDOWN_TEST_ID);
return this;
}
+
+ public ServiceProxyPage chooseSourceSubscriberName(String subscriberName){
+ SelectOption.byTestIdAndVisibleText(subscriberName, "sourceSubscriberName");
+ GeneralUIUtils.ultimateWait();
+ return this;
+ };
+
public ServiceProxyPage chooseSourceServiceType(String sourceServiceType){
SelectOption.byTestIdAndVisibleText(sourceServiceType, "sourceServiceType");
GeneralUIUtils.ultimateWait();
@@ -25,6 +33,12 @@ public class ServiceProxyPage extends VidBasePage {
GeneralUIUtils.ultimateWait();
return this;
}
+
+ public void assertSourceSubscriberName(String sourceSubscriberName){
+ String displayedSubscriberName = SelectOption.getSelectedOption(ConfigurationCreation.SOURCE_SUBSCRIBER_NAME);
+ Assert.assertEquals("The displayed source subscriber name is not correct", sourceSubscriberName, displayedSubscriberName);
+ }
+
public void assertCollectorServiceType(String collectorServiceType) {
String displayedCollectorServiceType = SelectOption.getSelectedOption("collectorServiceType");
Assert.assertEquals("The displayed collector service type is incorrect", collectorServiceType, displayedCollectorServiceType);
diff --git a/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java b/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java
index eac0951b7..a3699e341 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java
@@ -1,6 +1,8 @@
package vid.automation.test.test;
import com.google.common.collect.ImmutableMap;
+import java.util.HashMap;
+import java.util.Map;
import org.junit.Assert;
import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
import org.openqa.selenium.WebElement;
@@ -17,9 +19,6 @@ import vid.automation.test.sections.ViewEditPage;
import vid.automation.test.services.BulkRegistration;
import vid.automation.test.services.SimulatorApi;
-import java.util.HashMap;
-import java.util.Map;
-
public class CreatePortMirroringConfigurationTest extends VidBaseTestCase {
private ViewEditPage viewEditPage = new ViewEditPage();
@@ -32,6 +31,7 @@ public class CreatePortMirroringConfigurationTest extends VidBaseTestCase {
private String pnfInstanceName = "AS-pnf2-10219--as988q";
private String pnfServiceType = "DARREN MCGEE";
private String vnfServiceType = "TYLER SILVIA";
+ private String sourceSubscriberName = "SILVIA ROBBINS";
private String defaultCollectorServiceType = "TYLER SILVIA";
private String vnfInstanceName = "zhvf6aepdg01";
private String active = "Active";
@@ -42,6 +42,10 @@ public class CreatePortMirroringConfigurationTest extends VidBaseTestCase {
return Features.FLAG_1810_CR_LET_SELECTING_COLLECTOR_TYPE_UNCONDITIONALLY.isActive();
}
+ private boolean featureFlagLetSelectingSourceSubscriber() {
+ return Features.FLAG_2006_PORT_MIRRORING_LET_SELECTING_SOURCE_SUBSCRIBER.isActive();
+ }
+
private String expectedPnfCollectorServiceType() {
return (featureFlagLetsSelectingCollector() ? pnfServiceType : defaultCollectorServiceType).replace(" ", "%20");
}
@@ -234,6 +238,10 @@ public class CreatePortMirroringConfigurationTest extends VidBaseTestCase {
//select source & collector
serviceProxyPage.assertCollectorServiceType(defaultCollectorServiceType);
+ if(featureFlagLetSelectingSourceSubscriber()){
+ serviceProxyPage.assertSourceSubscriberName(sourceSubscriberName);
+ serviceProxyPage.chooseSourceSubscriberName(sourceSubscriberName);
+ }
serviceProxyPage.chooseCollectorServiceType(vnfServiceType);
serviceProxyPage.chooseCollector(vnfInstanceName);
serviceProxyPage.assertSelectedInstanceIcon(Constants.ConfigurationCreation.COLLECTOR_INSTANCE_SELECTED_ICON_TEST_ID);