aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java32
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java31
2 files changed, 37 insertions, 26 deletions
diff --git a/vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java b/vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java
index e8b002cb1..4bd380841 100644
--- a/vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java
+++ b/vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java
@@ -1,5 +1,16 @@
package vid.automation.test.sections;
+import static java.util.stream.Collectors.toMap;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.testng.Assert.assertEquals;
+
+import java.nio.charset.Charset;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
import org.apache.http.NameValuePair;
import org.apache.http.client.utils.URLEncodedUtils;
import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
@@ -10,20 +21,9 @@ import org.openqa.selenium.support.ui.WebDriverWait;
import vid.automation.test.Constants;
import vid.automation.test.infra.Click;
import vid.automation.test.infra.Get;
+import vid.automation.test.infra.Input;
import vid.automation.test.infra.Wait;
-import java.nio.charset.Charset;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Consumer;
-import java.util.stream.Collectors;
-
-import static java.util.stream.Collectors.toMap;
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.testng.Assert.assertEquals;
-
public abstract class InstantiationStatusPage extends VidBasePage {
public static final String refreshButtonId = "refresh-btn";
@@ -40,11 +40,9 @@ public abstract class InstantiationStatusPage extends VidBasePage {
return wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath("//*[table]//tbody/tr"))).size();
}
- public static void verifyUrlMatchInstantiationStatusWithFilterSearchParam(String serviceModelId) {
-
- Map<String, String> paramsMap = extractQueryParamsFromCurrentURL("instantiationStatus?");
- assertEquals(paramsMap.get("filterText"), serviceModelId);
-
+ public static void verifyInstantiationStatusFilterValue(String serviceModelId) {
+ final String filterValue = Input.getValueByTestId("instantiation-status-filter");
+ assertEquals(filterValue, serviceModelId);
}
public static WebElement assertInstantiationStatusRow(String spanIdSelector, Map<String, String> fieldsIdsAndExpected) {
diff --git a/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java b/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
index 03006ade7..f6b883ac1 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
@@ -14,6 +14,8 @@ 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 static vid.automation.test.sections.VidBasePage.goOutFromIframe;
+import static vid.automation.test.sections.VidBasePage.goToIframe;
import com.google.common.collect.ImmutableList;
import java.util.List;
@@ -299,7 +301,10 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
@DataProvider
public static Object[][] filterTexts() {
- return new Object[][]{{serviceName},{modelInvariantId},{serviceUuid}};
+ return new Object[][]{
+ {serviceName},
+ {modelInvariantId},
+ {serviceUuid}};
}
@Test(dataProvider = "filterTexts")
@@ -335,14 +340,22 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
@Test
@FeatureTogglingTest(FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER)
- private void testClickPreviousInstantiationsInCreationDialog() throws Exception {
-
- String serviceId = "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd";
- DeployModernUIMacroDialog deployMacroDialog = getDeployModernUIMacroDialog(serviceId);
- deployMacroDialog.clickPreviousInstantiationButton();
-
- InstantiationStatusPage.verifyUrlMatchInstantiationStatusWithFilterSearchParam(serviceId);
-
+ public void testClickPreviousInstantiationsInCreationDialog() {
+ try {
+ String serviceId = "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd";
+ DeployModernUIMacroDialog deployMacroDialog = getDeployModernUIMacroDialog(serviceId);
+ deployMacroDialog.clickPreviousInstantiationButton();
+
+ //exit form deploy dialog
+ goOutFromIframe();
+ //go into Instantiation Status page
+ goToIframe();
+
+ InstantiationStatusPage.verifyInstantiationStatusFilterValue(serviceId);
+ }
+ finally {
+ goOutFromIframe();
+ }
}
private BrowseASDCPage registerSimulatorAndGoToBrowseSDC() {