Browse Source

[Feature-9021][E2E] Recover sub_process e2e test in ui-next (#9023)

3.0.0/version-upgrade
xiangzihao 3 years ago committed by GitHub
parent
commit
82394ba81d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 100
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/WorkflowE2ETest.java
  2. 12
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowDefinitionTab.java
  3. 2
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/task/SubWorkflowTaskForm.java

100
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/WorkflowE2ETest.java

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

12
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowDefinitionTab.java

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

2
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/task/SubWorkflowTaskForm.java

@ -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…
Cancel
Save