[E2E] Fix flaky udf manage e2e test (#8232)

* fix_file_manage_e2e_error

* fix error

* fix error

* fix error
This commit is contained in:
xiangzihao 2022-01-28 11:49:55 +08:00 committed by GitHub
parent f3d663a7ea
commit 6094927dda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -37,8 +37,11 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.io.File;
import java.io.FileOutputStream;
@ -109,7 +112,8 @@ public class UdfManageE2ETest {
void testCreateDirectory() {
final UdfManagePage page = new UdfManagePage(browser);
browser.navigate().refresh();
new WebDriverWait(page.driver(), 10)
.until(ExpectedConditions.urlContains("/#/resource/udf"));
page.createDirectory(testDirectoryName, "test_desc");
@ -164,6 +168,8 @@ public class UdfManageE2ETest {
page.uploadFile(testUploadUdfFilePath.toFile().getAbsolutePath());
new WebDriverWait(browser, 10).until(ExpectedConditions.invisibilityOfElementLocated(By.id("fileUpdateDialog")));
await().untilAsserted(() -> {
assertThat(page.udfList())
.as("File list should contain newly-created file")