|
|
@ -18,7 +18,9 @@ package org.apache.dolphinscheduler.page.project; |
|
|
|
|
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.common.PageCommon; |
|
|
|
import org.apache.dolphinscheduler.common.PageCommon; |
|
|
|
import org.apache.dolphinscheduler.constant.TestConstant; |
|
|
|
import org.apache.dolphinscheduler.constant.TestConstant; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.data.project.ProjectData; |
|
|
|
import org.apache.dolphinscheduler.data.project.WorkflowDefineData; |
|
|
|
import org.apache.dolphinscheduler.data.project.WorkflowDefineData; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.locator.project.ProjectLocator; |
|
|
|
import org.apache.dolphinscheduler.locator.project.WorkflowDefineLocator; |
|
|
|
import org.apache.dolphinscheduler.locator.project.WorkflowDefineLocator; |
|
|
|
import org.openqa.selenium.WebDriver; |
|
|
|
import org.openqa.selenium.WebDriver; |
|
|
|
|
|
|
|
|
|
|
@ -32,9 +34,12 @@ public class WorkflowDefinePage extends PageCommon { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
public boolean jumpWorkflowPage() throws InterruptedException { |
|
|
|
public boolean jumpWorkflowPage() throws InterruptedException { |
|
|
|
|
|
|
|
ifTextExists(ProjectLocator.LIST_PROJECT_NAME, ProjectData.PROJECT_NAME); |
|
|
|
|
|
|
|
|
|
|
|
// click project name
|
|
|
|
// click project name
|
|
|
|
clickElement(WorkflowDefineLocator.CLICK_PROJECT_NAME); |
|
|
|
clickElement(WorkflowDefineLocator.CLICK_PROJECT_NAME); |
|
|
|
Thread.sleep(TestConstant.ONE_THOUSAND); |
|
|
|
|
|
|
|
|
|
|
|
ifTextExists(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE,WorkflowDefineData.workflow_define); |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("Click on workflow define to jump to workflow define page"); |
|
|
|
System.out.println("Click on workflow define to jump to workflow define page"); |
|
|
|
// click workflow define
|
|
|
|
// click workflow define
|
|
|
@ -126,7 +131,6 @@ public class WorkflowDefinePage extends PageCommon { |
|
|
|
|
|
|
|
|
|
|
|
//click submit button
|
|
|
|
//click submit button
|
|
|
|
clickElement(WorkflowDefineLocator.CLICK_SUBMIT_BUTTON); |
|
|
|
clickElement(WorkflowDefineLocator.CLICK_SUBMIT_BUTTON); |
|
|
|
Thread.sleep(TestConstant.ONE_THOUSAND); |
|
|
|
|
|
|
|
System.out.println("Task node set up successfully"); |
|
|
|
System.out.println("Task node set up successfully"); |
|
|
|
System.out.println("move to Dag Element "); |
|
|
|
System.out.println("move to Dag Element "); |
|
|
|
moveToDragElement(WorkflowDefineLocator.MOUSE_MOVE_SHELL_AT_DAG,-300,-100); |
|
|
|
moveToDragElement(WorkflowDefineLocator.MOUSE_MOVE_SHELL_AT_DAG,-300,-100); |
|
|
@ -185,7 +189,6 @@ public class WorkflowDefinePage extends PageCommon { |
|
|
|
|
|
|
|
|
|
|
|
//delete workflow global parameters value
|
|
|
|
//delete workflow global parameters value
|
|
|
|
clickElement(WorkflowDefineLocator.CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS); |
|
|
|
clickElement(WorkflowDefineLocator.CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS); |
|
|
|
Thread.sleep(TestConstant.ONE_THOUSAND); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//click add button
|
|
|
|
//click add button
|
|
|
|
System.out.println("submit workflow"); |
|
|
|
System.out.println("submit workflow"); |
|
|
@ -197,6 +200,9 @@ public class WorkflowDefinePage extends PageCommon { |
|
|
|
public boolean onlineWorkflow() throws InterruptedException { |
|
|
|
public boolean onlineWorkflow() throws InterruptedException { |
|
|
|
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
|
|
|
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Determine whether the workflow status is offline
|
|
|
|
|
|
|
|
ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE,WorkflowDefineData.WORKFLOW_OFFLINE_STATE); |
|
|
|
|
|
|
|
|
|
|
|
// click online button
|
|
|
|
// click online button
|
|
|
|
System.out.println("Click online workflow button"); |
|
|
|
System.out.println("Click online workflow button"); |
|
|
|
clickButton(WorkflowDefineLocator.CLICK_ONLINE_WORKFLOW_BUTTON); |
|
|
|
clickButton(WorkflowDefineLocator.CLICK_ONLINE_WORKFLOW_BUTTON); |
|
|
@ -207,9 +213,11 @@ public class WorkflowDefinePage extends PageCommon { |
|
|
|
public boolean offlineWorkflow() throws InterruptedException { |
|
|
|
public boolean offlineWorkflow() throws InterruptedException { |
|
|
|
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
|
|
|
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Determine whether the workflow status is online
|
|
|
|
|
|
|
|
ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE,WorkflowDefineData.WORKFLOW_ONLINE_STATE); |
|
|
|
|
|
|
|
|
|
|
|
// click offline button
|
|
|
|
// click offline button
|
|
|
|
System.out.println("offline workflow"); |
|
|
|
System.out.println("offline workflow"); |
|
|
|
Thread.sleep(500); |
|
|
|
|
|
|
|
clickButton(WorkflowDefineLocator.CLICK_OFFLINE_WORKFLOW_BUTTON); |
|
|
|
clickButton(WorkflowDefineLocator.CLICK_OFFLINE_WORKFLOW_BUTTON); |
|
|
|
|
|
|
|
|
|
|
|
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE); |
|
|
|
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE); |
|
|
@ -218,8 +226,11 @@ public class WorkflowDefinePage extends PageCommon { |
|
|
|
|
|
|
|
|
|
|
|
public boolean deleteWorkflow() throws InterruptedException { |
|
|
|
public boolean deleteWorkflow() throws InterruptedException { |
|
|
|
//click delete workflow
|
|
|
|
//click delete workflow
|
|
|
|
Thread.sleep(500); |
|
|
|
|
|
|
|
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
|
|
|
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Determine whether the workflow status is offline
|
|
|
|
|
|
|
|
ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE,WorkflowDefineData.WORKFLOW_OFFLINE_STATE); |
|
|
|
|
|
|
|
|
|
|
|
clickButton(WorkflowDefineLocator.DELETE_WORKFLOW_BOTTOM); |
|
|
|
clickButton(WorkflowDefineLocator.DELETE_WORKFLOW_BOTTOM); |
|
|
|
|
|
|
|
|
|
|
|
//click confirm delete project
|
|
|
|
//click confirm delete project
|
|
|
|