njnu-seafish commented on code in PR #17907:
URL: 
https://github.com/apache/dolphinscheduler/pull/17907#discussion_r2881476211


##########
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/TokenPage.java:
##########
@@ -161,4 +162,27 @@ public class TokenForm {
         private WebElement buttonCancel;
 
     }
+
+    private void setExpireTime(int daysAfter) {
+        try {
+            WebElement datePickerInput = 
driver.findElement(By.cssSelector(".n-date-picker input"));
+
+            LocalDateTime futureDate = LocalDateTime.now().plusDays(daysAfter);
+            DateTimeFormatter formatter = 
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+            String futureDateStr = futureDate.format(formatter);
+
+            datePickerInput.clear();
+            datePickerInput.sendKeys(futureDateStr.substring(0, 10));

Review Comment:
   > It's better not to use truncated strings to get dates.
   
   ok



-- 
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