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
bcd122eb
Commit
bcd122eb
authored
Jan 13, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/seller_plan' into 'master'
增加上传KYC、上传方案、调整策略顺序的测试用例 See merge request
!61
parents
34e91084
e9facffa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
3 deletions
+56
-3
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+53
-3
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+3
-0
No files found.
src/test/java/com/oto/cases/otoseller/Work.java
View file @
bcd122eb
...
@@ -1668,7 +1668,7 @@ public class Work implements Authorization {
...
@@ -1668,7 +1668,7 @@ public class Work implements Authorization {
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_strategy_onAbleList
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_strategy_onAbleList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
String
strategyName
=
response
.
jsonPath
().
getString
(
"data[0].strategyName"
);
String
strategyName
=
response
.
jsonPath
().
getString
(
"data[0].strategyName"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
BasicConfig
.
WORK_strategy_searchParentSeller
,
"总监可看策略数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
WORK_strategy_searchParentSeller
,
"总监可看策略数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
strategyName
,
"自动化盘点策略"
,
network
.
message
(
BasicConfig
.
WORK_strategy_searchParentSeller
,
"总监可看策略名称错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
strategyName
,
"自动化盘点策略"
,
network
.
message
(
BasicConfig
.
WORK_strategy_searchParentSeller
,
"总监可看策略名称错误"
,
response
.
body
().
asString
()));
}
}
...
@@ -1712,11 +1712,11 @@ public class Work implements Authorization {
...
@@ -1712,11 +1712,11 @@ public class Work implements Authorization {
otoLeaderAuth
();
otoLeaderAuth
();
response
=
network
.
getResponse
(
BasicConfig
.
WORK_strategy_onAbleList
);
response
=
network
.
getResponse
(
BasicConfig
.
WORK_strategy_onAbleList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
BasicConfig
.
WORK_strategy_searchParentSeller
,
"总监可看策略数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
BasicConfig
.
WORK_strategy_searchParentSeller
,
"总监可看策略数量错误"
,
response
.
body
().
asString
()));
otoManagerAuth
();
otoManagerAuth
();
HashMap
<
String
,
Object
>
params1
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params1
=
new
HashMap
<>();
params1
.
put
(
"strategyName"
,
"自动化盘点策略"
);
params1
.
put
(
"strategyName"
,
"自动化盘点
可用
策略"
);
params1
.
put
(
"pageIndex"
,
"1"
);
params1
.
put
(
"pageIndex"
,
"1"
);
params1
.
put
(
"pageSize"
,
50
);
params1
.
put
(
"pageSize"
,
50
);
response
=
network
.
getResponse
(
params1
,
BasicConfig
.
WORK_strategy_list
);
response
=
network
.
getResponse
(
params1
,
BasicConfig
.
WORK_strategy_list
);
...
@@ -1946,6 +1946,56 @@ public class Work implements Authorization {
...
@@ -1946,6 +1946,56 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
id
!=
tagId
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_tagList
,
"标签删除后依旧显示"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
id
!=
tagId
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_tagList
,
"标签删除后依旧显示"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"上传KYC"
,
priority
=
146
)
public
void
上传
KYC
(){
otoManagerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"kycImages"
,
new
String
[]{
"//yun.dui88.com/kjy/image/20230113/523669708b5043f5bb4641252e125cb5.jpg"
,
"//yun.dui88.com/kjy/image/20230113/edd2e950a8aa4fb2a15ae7400b768fed.jpg"
});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_kycUpload
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_kycUpload
,
"上传KYC失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"上传客户方案"
,
priority
=
147
)
public
void
上传客户方案
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"planFile"
,
"//yun.dui88.com/kjy/media/file/20230113/20230113145555/1.doc"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_planFileUpload
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_planFileUpload
,
"上传客户方案失败"
,
response
.
body
().
asString
()));
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"type"
,
2
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
int
kycImages
=
response
.
jsonPath
().
getInt
(
"data.kycImages.size()"
);
String
planFile
=
response
.
jsonPath
().
getString
(
"data.planFile"
);
Assert
.
assertEquals
(
kycImages
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"上传KYC为空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
planFile
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"上传客户方案为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"移动策略"
,
priority
=
148
)
public
void
移动策略
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
strategyId
);
params
.
put
(
"strategyMove"
,
"down"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_strategyMove
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_strategyMove
,
"上传KYC失败"
,
response
.
body
().
asString
()));
otoLeaderAuth
();
response
=
network
.
getResponse
(
BasicConfig
.
WORK_strategy_onAbleList
);
String
strategyName
=
response
.
jsonPath
().
getString
(
"data[1].strategyName"
);
Assert
.
assertEquals
(
strategyName
,
"自动化盘点策略"
,
network
.
message
(
BasicConfig
.
WORK_strategy_searchParentSeller
,
"总监可看策略名称错误"
,
response
.
body
().
asString
()));
otoManagerAuth
();
params
.
put
(
"strategyMove"
,
"up"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_strategyMove
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_strategyMove
,
"上传KYC失败"
,
response
.
body
().
asString
()));
}
//修改客户的约面情况
//修改客户的约面情况
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
...
...
src/test/java/com/oto/config/BasicConfig.java
View file @
bcd122eb
...
@@ -238,6 +238,9 @@ public class BasicConfig {
...
@@ -238,6 +238,9 @@ public class BasicConfig {
public
static
final
String
WORK_strategy_list
=
WORK_HOST
+
"/kjy/oto/check/strategy/list"
;
public
static
final
String
WORK_strategy_list
=
WORK_HOST
+
"/kjy/oto/check/strategy/list"
;
public
static
final
String
WORK_strategy_onAbleList
=
WORK_HOST
+
"/kjy/oto/check/strategy/onAble/list"
;
public
static
final
String
WORK_strategy_onAbleList
=
WORK_HOST
+
"/kjy/oto/check/strategy/onAble/list"
;
public
static
final
String
WORK_strategy_updateStatus
=
WORK_HOST
+
"/kjy/oto/check/strategy/status/update"
;
public
static
final
String
WORK_strategy_updateStatus
=
WORK_HOST
+
"/kjy/oto/check/strategy/status/update"
;
public
static
final
String
WORK_planFileUpload
=
WORK_HOST
+
"/kjy/oto/manager/customer/planFile/update"
;
public
static
final
String
WORK_kycUpload
=
WORK_HOST
+
"/kjy/oto/manager/customer/kyc/update"
;
public
static
final
String
WORK_strategyMove
=
WORK_HOST
+
"/kjy/oto/check/strategy/sort/move"
;
//*************************客集集营销平台******************************
//*************************客集集营销平台******************************
public
static
final
String
PHONE_bindWxUser
=
HOST
+
"/kjy/oto/interview/bindWxUser"
;
public
static
final
String
PHONE_bindWxUser
=
HOST
+
"/kjy/oto/interview/bindWxUser"
;
...
...
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