diff options
Diffstat (limited to 'integration-tests/src/test')
5 files changed, 17 insertions, 11 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/WebDriverThread.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/WebDriverThread.java index 4d08e846e8..a24c21dab8 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/WebDriverThread.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/WebDriverThread.java @@ -104,7 +104,9 @@ public class WebDriverThread { //firefoxProfile.setPreference("browser.download.dir", config.getContainerDownloadAutomationFolder()); //firefoxProfile.setPreference("app.update.notifyDuringDownload", false); //firefoxProfile.setPreference("browser.download.lastDir", config.getContainerDownloadAutomationFolder()); - firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/octet-stream, application/xml, text/plain, text/xml, image/jpeg"); + final String contentType = "application/zip, application/octet-stream, application/xml, text/plain, text/xml, image/jpeg"; + firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk", contentType); + firefoxProfile.setPreference("browser.helperApps.neverAsk.openFile", contentType); firefoxProfile.setPreference("network.proxy.type", 4); firefoxProfile.setAcceptUntrustedCertificates(true); firefoxProfile.setAssumeUntrustedCertificateIssuer(true); diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/GeneralPageElements.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/GeneralPageElements.java index 2397815c98..64c87ce945 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/GeneralPageElements.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/GeneralPageElements.java @@ -141,7 +141,6 @@ public class GeneralPageElements { SetupCDTest.getExtendTest().log(Status.INFO, String.format("Component %s archived successfully", componentName)); } - //TODO should implement real code public static void clickCertifyButton(String componentName) throws Exception { try { SetupCDTest.getExtendTest().log(Status.INFO, "Clicking on certify button"); @@ -150,8 +149,7 @@ public class GeneralPageElements { .sendKeys("resource " + componentName + " certified successfully"); clickOKButton(); GeneralUIUtils.ultimateWait(); - HomePage.navigateToHomePage(); - GeneralUIUtils.ultimateWait(); + GeneralUIUtils.waitForElementInVisibilityBy(By.className("notification-container"), 10000); HomePage.navigateToHomePage(); GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.MainMenuButtons.SEARCH_BOX.getValue(), GeneralUIUtils.getTimeOut() / WAIT_FOR_ELEMENT_TIME_OUT_DIVIDER); GeneralUIUtils.ultimateWait(); diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/HomePage.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/HomePage.java index 4f270cf751..0c72a9752c 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/HomePage.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/HomePage.java @@ -29,6 +29,7 @@ import org.onap.sdc.frontend.ci.tests.utilities.FileHandling; import org.onap.sdc.frontend.ci.tests.utilities.GeneralUIUtils; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; +import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.slf4j.Logger; @@ -41,6 +42,7 @@ import java.util.Calendar; import java.util.List; import java.util.UUID; +import static org.onap.sdc.frontend.ci.tests.execute.setup.DriverFactory.getDriver; import static org.onap.sdc.frontend.ci.tests.execute.setup.SetupCDTest.getExtendTest; import static org.onap.sdc.frontend.ci.tests.pages.HomePage.PageElement.REPOSITORY_ICON; @@ -103,6 +105,10 @@ public class HomePage { GeneralUIUtils.closeErrorMessage(); WebElement homeButton = GeneralUIUtils .getInputElement(DataTestIdEnum.MainMenuButtons.HOME_BUTTON.getValue()); + if (homeButton != null) { + //making sure that the mouse it is not on the add/import area + new Actions(getDriver()).moveToElement(homeButton).perform(); + } return homeButton != null && homeButton.isDisplayed(); } catch (final Exception e) { diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/OnboardingUiUtils.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/OnboardingUiUtils.java index b415192697..84a528e98c 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/OnboardingUiUtils.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/OnboardingUiUtils.java @@ -165,7 +165,7 @@ public class OnboardingUiUtils { DownloadManager.downloadCsarByNameFromVSPRepository(vspName, createVendorSoftwareProduct.getVspId()); File latestFilefromDir = FileHandling.getLastModifiedFileNameFromDir(); - + ExtentTestActions.log(Status.INFO, String.format("Downloaded CSAR file '%s'", latestFilefromDir)); ExtentTestActions.log(Status.INFO, String.format("Going to import %s", vnfFile.substring(0, vnfFile.indexOf(".")))); importVSP(createVendorSoftwareProduct); diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/ServiceUIUtils.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/ServiceUIUtils.java index 48fb0b8efb..1293401ca2 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/ServiceUIUtils.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/ServiceUIUtils.java @@ -21,20 +21,19 @@ package org.onap.sdc.frontend.ci.tests.utilities; import com.aventstack.extentreports.Status; +import java.util.ArrayList; +import java.util.List; import org.onap.sdc.backend.ci.tests.datatypes.ServiceReqDetails; import org.onap.sdc.backend.ci.tests.datatypes.enums.ServiceCategoriesEnum; +import org.onap.sdc.frontend.ci.tests.datatypes.DataTestIdEnum; +import org.onap.sdc.frontend.ci.tests.execute.setup.SetupCDTest; import org.onap.sdc.frontend.ci.tests.pages.GeneralPageElements; import org.onap.sdc.frontend.ci.tests.pages.ServiceGeneralPage; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.category.CategoryDefinition; -import org.onap.sdc.frontend.ci.tests.datatypes.DataTestIdEnum; -import org.onap.sdc.frontend.ci.tests.execute.setup.SetupCDTest; +import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; -import org.openqa.selenium.interactions.Actions; - -import java.util.ArrayList; -import java.util.List; public class ServiceUIUtils { @@ -61,6 +60,7 @@ public class ServiceUIUtils { ServiceGeneralPage.defineNamingPolicy(service.getNamingPolicy()); defineTagsList2(service.getTags()); ServiceGeneralPage.defineContactId(service.getContactId()); + GeneralUIUtils.waitForElementInVisibilityBy(By.className("notification-container"), 10000); GeneralUIUtils.clickSomewhereOnPage(); } |