aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2020-01-01 13:44:54 +0200
committerIttay Stern <ittay.stern@att.com>2020-01-01 13:47:50 +0200
commitf74abc51cf063ab5cc2fa919fe2e1b47d140664d (patch)
treed5590be466b4a7b73dff9d5da5973d72f378e6cf
parent5a3532bc41b580fea966f4be79d0b5462ef7434d (diff)
Wait for loader after NewServiceInstanceTest popups-close
Issue-ID: VID-647 Change-Id: I5c49f129709bef2501ea3326c5c8bc5072c73059 Signed-off-by: Ittay Stern <ittay.stern@att.com>
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java28
1 files changed, 15 insertions, 13 deletions
diff --git a/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
index 8a5a2f1d3..02c739809 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
@@ -378,12 +378,10 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
// Wizard pages of Network and VPN
Click.byTestIdOnceItsAvailable("10a74149-c9d7-4918-bbcf-d5fb9b1799ce", 20);
- Click.byTestId("setMembersBtn");
- GeneralUIUtils.ultimateWait();
+ clickToCloseModal("setMembersBtn");
Click.byTestIdOnceItsAvailable("120d39fb-3627-473d-913c-d228dd0f8e5b", 20);
- Click.byTestId("setMembersBtn");
- GeneralUIUtils.ultimateWait();
+ clickToCloseModal("setMembersBtn");
Assert.assertEquals(Get.byTestId("node-type-indicator").getText(),"VRF");
@@ -538,7 +536,7 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
private void editVfModuleAndJustSetName(String vfModuleName, String vfModuleUUID) {
hoverAndClickEditButton(vfModuleUUID + "-" + vfModuleName);
Input.text("VF instance name ZERO", "instanceName");
- Click.byTestId(VNF_SET_BUTTON_TEST_ID);
+ clickToCloseModal(VNF_SET_BUTTON_TEST_ID);
}
@Test
@@ -756,7 +754,7 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
browseASDCPage.selectServiceTypeByName(serviceType);
SelectOption.byTestIdAndVisibleText("WayneHolland", (Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID));
SelectOption.byTestIdAndVisibleText("WATKINS", Constants.OwningEntity.PROJECT_SELECT_TEST_ID);
- Click.byTestId("form-set");
+ clickToCloseModal("form-set");
VidBasePage.goOutFromIframe();
browseASDCPage.goToIframe();
}
@@ -1070,9 +1068,9 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
vidBasePage.screenshotDeployDialog("createMacroService-" + serviceInstanceName);
if ("WILL_CANCEL".equals(cycle)) {
- Click.byTestId(Constants.CANCEL_BUTTON_TEST_ID);
+ clickToCloseModal(Constants.CANCEL_BUTTON_TEST_ID);
} else {
- Click.byTestId(setButtonTestId);
+ clickToCloseModal(setButtonTestId);
}
VidBasePage.goOutFromIframe();
@@ -1129,7 +1127,7 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
vidBasePage.screenshotDeployDialog("createALaCarteService-" + serviceInstanceName);
- Click.byTestId(setButtonTestId);
+ clickToCloseModal(setButtonTestId);
VidBasePage.goOutFromIframe();
@@ -1209,7 +1207,7 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
}
vidBasePage.screenshotDeployDialog("createVnf-" + serviceInstanceName);
- Click.byTestId(VNF_SET_BUTTON_TEST_ID);
+ clickToCloseModal(VNF_SET_BUTTON_TEST_ID);
if (isNetwork) {
return;
}
@@ -1224,8 +1222,7 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
Assert.assertTrue(Get.isOptionSelectedInMultiSelect(Constants.OwningEntity.PLATFORM_MULTI_SELECT_TEST_ID, "platform"));
- Click.byTestId(Constants.CANCEL_BUTTON_TEST_ID);
- GeneralUIUtils.ultimateWait();
+ clickToCloseModal(Constants.CANCEL_BUTTON_TEST_ID);
} else {
toggleItemInTree(Constants.DrawingBoard.AVAILABLE_MODELS_TREE);
}
@@ -1345,7 +1342,12 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
uploadSupplementaryFile("sample.json", true, browseASDCPage, setButtonTestId);
browseASDCPage.screenshotDeployDialog("createVfModule-" + serviceInstanceName);
- Click.byTestId(setButtonTestId);
+ clickToCloseModal(setButtonTestId);
+ }
+
+ private void clickToCloseModal(String setOrCancelButtonTestId) {
+ Click.byTestId(setOrCancelButtonTestId);
+ GeneralUIUtils.ultimateWait();
}
private void clickEditVfModule(ServiceData serviceData) {