|
33 | 33 | import org.slf4j.LoggerFactory; |
34 | 34 |
|
35 | 35 | import java.net.URISyntaxException; |
| 36 | +import java.time.Duration; |
36 | 37 |
|
37 | 38 | /** |
38 | 39 | * Represents Cdf Studio Page Actions |
@@ -105,6 +106,7 @@ public static void selectRealtimeSourcePlugin(String pluginName) { |
105 | 106 | */ |
106 | 107 | public static void verifyPluginNodeIsDisplayedOnCanvas(String pluginName, long timeoutInSeconds) { |
107 | 108 | logger.info("Waiting for plugin : " + pluginName + " node to displayed on the canvas"); |
| 109 | + WaitHelper.waitForPageToLoad(); |
108 | 110 | WaitHelper.waitForElementToBeDisplayed(CdfStudioLocators.locatePluginNodeInCanvas(pluginName), timeoutInSeconds); |
109 | 111 | AssertionHelper.verifyElementDisplayed(CdfStudioLocators.locatePluginNodeInCanvas(pluginName) |
110 | 112 | , "Plugin : " + pluginName + " node should be displayed on the canvas"); |
@@ -178,8 +180,9 @@ public static void fillPipelineNameAndSave(String pipelineName) { |
178 | 180 | pipelineName(); |
179 | 181 | pipelineNameIp(pipelineName); |
180 | 182 | pipelineSave(); |
181 | | - WaitHelper.waitForElementToBeDisplayed(CdfStudioLocators.statusBanner); |
182 | | - WaitHelper.waitForElementToBeHidden(CdfStudioLocators.statusBanner); |
| 183 | + WaitHelper.waitForElementToBeOptionallyDisplayed(CdfStudioLocators.statusBannerDisplay(), |
| 184 | + ConstantsUtil.SMALL_TIMEOUT_SECONDS); |
| 185 | + WaitHelper.waitForElementToBeHidden(CdfStudioLocators.statusBannerDisplay(), ConstantsUtil.SMALL_TIMEOUT_SECONDS); |
183 | 186 | } |
184 | 187 |
|
185 | 188 | /** |
@@ -294,8 +297,10 @@ public static void verifyPipelinePreviewStatusInLogs(String status) { |
294 | 297 | * Click on the Deploy button |
295 | 298 | */ |
296 | 299 | public static void pipelineDeploy() { |
| 300 | + WaitHelper.waitForPageToLoad(); |
297 | 301 | ElementHelper.clickOnElement(CdfStudioLocators.pipelineDeploy); |
298 | | - WaitHelper.waitForElementToBeDisplayed(CdfStudioLocators.deployingPipelineMessage); |
| 302 | + WaitHelper.waitForElementToBeOptionallyDisplayed(CdfStudioLocators.locatorOfdeployingPipelineMessage(), |
| 303 | + ConstantsUtil.SMALL_TIMEOUT_SECONDS); |
299 | 304 | WaitHelper.waitForElementToBeHidden( |
300 | 305 | CdfStudioLocators.locatorOfdeployingPipelineMessage(), ConstantsUtil.PIPELINE_DEPLOY_TIMEOUT_SECONDS); |
301 | 306 | } |
@@ -532,7 +537,10 @@ public static void clickOnFixAllButtonIfDisplayed() { |
532 | 537 | public static void importPipeline(String filePath) throws URISyntaxException { |
533 | 538 | WaitHelper.waitForElementToBeDisplayed(CdfStudioLocators.importPipelineButton); |
534 | 539 | FileImportUtil.uploadFile(CdfStudioLocators.importPipelineInputTag(), filePath); |
| 540 | + SeleniumDriver.getDriver().manage().timeouts().implicitlyWait(Duration.ofSeconds(50)); |
535 | 541 | clickOnFixAllButtonIfDisplayed(); |
| 542 | + SeleniumDriver.getDriver().manage().timeouts().implicitlyWait(Duration.ofSeconds(40)); |
| 543 | + WaitHelper.waitForPageToLoad(); |
536 | 544 | } |
537 | 545 |
|
538 | 546 | /** |
|
0 commit comments