SbloodyS commented on code in PR #16220:
URL: 
https://github.com/apache/dolphinscheduler/pull/16220#discussion_r1654745102


##########
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/SecurityPage.java:
##########
@@ -68,58 +68,58 @@ public SecurityPage(RemoteWebDriver driver) {
 
     public <T extends SecurityPage.Tab> T goToTab(Class<T> tab) {
         if (tab == TenantPage.class) {
-            new WebDriverWait(driver, 
Duration.ofSeconds(60)).until(ExpectedConditions.urlContains("/security"));

Review Comment:
   We should not remove this because some exceptions may occur when jumping to 
this page from other pages.



##########
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowInstanceTab.java:
##########
@@ -86,6 +86,10 @@ public WorkflowInstanceTab deleteAll() {
     public static class Row {
         private final WebElement row;
 
+        public String name() {

Review Comment:
   ```suggestion
           public String workflowName() {
   ```



##########
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/TaskInstanceTab.java:
##########
@@ -35,7 +35,8 @@
 
 @Getter
 public final class TaskInstanceTab extends NavBarPage implements 
ProjectDetailPage.Tab {
-    @FindBy(className = "items-task-instances")
+
+    @FindBy(css = "tbody > .n-data-table-tr")

Review Comment:
   Please avoid too wide css selector. Id or classname is preferred. If not, it 
is recommended to use the xpath selector to specify the scope selection, 
otherwise we may encounter `stale element` exception during the page jumping.



##########
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/TaskInstanceTab.java:
##########
@@ -47,20 +48,32 @@ public List<Row> instances() {
             .stream()
             .filter(WebElement::isDisplayed)
             .map(Row::new)
-            .filter(row -> !row.name().isEmpty())
             .collect(Collectors.toList());
     }
 
     @RequiredArgsConstructor
     public static class Row {
         private final WebElement row;
 
-        public String state() {
-            return 
row.findElement(By.className("task-instance-state")).getText();
+        public String name() {

Review Comment:
   ```suggestion
           public String workflowName() {
   ```



##########
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/SecurityPage.java:
##########
@@ -68,58 +68,58 @@ public SecurityPage(RemoteWebDriver driver) {
 
     public <T extends SecurityPage.Tab> T goToTab(Class<T> tab) {
         if (tab == TenantPage.class) {
-            new WebDriverWait(driver, 
Duration.ofSeconds(60)).until(ExpectedConditions.urlContains("/security"));

Review Comment:
   The first `WebDriverWait` is to make sure you're already on the page before 
you click on it. The second one is to make sure the clicking is finished.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to