mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-02 12:17:43 +08:00
[Feature-9021][E2E] Recover sub_process e2e test in ui-next (#9023)
This commit is contained in:
parent
fd5e79bd80
commit
82394ba81d
@ -80,24 +80,24 @@ class WorkflowE2ETest {
|
||||
;
|
||||
}
|
||||
|
||||
// @AfterAll
|
||||
// public static void cleanup() {
|
||||
// new NavBarPage(browser)
|
||||
// .goToNav(ProjectPage.class)
|
||||
// .goTo(project)
|
||||
// .goToTab(WorkflowDefinitionTab.class)
|
||||
// .cancelPublishAll()
|
||||
// .deleteAll()
|
||||
// ;
|
||||
//
|
||||
// new NavBarPage(browser)
|
||||
// .goToNav(ProjectPage.class)
|
||||
// .delete(project)
|
||||
// .goToNav(SecurityPage.class)
|
||||
// .goToTab(TenantPage.class)
|
||||
// .delete(tenant)
|
||||
// ;
|
||||
// }
|
||||
@AfterAll
|
||||
public static void cleanup() {
|
||||
new NavBarPage(browser)
|
||||
.goToNav(ProjectPage.class)
|
||||
.goTo(project)
|
||||
.goToTab(WorkflowDefinitionTab.class)
|
||||
.cancelPublishAll()
|
||||
.deleteAll()
|
||||
;
|
||||
|
||||
new NavBarPage(browser)
|
||||
.goToNav(ProjectPage.class)
|
||||
.delete(project)
|
||||
.goToNav(SecurityPage.class)
|
||||
.goToTab(TenantPage.class)
|
||||
.delete(tenant)
|
||||
;
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(1)
|
||||
@ -134,38 +134,38 @@ class WorkflowE2ETest {
|
||||
workflowDefinitionPage.publish(workflow);
|
||||
}
|
||||
|
||||
// @Test
|
||||
// @Order(10)
|
||||
// void testCreateSubWorkflow() {
|
||||
// final String workflow = "test-sub-workflow-1";
|
||||
//
|
||||
// WorkflowDefinitionTab workflowDefinitionPage =
|
||||
// new ProjectPage(browser)
|
||||
// .goToNav(ProjectPage.class)
|
||||
// .goTo(project)
|
||||
// .goToTab(WorkflowDefinitionTab.class);
|
||||
//
|
||||
// workflowDefinitionPage
|
||||
// .createWorkflow()
|
||||
//
|
||||
// .<SubWorkflowTaskForm> addTask(TaskType.SUB_PROCESS)
|
||||
// .childNode("test-workflow-1")
|
||||
// .name("test-sub-1")
|
||||
// .submit()
|
||||
//
|
||||
// .submit()
|
||||
// .name(workflow)
|
||||
// .tenant(tenant)
|
||||
// .addGlobalParam("global_param", "hello world")
|
||||
// .submit()
|
||||
// ;
|
||||
//
|
||||
// await().untilAsserted(() -> assertThat(
|
||||
// workflowDefinitionPage.workflowList()
|
||||
// ).anyMatch(it -> it.getText().contains(workflow)));
|
||||
//
|
||||
// workflowDefinitionPage.publish(workflow);
|
||||
// }
|
||||
@Test
|
||||
@Order(10)
|
||||
void testCreateSubWorkflow() {
|
||||
final String workflow = "test-sub-workflow-1";
|
||||
|
||||
WorkflowDefinitionTab workflowDefinitionPage =
|
||||
new ProjectPage(browser)
|
||||
.goToNav(ProjectPage.class)
|
||||
.goTo(project)
|
||||
.goToTab(WorkflowDefinitionTab.class);
|
||||
|
||||
workflowDefinitionPage
|
||||
.createWorkflow()
|
||||
|
||||
.<SubWorkflowTaskForm> addTask(TaskType.SUB_PROCESS)
|
||||
.childNode("test-workflow-1")
|
||||
.name("test-sub-1")
|
||||
.submit()
|
||||
|
||||
.submit()
|
||||
.name(workflow)
|
||||
.tenant(tenant)
|
||||
.addGlobalParam("global_param", "hello world")
|
||||
.submit()
|
||||
;
|
||||
|
||||
await().untilAsserted(() -> assertThat(
|
||||
workflowDefinitionPage.workflowList()
|
||||
).anyMatch(it -> it.getText().contains(workflow)));
|
||||
|
||||
workflowDefinitionPage.publish(workflow);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(30)
|
||||
|
@ -38,10 +38,17 @@ public final class WorkflowDefinitionTab extends NavBarPage implements ProjectDe
|
||||
@FindBy(className = "btn-create-process")
|
||||
private WebElement buttonCreateProcess;
|
||||
|
||||
@FindBy(className = "select-all")
|
||||
@FindBys({
|
||||
@FindBy(className = "btn-selected"),
|
||||
@FindBy(className = "n-checkbox"),
|
||||
})
|
||||
private WebElement checkBoxSelectAll;
|
||||
|
||||
@FindBy(className = "btn-delete-all")
|
||||
@FindBys({
|
||||
@FindBy(className = "btn-delete-all"),
|
||||
@FindBy(className = "n-button__content"),
|
||||
@FindBy(tagName = "span")
|
||||
})
|
||||
private WebElement buttonDeleteAll;
|
||||
|
||||
@FindBys({
|
||||
@ -98,7 +105,6 @@ public final class WorkflowDefinitionTab extends NavBarPage implements ProjectDe
|
||||
|
||||
for (WebElement cancelButton : cancelButtons) {
|
||||
cancelButton.click();
|
||||
driver().navigate().refresh();
|
||||
}
|
||||
|
||||
return this;
|
||||
|
@ -55,7 +55,7 @@ public final class SubWorkflowTaskForm extends TaskNodeForm {
|
||||
public SubWorkflowTaskForm childNode(String node) {
|
||||
btnSelectChildNodeDropdown().click();
|
||||
|
||||
new WebDriverWait(driver, 5).until(ExpectedConditions.visibilityOfElementLocated(new By.ByClassName(
|
||||
new WebDriverWait(driver, 5).until(ExpectedConditions.visibilityOfElementLocated(By.className(
|
||||
"n-base-select-option__content")));
|
||||
|
||||
selectChildNode()
|
||||
|
Loading…
Reference in New Issue
Block a user