aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts9
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java14
2 files changed, 17 insertions, 6 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts
index c17c130d92..b8de7b8559 100644
--- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts
+++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts
@@ -255,7 +255,7 @@ export class InterfaceOperationsComponent {
}
private updateInterfaceOperation() {
- this.isLoading = true;
+ this.modalServiceNg2.currentModal.instance.dynamicContent.instance.isLoading = true;
const interfaceOperationHandlerComponentInstance: InterfaceOperationHandlerComponent = this.modalInstance.instance.dynamicContent.instance;
const operationUpdated: InterfaceOperationModel = interfaceOperationHandlerComponentInstance.operationToUpdate;
const isArtifactChecked = interfaceOperationHandlerComponentInstance.enableAddArtifactImplementation;
@@ -272,9 +272,12 @@ export class InterfaceOperationsComponent {
.subscribe((updatedComponentInstance: ComponentInstance) => {
this.componentInstanceSelected = new ComponentInstance(updatedComponentInstance);
this.initComponentInstanceInterfaceOperations();
+ this.modalServiceNg2.currentModal.instance.dynamicContent.instance.isLoading = false;
+ this.modalServiceNg2.closeCurrentModal();
+ }, () => {
+ this.modalServiceNg2.currentModal.instance.dynamicContent.instance.isLoading = false;
+ this.modalServiceNg2.closeCurrentModal();
});
- this.modalServiceNg2.closeCurrentModal();
- this.isLoading = false;
}
loadDeployedArtifacts() {
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java
index 5a2cb2f5d5..78828d7bbe 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java
@@ -32,6 +32,8 @@ import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
+import static org.onap.sdc.frontend.ci.tests.utilities.GeneralUIUtils.waitForLoader;
+
/**
* Represents the Composition Interface Operations Modal.
*/
@@ -63,6 +65,14 @@ public class InterfaceDefinitionOperationsModal extends AbstractPageObject {
}
}
+ public void isUnloaded() {
+ waitForElementInvisibility(By.xpath(XpathSelector.TITLE_SPAN.getXPath()));
+ waitForElementInvisibility(By.xpath(XpathSelector.INTERFACE_NAME_LABEL.getXPath()));
+ waitForElementInvisibility(By.xpath(XpathSelector.OPERATION_NAME_LABEL.getXPath()));
+ waitForElementInvisibility(By.xpath(XpathSelector.SAVE_BTN.getXPath()));
+ waitForElementInvisibility(By.xpath(XpathSelector.CANCEL_BTN.getXPath()));
+ }
+
private void clickOnSave() {
waitToBeClickable(By.xpath(XpathSelector.SAVE_BTN.getXPath())).click();
}
@@ -96,9 +106,7 @@ public class InterfaceDefinitionOperationsModal extends AbstractPageObject {
addInputComponent.fillValue(inputData);
});
clickOnSave();
- //there is no feedback from the UI to check if the update was successful. Forcing a wait time trying to guarantee that,
- // although time is never a guarantee in this case.
- new Actions(webDriver).pause(Duration.ofSeconds(5)).perform();
+ waitForLoader();
}
private void fillDescription(final String description) {