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.java60
1 files changed, 32 insertions, 28 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 b1e8955f3d..1d8d514676 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
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,35 +30,39 @@ import org.openqa.selenium.WebElement;
import java.util.List;
public class DownloadManager {
-
-
- /**
- * this method download csar file from VSP repository to default browser download directory
- * @param vspName
- * @throws Exception
- */
- public static void downloadCsarByNameFromVSPRepository(String vspName, 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();
- elemenetsFromTable.get(1).click();
- GeneralUIUtils.waitForLoader();
+
+ private DownloadManager() {
+
+ }
+
+ /**
+ * this method download csar file from VSP repository to default browser download directory
+ *
+ * @param vspName
+ * @throws Exception
+ */
+ public static void downloadCsarByNameFromVSPRepository(String vspName, 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();
+ 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());
+ 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) throws Exception {
+ downloadCsarByNameFromVSPRepository(vspName, true);
+ }
- public static void downloadCsarByNameFromVSPRepository(String vspName, String vspId) throws Exception{
- downloadCsarByNameFromVSPRepository(vspName, true);
- }
-
}