adding orchestration type to service models view
[vid.git] / vid-automation / src / main / java / vid / automation / test / sections / VidBasePage.java
index 7290204..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;
@@ -113,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();