aboutsummaryrefslogtreecommitdiffstats
path: root/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/DownloadManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/DownloadManager.java')
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/DownloadManager.java36
1 files changed, 29 insertions, 7 deletions
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/DownloadManager.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/DownloadManager.java
index f4264ffdea..4b3ee3fc17 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/DownloadManager.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/DownloadManager.java
@@ -68,7 +68,7 @@ public class DownloadManager {
* @param vspName
* @throws Exception
*/
- public static void downloadCsarByNameFromVSPRepository(String vspName, String vspId, Boolean isDelete) throws Exception{
+ public static void downloadCsarByNameFromVSPRepository(String vspName, Boolean isDelete) throws Exception{
if(isDelete){
FileHandling.cleanCurrentDownloadDir();
@@ -78,21 +78,43 @@ public class DownloadManager {
if (vspFound){
ExtentTestActions.log(Status.INFO, String.format("Going to downloading VSP %s", vspName));
List<WebElement> elemenetsFromTable = HomePage.getElemenetsFromTable();
+ elemenetsFromTable.get(1).click();
+ GeneralUIUtils.waitForLoader();
+ GeneralUIUtils.clickOnElementByTestId(DataTestIdEnum.ImportVfRepository.DOWNLOAD_CSAR.getValue());
+ ExtentTestActions.log(Status.INFO, "Succeeded to downloaded CSAR file named " + vspName + " into folder " + SetupCDTest.getWindowTest().getDownloadDirectory());
+ GeneralUIUtils.getElementsByCSS("div[class^='w-sdc-modal-close']").forEach(e -> e.click());
+ GeneralUIUtils.ultimateWait();
+ }
+ }
+
+
+
+ /*public static void downloadCsarByNameFromVSPRepository(String vspName, String vspId, Boolean isDelete) throws Exception{
+
+ if(isDelete){
+ FileHandling.cleanCurrentDownloadDir();
+ }
+ HomePage.showVspRepository();
+ boolean vspFound = HomePage.searchForVSP(vspName);
+ if (vspFound){
+ ExtentTestActions.log(Status.INFO, String.format("Going to downloading VSP %s", vspName));
+ List<WebElement> elemenetsFromTable = HomePage.getElemenetsFromTable();
// GeneralUIUtils.ultimateWait();
// WebDriverWait wait = new WebDriverWait(GeneralUIUtils.getDriver(), 5);
// WebElement findElement = wait.until(ExpectedConditions.visibilityOf(elemenetsFromTable.get(1)));
elemenetsFromTable.get(1).click();
// findElement.click();
GeneralUIUtils.waitForLoader();
- GeneralUIUtils.clickOnElementByTestId(DataTestIdEnum.ImportVfRepository.DOWNLOAD_CSAR.getValue());
+ GeneralUIUtils.clickOnElementByTestId(DataTestIdEnum.ImportVfRepository.DOWNLOAD_CSAR.getValue());
ExtentTestActions.log(Status.INFO, "Succeeded to downloaded CSAR file named " + vspId + " into folder " + SetupCDTest.getWindowTest().getDownloadDirectory());
- GeneralUIUtils.getElementsByCSS("div[class^='w-sdc-modal-close']").forEach(e -> e.click());
- GeneralUIUtils.ultimateWait();
+ GeneralUIUtils.getElementsByCSS("div[class^='w-sdc-modal-close']").forEach(e -> e.click());
+ GeneralUIUtils.ultimateWait();
}
- }
-
+ }*/
+
+
public static void downloadCsarByNameFromVSPRepository(String vspName, String vspId) throws Exception{
- downloadCsarByNameFromVSPRepository(vspName, vspId, true);
+ downloadCsarByNameFromVSPRepository(vspName, true);
}
// AttFtpClient instance = AttFtpClient.getInstance();