summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.html2
-rw-r--r--catalog-ui/src/app/ng2/services/onboarding.service.ts2
-rw-r--r--catalog-ui/src/app/utils/component-factory.ts5
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ResourceLeftSideMenu.java2
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/TopNavComponent.java3
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspCommitModal.java2
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspRepositoryModalComponent.java10
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java2
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUiUtils.java5
9 files changed, 17 insertions, 16 deletions
diff --git a/catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.html b/catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.html
index 6ba1f428a1..49ed984b47 100644
--- a/catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.html
+++ b/catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.html
@@ -1,4 +1,4 @@
-<div class="onboarding-modal">
+<div data-tests-id="importVspTable" class="onboarding-modal">
<div class="search-wrapper">
<span class="sub-title-wrapper">
<svg-icon class="info-button"
diff --git a/catalog-ui/src/app/ng2/services/onboarding.service.ts b/catalog-ui/src/app/ng2/services/onboarding.service.ts
index 0ec4875d91..51a7fc4c7f 100644
--- a/catalog-ui/src/app/ng2/services/onboarding.service.ts
+++ b/catalog-ui/src/app/ng2/services/onboarding.service.ts
@@ -116,7 +116,7 @@ export class OnboardingService {
newMetadata.description = csar.description;
newMetadata.selectedCategory = selectedCategory && selectedSubCategory ? selectedCategory.name + "_#_" + selectedSubCategory.name : '';
newMetadata.filterTerm = newMetadata.name + ' ' + newMetadata.description + ' ' + newMetadata.vendorName + ' ' + newMetadata.csarVersion;
- newMetadata.resourceType = "VF";
+ newMetadata.resourceType = csar.resourceType;
newMetadata.componentType = ComponentType.RESOURCE;
newMetadata.tags = [];
newMetadata.icon = DEFAULT_ICON;
diff --git a/catalog-ui/src/app/utils/component-factory.ts b/catalog-ui/src/app/utils/component-factory.ts
index 889f6fb43b..d4e282fcb0 100644
--- a/catalog-ui/src/app/utils/component-factory.ts
+++ b/catalog-ui/src/app/utils/component-factory.ts
@@ -142,7 +142,7 @@ export class ComponentFactory {
return newResource;
};
- public createEmptyComponent = (componentType:string):Component => {
+ public createEmptyComponent = (componentType:string, resourceType?:string):Component => {
let newComponent:Component;
switch (componentType) {
@@ -161,6 +161,9 @@ export class ComponentFactory {
case ResourceType.CVFC:
case ResourceType.CONFIGURATION:
newComponent = new Resource(this.ResourceService, this.$q);
+ if (resourceType){
+ (<Resource> newComponent).resourceType = resourceType;
+ }
break;
}
newComponent.componentType = componentType;
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ResourceLeftSideMenu.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ResourceLeftSideMenu.java
index fd2f06a9b7..ab080fe046 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ResourceLeftSideMenu.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ResourceLeftSideMenu.java
@@ -69,7 +69,7 @@ public class ResourceLeftSideMenu extends AbstractPageObject {
*/
public enum XpathSelector {
MAIN_DIV("w-sdc-left-sidebar", "//div[@class='%s']"),
- PROPERTIES_ASSIGNMENT_MENU("Properties AssignmentLeftSideMenu", "//div[@data-tests-id='%s']/button");
+ PROPERTIES_ASSIGNMENT_MENU("Properties AssignmentLeftSideMenu", "//*[@data-tests-id='%s']");
private final String id;
private final String xpathFormat;
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/TopNavComponent.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/TopNavComponent.java
index acac74fbd2..e1ca924184 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/TopNavComponent.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/TopNavComponent.java
@@ -86,6 +86,7 @@ public class TopNavComponent extends AbstractPageObject {
*/
public VspRepositoryModalComponent clickOnRepositoryIcon() {
wrappingElement.findElement(By.xpath(REPOSITORY_ICON.getXpath())).click();
+
return new VspRepositoryModalComponent(webDriver);
}
@@ -123,7 +124,7 @@ public class TopNavComponent extends AbstractPageObject {
SUB_MENU_BUTTON_HOME("sub-menu-button-home", "//*[@data-tests-id='%s']"),
ARROW_DROPDOWN("triangle-dropdown", "//li[contains(@class, '%s')]"),
MAIN_MENU_ONBOARD_BTN("main-menu-button-onboard", "//a[@data-tests-id='%s']"),
- REPOSITORY_ICON("repository-icon", "//div[@data-tests-id='%s']");
+ REPOSITORY_ICON("repository-icon", "//*[@data-tests-id='%s']");
private final String id;
private final String xpathFormat;
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspCommitModal.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspCommitModal.java
index 48082f959f..27b0070f7c 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspCommitModal.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspCommitModal.java
@@ -19,6 +19,7 @@
package org.openecomp.sdc.ci.tests.pages;
+import org.openecomp.sdc.ci.tests.utilities.GeneralUIUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
@@ -64,6 +65,7 @@ public class VspCommitModal extends AbstractPageObject {
public void submit() {
final WebElement commitAndSubmitBtn = wrappingElement.findElement(By.xpath(COMMIT_AND_SUBMIT_BTN.getXpath()));
commitAndSubmitBtn.click();
+ GeneralUIUtils.ultimateWait();
confirmSuccess();
}
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspRepositoryModalComponent.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspRepositoryModalComponent.java
index f610074a55..e6bc40f450 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspRepositoryModalComponent.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/VspRepositoryModalComponent.java
@@ -72,7 +72,7 @@ public class VspRepositoryModalComponent extends AbstractPageObject {
final List<WebElement> vspResultList =
findSubElements(wrappingElement, By.className(RESULTS_CONTAINER_DIV.getId()));
vspResultList.get(listPosition).click();
- findSubElement(wrappingElement, By.xpath(IMPORT_VSP_BTN.getXpath())).click();
+ GeneralUIUtils.clickOnElementByTestId(IMPORT_VSP_BTN.getId());
return new ResourceCreatePage(webDriver, new LoaderHelper(), new NotificationHelper());
}
@@ -101,10 +101,10 @@ public class VspRepositoryModalComponent extends AbstractPageObject {
* Enum that contains identifiers and xpath expressions to elements related to the enclosing page object.
*/
public enum XpathSelector {
- MODAL_DIV("modalOnboarding", "//div[@modal='%s']"),
- SEARCH_TXT("onboarding-search", "//input[@data-tests-id='%s']"),
- IMPORT_VSP_BTN("import-csar", "//span[@data-tests-id='%s']"),
- RESULTS_CONTAINER_DIV("flex-container", "//div[contains(@class,'%s']");
+ MODAL_DIV("importVspTable", "//*[@data-tests-id='%s']"),
+ SEARCH_TXT("onboarding-search-input", "//input[@data-tests-id='%s']"),
+ IMPORT_VSP_BTN("import-csar", "//*[@data-tests-id='%s']"),
+ RESULTS_CONTAINER_DIV("datatable-body-cell-label", "//datatable-body[contains(@class,'%s']");
private final String id;
private final String xpathFormat;
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java
index 57112dc594..a021054b0e 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java
@@ -63,7 +63,7 @@ public final class GeneralUIUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(GeneralUIUtils.class);
- private static final String TEST_ID_XPATH = "//*[@data-tests-id='%s']";
+ private static final String TEST_ID_XPATH = "//*[@data-test-id='%1$s' or @data-tests-id='%1$s']";
private static final String TEST_ID_CHILD_XPATH = "//*[@data-tests-id='%s']//*";
private static final String TEST_ID_ATTRIBUTE_NAME = "data-tests-id";
private static final String COLOR_YELLOW_BORDER_4PX_SOLID_YELLOW = "color: yellow; border: 4px solid yellow;";
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUiUtils.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUiUtils.java
index 6bc08ec81e..020c41607a 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUiUtils.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUiUtils.java
@@ -166,8 +166,6 @@ public class OnboardingUiUtils {
DownloadManager.downloadCsarByNameFromVSPRepository(vspName, createVendorSoftwareProduct.getVspId());
File latestFilefromDir = FileHandling.getLastModifiedFileNameFromDir();
- ExtentTestActions.log(Status.INFO, String.format("Searching for onboarded %s", vnfFile));
- HomePage.showVspRepository();
ExtentTestActions.log(Status.INFO, String.format("Going to import %s", vnfFile.substring(0, vnfFile.indexOf("."))));
importVSP(createVendorSoftwareProduct);
@@ -205,9 +203,6 @@ public class OnboardingUiUtils {
artifactName = deploymentArtifact.getFileName().trim();
}
- if (heatEnvFilesFromCSAR.contains(artifactName + ".env")) {
- artifactVersion = "2";
- }
ArtifactUIUtils.validateArtifactNameVersionType(artifactName, artifactVersion, deploymentArtifact.getType());
}
}