njnu-seafish commented on code in PR #17907:
URL:
https://github.com/apache/dolphinscheduler/pull/17907#discussion_r2881475717
##########
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));
+
+ Thread.sleep(100);
+ WebElement timeInput =
driver.findElement(By.cssSelector(".n-time-picker input"));
+ timeInput.clear();
+ timeInput.sendKeys(futureDateStr.substring(11));
+ timeInput.sendKeys(Keys.ENTER);
+
+ Thread.sleep(100);
Review Comment:
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]