adding orchestration type to service models view
[vid.git] / vid-automation / src / main / java / vid / automation / test / sections / VidBasePage.java
index 5b7239a..43dd68f 100644 (file)
@@ -4,10 +4,7 @@ import com.aventstack.extentreports.Status;
 import org.junit.Assert;
 import org.onap.sdc.ci.tests.execute.setup.ExtentTestActions;
 import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
-import org.openqa.selenium.By;
-import org.openqa.selenium.JavascriptExecutor;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
+import org.openqa.selenium.*;
 import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.WebDriverWait;
 import vid.automation.test.Constants;
@@ -57,8 +54,7 @@ public class VidBasePage {
 
     public String getInputValue(String inputTestsId) {
         WebElement instanceNameInput = GeneralUIUtils.getInputElement(inputTestsId);
-        String value =instanceNameInput.getAttribute("value");
-        return value;
+        return instanceNameInput.getAttribute("value");
     }
 
     public String generateInstanceName(String prefix) {
@@ -114,6 +110,17 @@ public class VidBasePage {
         return this;
     }
 
+    public boolean isModelWithGivenServiceUUIDVisible(String serviceUUID) {
+        String elementTestId = Constants.DEPLOY_BUTTON_TESTS_ID_PREFIX + serviceUUID;
+        try {
+            GeneralUIUtils.getWebElementByTestID(elementTestId, 10);
+            GeneralUIUtils.ultimateWait();
+        } catch (TimeoutException te) {
+            return false;
+        }
+        return true;
+    }
+
     public void screenshotDeployDialog(String serviceUUID) {
         try {
             GeneralUIUtils.ultimateWait();