|
25 | 25 | import io.cdap.e2e.utils.SeleniumDriver; |
26 | 26 | import io.cdap.e2e.utils.SeleniumHelper; |
27 | 27 | import io.cdap.e2e.utils.WaitHelper; |
| 28 | +import io.cucumber.java8.Th; |
28 | 29 | import org.openqa.selenium.By; |
29 | 30 | import org.openqa.selenium.ElementClickInterceptedException; |
30 | 31 | import org.openqa.selenium.TimeoutException; |
|
33 | 34 | import org.slf4j.LoggerFactory; |
34 | 35 |
|
35 | 36 | import java.net.URISyntaxException; |
| 37 | +import java.time.Duration; |
36 | 38 |
|
37 | 39 | /** |
38 | 40 | * Represents Cdf Studio Page Actions |
@@ -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 | /** |
@@ -217,7 +220,8 @@ public static void closePreviewMenu() { |
217 | 220 | * @param runtimeArgumentKey macro argument |
218 | 221 | * @param value actual value to enter |
219 | 222 | */ |
220 | | - public static void enterRuntimeArgumentValue(String runtimeArgumentKey, String value) { |
| 223 | + public static void enterRuntimeArgumentValue(String runtimeArgumentKey, String value) throws InterruptedException { |
| 224 | + Thread.sleep(3000); |
221 | 225 | ElementHelper.sendKeys(CdfStudioLocators.runtimeArgsValue(runtimeArgumentKey), value); |
222 | 226 | } |
223 | 227 |
|
@@ -286,16 +290,18 @@ public static void clickPreviewLogsButton() { |
286 | 290 | * |
287 | 291 | * @param status |
288 | 292 | */ |
289 | | - public static void verifyPipelinePreviewStatusInLogs(String status) { |
290 | | - AssertionHelper.verifyElementDisplayed(CdfLogLocators.getPipelineStatusFromLogs(status)); |
| 293 | + public static void verifyPipelinePreviewStatusInLogs(String status) throws InterruptedException { |
| 294 | + WaitHelper.waitForElementToBeDisplayed(CdfLogLocators.getPipelineStatusFromLogs(status)); |
| 295 | + // AssertionHelper.verifyElementDisplayed(CdfLogLocators.getPipelineStatusFromLogs(status)); |
291 | 296 | } |
292 | 297 |
|
293 | 298 | /** |
294 | 299 | * Click on the Deploy button |
295 | 300 | */ |
296 | 301 | public static void pipelineDeploy() { |
297 | 302 | ElementHelper.clickOnElement(CdfStudioLocators.pipelineDeploy); |
298 | | - WaitHelper.waitForElementToBeDisplayed(CdfStudioLocators.deployingPipelineMessage); |
| 303 | + WaitHelper.waitForElementToBeOptionallyDisplayed(CdfStudioLocators.locatorOfdeployingPipelineMessage(), |
| 304 | + ConstantsUtil.SMALL_TIMEOUT_SECONDS); |
299 | 305 | WaitHelper.waitForElementToBeHidden( |
300 | 306 | CdfStudioLocators.locatorOfdeployingPipelineMessage(), ConstantsUtil.PIPELINE_DEPLOY_TIMEOUT_SECONDS); |
301 | 307 | } |
@@ -529,10 +535,14 @@ public static void clickOnFixAllButtonIfDisplayed() { |
529 | 535 | * Imports a pipeline from the specified file path. |
530 | 536 | * @param filePath The path to the file containing the pipeline to be imported. |
531 | 537 | **/ |
532 | | - public static void importPipeline(String filePath) throws URISyntaxException { |
| 538 | + public static void importPipeline(String filePath) throws URISyntaxException, InterruptedException { |
533 | 539 | WaitHelper.waitForElementToBeDisplayed(CdfStudioLocators.importPipelineButton); |
534 | 540 | FileImportUtil.uploadFile(CdfStudioLocators.importPipelineInputTag(), filePath); |
535 | | - clickOnFixAllButtonIfDisplayed(); |
| 541 | + |
| 542 | +// clickOnFixAllButtonIfDisplayed(); |
| 543 | + ElementHelper.clickOnElement(CdfStudioLocators.fixAllButtonWrangler); |
| 544 | + Thread.sleep(20000); |
| 545 | + WaitHelper.waitForPageToLoad(); |
536 | 546 | } |
537 | 547 |
|
538 | 548 | /** |
|
0 commit comments