Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
龚小红
oto
Commits
5f25bddd
Commit
5f25bddd
authored
Apr 26, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加服务专家的测试用例
parent
53bfac46
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
33 deletions
+42
-33
Activity.java
src/test/java/com/oto/cases/otoseller/Activity.java
+2
-2
CheckTask.java
src/test/java/com/oto/cases/otoseller/CheckTask.java
+39
-30
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+1
-1
No files found.
src/test/java/com/oto/cases/otoseller/Activity.java
View file @
5f25bddd
...
@@ -318,8 +318,8 @@ public class Activity implements Authorization {
...
@@ -318,8 +318,8 @@ public class Activity implements Authorization {
public
void
添加非签到活动和其他见面客户并提报
(){
public
void
添加非签到活动和其他见面客户并提报
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ArrayList
list
=
new
ArrayList
();
ArrayList
list
=
new
ArrayList
();
list
.
add
(
new
SignCustomer
(
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
3
),
"
p
m"
,
226
,
0
));
list
.
add
(
new
SignCustomer
(
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
3
),
"
a
m"
,
226
,
0
));
list
.
add
(
new
SignCustomer
(
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
4
),
"
a
m"
,
17
,
2
));
list
.
add
(
new
SignCustomer
(
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
4
),
"
p
m"
,
17
,
2
));
params
.
put
(
"date"
,
today
);
params
.
put
(
"date"
,
today
);
params
.
put
(
"params"
,
list
);
params
.
put
(
"params"
,
list
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_submitRecord
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_submitRecord
);
...
...
src/test/java/com/oto/cases/otoseller/CheckTask.java
View file @
5f25bddd
...
@@ -582,7 +582,7 @@ public class CheckTask implements Authorization {
...
@@ -582,7 +582,7 @@ public class CheckTask implements Authorization {
@Test
(
description
=
"查看新客户的方案进展模块"
,
priority
=
50
)
@Test
(
description
=
"查看新客户的方案进展模块"
,
priority
=
50
)
public
void
查看新客户的方案进展模块
(){
public
void
查看新客户的方案进展模块
(){
otoExpertAuth
();
otoExpertAuth
();
getTree
(
4
,
null
,
0
,
0
,
null
);
getTree
(
4
,
null
,
0
,
0
,
null
,
null
);
}
}
@Test
(
description
=
"销售上传KYC"
,
priority
=
51
)
@Test
(
description
=
"销售上传KYC"
,
priority
=
51
)
...
@@ -609,15 +609,12 @@ public class CheckTask implements Authorization {
...
@@ -609,15 +609,12 @@ public class CheckTask implements Authorization {
@Test
(
description
=
"查看客户报告进度为总监审批中"
,
priority
=
54
)
@Test
(
description
=
"查看客户报告进度为总监审批中"
,
priority
=
54
)
public
void
查看客户报告进度为总监审批中
(){
public
void
查看客户报告进度为总监审批中
(){
getTree
(
2
,
1
,
0
,
0
,
2
);
getTree
(
2
,
1
,
0
,
0
,
2
,
2
);
}
}
@Test
(
description
=
"登录人查看待审批数量"
,
priority
=
55
)
@Test
(
description
=
"登录人查看待审批数量"
,
priority
=
55
)
public
void
登录人查看待审批数量
(){
public
void
登录人查看待审批数量
(){
otoAreaAuth
();
//区域总待审批为0
otoAreaAuth
();
//区域总待审批为0
getAuditNum
(
0
);
otoLeaderAuth
();
getAuditNum
(
1
);
getAuditNum
(
1
);
}
}
...
@@ -635,7 +632,7 @@ public class CheckTask implements Authorization {
...
@@ -635,7 +632,7 @@ public class CheckTask implements Authorization {
otoLeaderAuth
();
otoLeaderAuth
();
audit
(
0
);
audit
(
0
);
getAuditList
(
3
,
2
,
0
,
0
,
0
);
getAuditList
(
3
,
2
,
0
,
0
,
0
);
getTree
(
2
,
3
,
0
,
0
,
2
);
getTree
(
2
,
3
,
0
,
0
,
2
,
2
);
otoExpertAuth
();
otoExpertAuth
();
getAuditList
(
3
,
2
,
0
,
1
,
0
);
getAuditList
(
3
,
2
,
0
,
1
,
0
);
...
@@ -656,48 +653,57 @@ public class CheckTask implements Authorization {
...
@@ -656,48 +653,57 @@ public class CheckTask implements Authorization {
public
void
总监区域总解决方案通过审批
(){
public
void
总监区域总解决方案通过审批
(){
otoLeaderAuth
();
//总监审批前
otoLeaderAuth
();
//总监审批前
getAuditList
(
1
,
2
,
1
,
0
,
0
);
getAuditList
(
1
,
2
,
1
,
0
,
0
);
getTree
(
2
,
1
,
0
,
0
,
2
);
getTree
(
2
,
1
,
0
,
0
,
2
,
2
);
audit
(
1
);
//总监通过审批后
audit
(
1
);
//总监通过审批后
getAuditList
(
1
,
7
,
0
,
0
,
0
);
getAuditList
(
1
,
7
,
0
,
0
,
0
);
getTree
(
2
,
2
,
0
,
0
,
7
);
getTree
(
2
,
2
,
0
,
0
,
7
,
2
);
sleep
(
1000
);
sleep
(
1000
);
otoAreaAuth
();
//区域总审批前
otoAreaAuth
();
//区域总审批前
getAuditList
(
1
,
7
,
1
,
0
,
0
);
getAuditList
(
1
,
7
,
1
,
0
,
0
);
getTree
(
7
,
1
,
0
,
0
,
7
);
getTree
(
7
,
1
,
0
,
0
,
7
,
2
);
audit
(
1
);
//区域总通过审批后
audit
(
1
);
//区域总通过审批后
getAuditList
(
1
,
9
,
0
,
0
,
0
);
getAuditList
(
1
,
9
,
0
,
0
,
0
);
getTree
(
7
,
2
,
0
,
0
,
9
);
getTree
(
7
,
2
,
0
,
0
,
9
,
2
);
sleep
(
1000
);
sleep
(
1000
);
otoPlanAuth
();
//解决方案审批前
otoPlanAuth
();
//解决方案审批前
getAuditList
(
1
,
9
,
1
,
0
,
0
);
getAuditList
(
1
,
9
,
1
,
0
,
0
);
getTree
(
9
,
1
,
0
,
0
,
9
);
getTree
(
9
,
1
,
0
,
0
,
9
,
2
);
audit
(
1
);
//解决方案通过审批后
audit
(
1
);
//解决方案通过审批后
getAuditList
(
2
,
99
,
0
,
0
,
1
);
getAuditList
(
2
,
99
,
0
,
0
,
1
);
getTree
(
9
,
2
,
0
,
0
,
99
);
getTree
(
9
,
2
,
0
,
0
,
99
,
2
);
}
}
@Test
(
description
=
"解决方案上传客户方案"
,
priority
=
60
)
@Test
(
description
=
"解决方案上传风险评估报告"
,
priority
=
60
)
public
void
解决方案上传风险评估报告
(){
savePlanFile
(
3
);
sleep
(
1000
);
getAuditList
(
4
,
99
,
0
,
0
,
1
);
getTree
(
9
,
2
,
0
,
1
,
99
,
3
);
}
@Test
(
description
=
"解决方案上传客户方案"
,
priority
=
61
)
public
void
解决方案上传客户方案
(){
public
void
解决方案上传客户方案
(){
savePlanFile
(
true
);
savePlanFile
(
2
);
sleep
(
1000
);
sleep
(
1000
);
getAuditList
(
4
,
99
,
0
,
0
,
1
);
getAuditList
(
4
,
99
,
0
,
0
,
1
);
getTree
(
9
,
2
,
0
,
1
,
99
,
2
);
}
}
@Test
(
description
=
"查看kyc和方案上传历史列表"
,
priority
=
6
1
)
@Test
(
description
=
"查看kyc和方案上传历史列表"
,
priority
=
6
2
)
public
void
查看
kyc
和方案上传历史列表
(){
public
void
查看
kyc
和方案上传历史列表
(){
//查看kys上传历史
//查看kys上传历史
getSchemeList
(
1
,
1
);
getSchemeList
(
1
,
1
);
//查看方案上传历史
//查看方案上传历史
getSchemeList
(
2
,
1
);
getSchemeList
(
2
,
2
);
//查看方案讲解历史
//查看方案讲解历史
getSchemeList
(
3
,
0
);
getSchemeList
(
3
,
0
);
}
}
@Test
(
description
=
"查询当前跟进专家姓名"
,
priority
=
6
2
)
@Test
(
description
=
"查询当前跟进专家姓名"
,
priority
=
6
3
)
public
void
查询当前跟进专家姓名
(){
public
void
查询当前跟进专家姓名
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
"自动化"
);
params
.
put
(
"name"
,
"自动化"
);
...
@@ -706,7 +712,7 @@ public class CheckTask implements Authorization {
...
@@ -706,7 +712,7 @@ public class CheckTask implements Authorization {
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_expertName
,
"活动不可签到"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_expertName
,
"活动不可签到"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询团队跟进客户姓名"
,
priority
=
6
3
)
@Test
(
description
=
"查询团队跟进客户姓名"
,
priority
=
6
4
)
public
void
查询团队跟进客户姓名
(){
public
void
查询团队跟进客户姓名
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
"自动化"
);
params
.
put
(
"name"
,
"自动化"
);
...
@@ -763,18 +769,19 @@ public class CheckTask implements Authorization {
...
@@ -763,18 +769,19 @@ public class CheckTask implements Authorization {
}
}
}
}
public
void
savePlanFile
(
boolean
result
){
public
void
savePlanFile
(
int
uploadType
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"uploadType"
,
uploadType
);
if
(
uploadType
==
2
){
params
.
put
(
"planFiles"
,
new
String
[]{
"//yun.dui88.com/kjy/media/file/20230113/20230113145555/1.doc"
,
"//yun.dui88.com/kjy/media/file/20230131/20230131111229/4.ppt"
}
);
params
.
put
(
"planFiles"
,
new
String
[]{
"//yun.dui88.com/kjy/media/file/20230113/20230113145555/1.doc"
,
"//yun.dui88.com/kjy/media/file/20230131/20230131111229/4.ppt"
}
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_scheme_savePlanFile
);
if
(
result
)
{
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertEquals
(
data
,
result
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_savePlanFile
,
"上传方案结果非"
+
result
,
response
.
body
().
asString
()));
}
else
{
}
else
{
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
params
.
put
(
"planFiles"
,
new
String
[]{
"//yun.dui88.com/kjy/media/file/20230426/20230426103441/工作簿3.xlsx"
}
);
Assert
.
assertEquals
(
success
,
result
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_savePlanFile
,
"上传方案结果非"
+
result
,
response
.
body
().
asString
()));
}
}
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_scheme_savePlanFile
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_savePlanFile
,
"上传方案结果失败"
,
response
.
body
().
asString
()));
}
}
public
void
qualifiedKyc
(
int
isQualified
,
boolean
result
){
public
void
qualifiedKyc
(
int
isQualified
,
boolean
result
){
...
@@ -791,18 +798,20 @@ public class CheckTask implements Authorization {
...
@@ -791,18 +798,20 @@ public class CheckTask implements Authorization {
}
}
}
}
public
static
void
getTree
(
int
roleType
,
Object
auditStatus
,
int
planExplainStatus
,
int
planUploadStatus
,
Object
curRoleType
){
public
static
void
getTree
(
int
roleType
,
Object
auditStatus
,
int
planExplainStatus
,
int
planUploadStatus
,
Object
curRoleType
,
Object
uploadType
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"custId"
,
cust_id
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_OA_tree
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_OA_tree
);
Object
curRole
=
response
.
jsonPath
().
getObject
(
"data.curRoleType"
,
Integer
.
class
);
Object
curRole
=
response
.
jsonPath
().
getObject
(
"data.curRoleType"
,
Integer
.
class
);
Object
aStatus
=
response
.
jsonPath
().
getObject
(
"data.list.find{it.roleType == "
+
roleType
+
"}.auditStatus"
,
Integer
.
class
);
Object
aStatus
=
response
.
jsonPath
().
getObject
(
"data.list.find{it.roleType == "
+
roleType
+
"}.auditStatus"
,
Integer
.
class
);
int
upload
Status
=
response
.
jsonPath
().
getInt
(
"data.planUploadStatus"
);
int
plan
Status
=
response
.
jsonPath
().
getInt
(
"data.planUploadStatus"
);
int
explainStatus
=
response
.
jsonPath
().
getInt
(
"data.planExplainStatus"
);
int
explainStatus
=
response
.
jsonPath
().
getInt
(
"data.planExplainStatus"
);
Object
upload
=
response
.
jsonPath
().
getObject
(
"data.uploadType"
,
Integer
.
class
);
Assert
.
assertEquals
(
curRole
,
curRoleType
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"当前审批环节非"
+
curRoleType
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
curRole
,
curRoleType
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"当前审批环节非"
+
curRoleType
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
aStatus
,
auditStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"角色为"
+
roleType
+
"的审批状态非"
+
auditStatus
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
aStatus
,
auditStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"角色为"
+
roleType
+
"的审批状态非"
+
auditStatus
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
uploadStatus
,
planExplainStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"上传方案次数非"
+
planExplainStatus
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
planStatus
,
planExplainStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"上传方案状态非"
+
planExplainStatus
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
explainStatus
,
planUploadStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"讲解方案次数非"
+
planUploadStatus
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
explainStatus
,
planUploadStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"讲解方案状态非"
+
planUploadStatus
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
upload
,
uploadType
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"方案上传类型非"
+
uploadType
,
response
.
body
().
asString
()));
}
}
public
static
void
audit
(
int
audit
){
public
static
void
audit
(
int
audit
){
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
5f25bddd
...
@@ -717,7 +717,7 @@ public class Phone implements Authorization {
...
@@ -717,7 +717,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"方案讲解历史更新"
,
priority
=
67
)
@Test
(
description
=
"方案讲解历史更新"
,
priority
=
67
)
public
void
方案讲解历史更新
(){
public
void
方案讲解历史更新
(){
getTree
(
4
,
null
,
1
,
1
,
99
);
getTree
(
4
,
null
,
1
,
1
,
99
,
2
);
getSchemeList
(
3
,
1
);
getSchemeList
(
3
,
1
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment