Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wk1234123
DolphinScheduler
提交
cbb1ee7e
DolphinScheduler
项目概览
wk1234123
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cbb1ee7e
编写于
8月 26, 2020
作者:
B
break60
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://github.com/apache/incubator-dolphinscheduler
into dev
上级
03458234
58880955
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
46 addition
and
22 deletion
+46
-22
.github/workflows/ci_e2e.yml
.github/workflows/ci_e2e.yml
+3
-1
e2e/src/test/java/org/apache/dolphinscheduler/common/BrowserCommon.java
...ava/org/apache/dolphinscheduler/common/BrowserCommon.java
+4
-0
e2e/src/test/java/org/apache/dolphinscheduler/data/project/TimingData.java
.../org/apache/dolphinscheduler/data/project/TimingData.java
+4
-1
e2e/src/test/java/org/apache/dolphinscheduler/locator/project/TimingLocator.java
...pache/dolphinscheduler/locator/project/TimingLocator.java
+9
-3
e2e/src/test/java/org/apache/dolphinscheduler/page/project/TimingPage.java
.../org/apache/dolphinscheduler/page/project/TimingPage.java
+26
-17
未找到文件。
.github/workflows/ci_e2e.yml
浏览文件 @
cbb1ee7e
...
@@ -58,7 +58,9 @@ jobs:
...
@@ -58,7 +58,9 @@ jobs:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get install -f -y
sudo apt-get install -f -y
wget -N https://chromedriver.storage.googleapis.com/85.0.4183.83/chromedriver_linux64.zip
google-chrome -version
googleVersion=`google-chrome -version | awk '{print $3}'`
wget -N https://chromedriver.storage.googleapis.com/${googleVersion}/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv -f chromedriver /usr/local/share/chromedriver
sudo mv -f chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
...
...
e2e/src/test/java/org/apache/dolphinscheduler/common/BrowserCommon.java
浏览文件 @
cbb1ee7e
...
@@ -444,4 +444,8 @@ public class BrowserCommon {
...
@@ -444,4 +444,8 @@ public class BrowserCommon {
public
boolean
ifTextExists
(
By
locator
,
String
text
)
{
public
boolean
ifTextExists
(
By
locator
,
String
text
)
{
return
wait
.
until
(
ExpectedConditions
.
textToBePresentInElementLocated
(
locator
,
text
));
return
wait
.
until
(
ExpectedConditions
.
textToBePresentInElementLocated
(
locator
,
text
));
}
}
public
void
flushPage
()
{
driver
.
navigate
().
refresh
();
}
}
}
e2e/src/test/java/org/apache/dolphinscheduler/data/project/TimingData.java
浏览文件 @
cbb1ee7e
...
@@ -30,6 +30,9 @@ public class TimingData {
...
@@ -30,6 +30,9 @@ public class TimingData {
public
static
final
String
EDIT_Cc
=
"test.edit123qwe@qq.com"
;
public
static
final
String
EDIT_Cc
=
"test.edit123qwe@qq.com"
;
public
static
final
String
WORKFLOW_TITLE
=
"工作流定义 - DolphinScheduler"
;
public
static
final
String
TIMING_OFFLINE_STATE
=
"下线"
;
public
static
final
String
TIMING_ONLINE_STATE
=
"上线"
;
public
static
final
String
TIMING_TITLE
=
"定时任务列表 - DolphinScheduler"
;
public
static
final
String
TIMING_TITLE
=
"定时任务列表 - DolphinScheduler"
;
}
}
e2e/src/test/java/org/apache/dolphinscheduler/locator/project/TimingLocator.java
浏览文件 @
cbb1ee7e
...
@@ -45,17 +45,23 @@ public class TimingLocator {
...
@@ -45,17 +45,23 @@ public class TimingLocator {
public
static
final
By
CLICK_CREATE_BUTTON
=
By
.
xpath
(
"//div[12]/button[2]/span"
);
public
static
final
By
CLICK_CREATE_BUTTON
=
By
.
xpath
(
"//div[12]/button[2]/span"
);
//edit timing
//edit timing
public
static
final
By
TIMING_STATE
=
By
.
xpath
(
"//table/tr[2]/td[9]/span"
);
public
static
final
By
CLICK_TIMING_MANAGEMENT_BUTTON
=
By
.
xpath
(
"//tr[2]/td[10]/button[6]"
);
public
static
final
By
CLICK_TIMING_MANAGEMENT_BUTTON
=
By
.
xpath
(
"//tr[2]/td[10]/button[6]"
);
public
static
final
By
WORKFLOW_NAME
=
By
.
xpath
(
"//table/tr[2]/td[2]/span/a"
);
public
static
final
By
CLICK_EDIT_TIMING_BUTTON
=
By
.
xpath
(
"//tr[2]/td[10]/button[1]/i"
);
public
static
final
By
CLICK_EDIT_TIMING_BUTTON
=
By
.
xpath
(
"//tr[2]/td[10]/button[1]/i"
);
//online timing
//online timing
public
static
final
By
CLICK_ONLINE_TIMING_BUTTON
=
By
.
xpath
(
"//td[10]/button[2]"
);
public
static
final
By
TIMING_MANAGEMENT_TIMING_STATE
=
By
.
xpath
(
"//table/tr[2]/td[7]/span"
);
public
static
final
By
CLICK_ONLINE_TIMING_BUTTON
=
By
.
xpath
(
"//table/tr[2]/td[10]/button[@title['data-original-title']='上线']"
);
//offline timing
//offline timing
public
static
final
By
CLICK_OFFLINE_TIMING_BUTTON
=
By
.
xpath
(
"//
div[2]/div[3]/div/div[2]/div[1]/table/tr[2]/td[10]/button[2
]"
);
public
static
final
By
CLICK_OFFLINE_TIMING_BUTTON
=
By
.
xpath
(
"//
table/tr[2]/td[10]/button[@title['data-original-title']='下线'
]"
);
//delete timing
//delete timing
public
static
final
By
CLICK_DELETE_TIMING_BUTTON
=
By
.
xpath
(
"//
div[2]/div[3]/div/div[2]/div[1]/
table/tr[2]/td[10]/span/button"
);
public
static
final
By
CLICK_DELETE_TIMING_BUTTON
=
By
.
xpath
(
"//table/tr[2]/td[10]/span/button"
);
public
static
final
By
CLICK_CONFIRM_DELETE_TIMING_BUTTON
=
By
.
xpath
(
"//div[2]/div/button[2]/span"
);
public
static
final
By
CLICK_CONFIRM_DELETE_TIMING_BUTTON
=
By
.
xpath
(
"//div[2]/div/button[2]/span"
);
}
}
e2e/src/test/java/org/apache/dolphinscheduler/page/project/TimingPage.java
浏览文件 @
cbb1ee7e
...
@@ -18,8 +18,9 @@ package org.apache.dolphinscheduler.page.project;
...
@@ -18,8 +18,9 @@ package org.apache.dolphinscheduler.page.project;
import
org.apache.dolphinscheduler.common.PageCommon
;
import
org.apache.dolphinscheduler.common.PageCommon
;
import
org.apache.dolphinscheduler.data.project.TimingData
;
import
org.apache.dolphinscheduler.data.project.TimingData
;
import
org.apache.dolphinscheduler.
locator.project.RunWorkflowLocator
;
import
org.apache.dolphinscheduler.
data.project.WorkflowDefineData
;
import
org.apache.dolphinscheduler.locator.project.TimingLocator
;
import
org.apache.dolphinscheduler.locator.project.TimingLocator
;
import
org.apache.dolphinscheduler.locator.project.WorkflowDefineLocator
;
import
org.openqa.selenium.WebDriver
;
import
org.openqa.selenium.WebDriver
;
public
class
TimingPage
extends
PageCommon
{
public
class
TimingPage
extends
PageCommon
{
...
@@ -32,19 +33,19 @@ public class TimingPage extends PageCommon {
...
@@ -32,19 +33,19 @@ public class TimingPage extends PageCommon {
* create timing
* create timing
*/
*/
public
boolean
createTiming
()
throws
InterruptedException
{
public
boolean
createTiming
()
throws
InterruptedException
{
// Determine whether the workflow status is online
ifTextExists
(
WorkflowDefineLocator
.
WORKFLOW_STATE
,
WorkflowDefineData
.
WORKFLOW_ONLINE_STATE
);
// click timing button
// click timing button
System
.
out
.
println
(
"Click timing button"
);
System
.
out
.
println
(
"Click timing button"
);
Thread
.
sleep
(
1000
);
clickButton
(
TimingLocator
.
CLICK_TIMING_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_TIMING_BUTTON
);
System
.
out
.
println
(
"Click execution timing button"
);
System
.
out
.
println
(
"Click execution timing button"
);
clickButton
(
TimingLocator
.
CLICK_EXECUTION_TIMING_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_EXECUTION_TIMING_BUTTON
);
Thread
.
sleep
(
1000
);
clickElement
(
TimingLocator
.
SELECT_FAILURE_STRATEGY_END
);
clickElement
(
TimingLocator
.
SELECT_FAILURE_STRATEGY_END
);
clickElement
(
TimingLocator
.
SELECT_FAILURE_STRATEGY_CONTINUE
);
clickElement
(
TimingLocator
.
SELECT_FAILURE_STRATEGY_CONTINUE
);
clickElement
(
TimingLocator
.
CLICK_NOTICE_STRATEGY
);
clickElement
(
TimingLocator
.
CLICK_NOTICE_STRATEGY
);
clickElement
(
TimingLocator
.
SELECT_NOTICE_STRATEGY
);
clickElement
(
TimingLocator
.
SELECT_NOTICE_STRATEGY
);
Thread
.
sleep
(
500
);
clickElement
(
TimingLocator
.
CLICK_PROCESS_PRIORITY
);
clickElement
(
TimingLocator
.
CLICK_PROCESS_PRIORITY
);
clickElement
(
TimingLocator
.
SELECT_PROCESS_PRIORITY
);
clickElement
(
TimingLocator
.
SELECT_PROCESS_PRIORITY
);
clickElement
(
TimingLocator
.
CLICK_WORKER_GROUP
);
clickElement
(
TimingLocator
.
CLICK_WORKER_GROUP
);
...
@@ -55,7 +56,7 @@ public class TimingPage extends PageCommon {
...
@@ -55,7 +56,7 @@ public class TimingPage extends PageCommon {
sendInput
(
TimingLocator
.
INPUT_Cc
,
TimingData
.
Cc
);
sendInput
(
TimingLocator
.
INPUT_Cc
,
TimingData
.
Cc
);
clickButton
(
TimingLocator
.
CLICK_CREATE_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_CREATE_BUTTON
);
return
ifT
itleContains
(
TimingData
.
WORKFLOW_TITL
E
);
return
ifT
extExists
(
TimingLocator
.
TIMING_STATE
,
TimingData
.
TIMING_OFFLINE_STAT
E
);
}
}
/**
/**
...
@@ -64,20 +65,20 @@ public class TimingPage extends PageCommon {
...
@@ -64,20 +65,20 @@ public class TimingPage extends PageCommon {
public
boolean
editTiming
()
throws
InterruptedException
{
public
boolean
editTiming
()
throws
InterruptedException
{
// click timing button
// click timing button
System
.
out
.
println
(
"Click timing management button"
);
System
.
out
.
println
(
"Click timing management button"
);
Thread
.
sleep
(
1000
);
clickButton
(
TimingLocator
.
CLICK_TIMING_MANAGEMENT_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_TIMING_MANAGEMENT_BUTTON
);
Thread
.
sleep
(
1000
);
// Determine whether the workflow name exists
ifTextExists
(
TimingLocator
.
WORKFLOW_NAME
,
WorkflowDefineData
.
INPUT_WORKFLOW_NAME
);
System
.
out
.
println
(
"Click edit timing button"
);
System
.
out
.
println
(
"Click edit timing button"
);
clickButton
(
TimingLocator
.
CLICK_EDIT_TIMING_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_EDIT_TIMING_BUTTON
);
System
.
out
.
println
(
"Click execution timing button"
);
System
.
out
.
println
(
"Click execution timing button"
);
clickButton
(
TimingLocator
.
CLICK_EXECUTION_TIMING_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_EXECUTION_TIMING_BUTTON
);
Thread
.
sleep
(
1000
);
clickElement
(
TimingLocator
.
SELECT_FAILURE_STRATEGY_END
);
clickElement
(
TimingLocator
.
SELECT_FAILURE_STRATEGY_END
);
clickElement
(
TimingLocator
.
SELECT_FAILURE_STRATEGY_CONTINUE
);
clickElement
(
TimingLocator
.
SELECT_FAILURE_STRATEGY_CONTINUE
);
clickElement
(
TimingLocator
.
CLICK_NOTICE_STRATEGY
);
clickElement
(
TimingLocator
.
CLICK_NOTICE_STRATEGY
);
clickElement
(
TimingLocator
.
SELECT_NOTICE_STRATEGY
);
clickElement
(
TimingLocator
.
SELECT_NOTICE_STRATEGY
);
Thread
.
sleep
(
500
);
clickElement
(
TimingLocator
.
CLICK_PROCESS_PRIORITY
);
clickElement
(
TimingLocator
.
CLICK_PROCESS_PRIORITY
);
clickElement
(
TimingLocator
.
SELECT_PROCESS_PRIORITY
);
clickElement
(
TimingLocator
.
SELECT_PROCESS_PRIORITY
);
clickElement
(
TimingLocator
.
CLICK_WORKER_GROUP
);
clickElement
(
TimingLocator
.
CLICK_WORKER_GROUP
);
...
@@ -96,12 +97,15 @@ public class TimingPage extends PageCommon {
...
@@ -96,12 +97,15 @@ public class TimingPage extends PageCommon {
* online timing
* online timing
*/
*/
public
boolean
onlineTiming
()
throws
InterruptedException
{
public
boolean
onlineTiming
()
throws
InterruptedException
{
flushPage
();
// Determine whether the timing is offline
ifTextExists
(
TimingLocator
.
TIMING_MANAGEMENT_TIMING_STATE
,
TimingData
.
TIMING_OFFLINE_STATE
);
// click online timing button
// click online timing button
System
.
out
.
println
(
"Click online timing button"
);
System
.
out
.
println
(
"Click online timing button"
);
Thread
.
sleep
(
500
);
clickElement
(
TimingLocator
.
CLICK_ONLINE_TIMING_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_ONLINE_TIMING_BUTTON
);
return
ifT
itleContains
(
TimingData
.
TIMING_TITLE
);
return
ifT
extExists
(
TimingLocator
.
TIMING_MANAGEMENT_TIMING_STATE
,
TimingData
.
TIMING_ONLINE_STATE
);
}
}
...
@@ -109,12 +113,15 @@ public class TimingPage extends PageCommon {
...
@@ -109,12 +113,15 @@ public class TimingPage extends PageCommon {
* offline timing
* offline timing
*/
*/
public
boolean
offlineTiming
()
throws
InterruptedException
{
public
boolean
offlineTiming
()
throws
InterruptedException
{
flushPage
();
// Determine whether the timing is online
ifTextExists
(
TimingLocator
.
TIMING_MANAGEMENT_TIMING_STATE
,
TimingData
.
TIMING_ONLINE_STATE
);
// click offline timing button
// click offline timing button
System
.
out
.
println
(
"Click offline timing button"
);
System
.
out
.
println
(
"Click offline timing button"
);
Thread
.
sleep
(
500
);
clickElement
(
TimingLocator
.
CLICK_OFFLINE_TIMING_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_OFFLINE_TIMING_BUTTON
);
return
ifT
itleContains
(
TimingData
.
TIMING_TITLE
);
return
ifT
extExists
(
TimingLocator
.
TIMING_MANAGEMENT_TIMING_STATE
,
TimingData
.
TIMING_OFFLINE_STATE
);
}
}
...
@@ -123,12 +130,14 @@ public class TimingPage extends PageCommon {
...
@@ -123,12 +130,14 @@ public class TimingPage extends PageCommon {
* delete timing
* delete timing
*/
*/
public
boolean
deleteTiming
()
throws
InterruptedException
{
public
boolean
deleteTiming
()
throws
InterruptedException
{
// Determine whether the timing is offline
ifTextExists
(
TimingLocator
.
TIMING_MANAGEMENT_TIMING_STATE
,
TimingData
.
TIMING_OFFLINE_STATE
);
// click offline timing button
// click offline timing button
System
.
out
.
println
(
"Click delete timing button"
);
System
.
out
.
println
(
"Click delete timing button"
);
Thread
.
sleep
(
500
);
clickButton
(
TimingLocator
.
CLICK_DELETE_TIMING_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_DELETE_TIMING_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_CONFIRM_DELETE_TIMING_BUTTON
);
clickButton
(
TimingLocator
.
CLICK_CONFIRM_DELETE_TIMING_BUTTON
);
return
ifT
itleContains
(
TimingData
.
WORKFLOW_TITLE
);
return
ifT
extExists
(
TimingLocator
.
TIMING_STATE
,
"-"
);
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录