You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/02/09 09:11:46 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a change in pull request #8180: [E2E] add switch task case

caishunfeng commented on a change in pull request #8180:
URL: https://github.com/apache/dolphinscheduler/pull/8180#discussion_r802426451



##########
File path: dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowForm.java
##########
@@ -60,26 +70,50 @@ public WorkflowForm(WebDriver driver) {
 
         final JavascriptExecutor js = (JavascriptExecutor) driver;
         final String dragAndDrop = String.join("\n",
-            Resources.readLines(Resources.getResource("dragAndDrop.js"), StandardCharsets.UTF_8));
+                Resources.readLines(Resources.getResource("dragAndDrop.js"), StandardCharsets.UTF_8));
         js.executeScript(dragAndDrop, task, canvas);
 
         switch (type) {
             case SHELL:
                 return (T) new ShellTaskForm(this);
             case SUB_PROCESS:
                 return (T) new SubWorkflowTaskForm(this);
+            case SWITCH:
+                return (T) new SwitchTaskForm(this);
         }
         throw new UnsupportedOperationException("Unknown task type");
     }
 
+    public WebElement getTask(String taskName) {
+        List<WebElement> tasks = new WebDriverWait(driver, 10)
+                .until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.cssSelector("svg > g > g[class^='x6-graph-svg-stage'] > g[data-shape^='dag-task']")));

Review comment:
       I asked @songjianet, the task svg node id is randomly generated, and class selector is like css selector I used, so maybe we can use it first, and then optimize it later if need.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org