From 703ca118317e4df84695a536c53ef2b7d819bfb4 Mon Sep 17 00:00:00 2001 From: SbloodyS <460888207@qq.com> Date: Sat, 29 Jun 2024 23:14:46 +0800 Subject: [PATCH] feature 16229 --- .../dolphinscheduler/e2e/pages/common/CodeEditor.java | 9 +++++---- .../org/apache/dolphinscheduler/e2e/core/Constants.java | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/CodeEditor.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/CodeEditor.java index cd9b4c29ec..25c0e3bd76 100644 --- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/CodeEditor.java +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/CodeEditor.java @@ -33,6 +33,7 @@ import org.openqa.selenium.support.FindBys; import org.openqa.selenium.support.PageFactory; import lombok.Getter; +import lombok.SneakyThrows; import java.util.List; @@ -59,6 +60,7 @@ public final class CodeEditor { this.driver = driver; } + @SneakyThrows public CodeEditor content(String content) { WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.elementToBeClickable(editor.get(0))); @@ -80,7 +82,6 @@ public final class CodeEditor { .click() .sendKeys(inputContent) .sendKeys(Constants.LINE_SEPARATOR) - .pause(Constants.DEFAULT_SLEEP_SECONDS) .perform(); continue; } else { @@ -93,8 +94,8 @@ public final class CodeEditor { .click() .sendKeys(inputContent) .sendKeys(Constants.LINE_SEPARATOR) - .pause(Constants.DEFAULT_SLEEP_SECONDS) .perform(); + Thread.sleep(Constants.DEFAULT_SLEEP_SECONDS); } else { for (int p = 0 ; p < editorLineText.strip().length(); p++) { clearLine(actions, editor.get(i)); @@ -106,15 +107,15 @@ public final class CodeEditor { .click() .sendKeys(inputContent) .sendKeys(Constants.LINE_SEPARATOR) - .pause(Constants.DEFAULT_SLEEP_SECONDS) .perform(); + Thread.sleep(Constants.DEFAULT_SLEEP_SECONDS); } } else { actions.moveToElement(editor.get(i)) .click() .sendKeys(Constants.LINE_SEPARATOR) - .pause(Constants.DEFAULT_SLEEP_SECONDS) .perform(); + Thread.sleep(Constants.DEFAULT_SLEEP_SECONDS); } } diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/Constants.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/Constants.java index c9fc615714..41051af3e1 100644 --- a/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/Constants.java +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/Constants.java @@ -41,5 +41,5 @@ public final class Constants { public static final String LINE_SEPARATOR = "\n"; - public static final long DEFAULT_SLEEP_SECONDS = 1000; + public static final long DEFAULT_SLEEP_SECONDS = 500; }