(file: any): void => {
this.isLoading = false;
if (file.body) {
- this.fileUtilsService.downloadFile(file.body, packageId + '.csar');
+ this.fileUtilsService.downloadFile(new Blob([file.body],
+ {type: 'application/octet-stream'}), packageId + '.csar');
}
}, (): void => {
this.isLoading = false;
<properties>
<selenium.version>3.141.59</selenium.version>
- <gecko.driver.version>0.27.0</gecko.driver.version>
+ <gecko.driver.version>0.29.0</gecko.driver.version>
<!-- SDC Startup parameters -->
<it.env.name>integration-test</it.env.name>
<it.cassandra.port>9042</it.cassandra.port>
<it.sdc-be.plugins>${project.build.directory}/plugins/sdc-be</it.sdc-be.plugins>
<it.shared.volume>/tmp/sdc-integration-tests</it.shared.volume>
<it.docker.version>latest</it.docker.version>
- <it.ui.firefox.version>2.53.1</it.ui.firefox.version>
+ <it.ui.firefox.version>86.0</it.ui.firefox.version>
<!-- parser-->
<sdc-tosca-parser.version>1.6.5</sdc-tosca-parser.version>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
- <version>4.0.0-alpha-2</version>
+ <version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<!--<port>5900</port>-->
<!-- VNC port for viewing the browser result -->
<!-- password to access is "secret" -->
-
</ports>
</tcp>
</wait>
<env>
- <SE_OPTS>-debug</SE_OPTS>
<JAVA_OPTS>-Xmx512m</JAVA_OPTS>
<!--<START_XVFB>false</START_XVFB>-->
<SCREEN_WIDTH>1920</SCREEN_WIDTH>
//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);
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");
.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();
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;
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;
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) {
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);
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 {
ServiceGeneralPage.defineNamingPolicy(service.getNamingPolicy());
defineTagsList2(service.getTags());
ServiceGeneralPage.defineContactId(service.getContactId());
+ GeneralUIUtils.waitForElementInVisibilityBy(By.className("notification-container"), 10000);
GeneralUIUtils.clickSomewhereOnPage();
}