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
63d06560
Commit
63d06560
authored
Apr 08, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加权限管理的相关用例
parent
4011d4fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
21 deletions
+3
-21
Manager.java
src/test/java/com/kjj/cases/otoseller/Manager.java
+3
-3
Work.java
src/test/java/com/kjj/cases/otoseller/Work.java
+0
-18
No files found.
src/test/java/com/kjj/cases/otoseller/Manager.java
View file @
63d06560
...
...
@@ -35,9 +35,9 @@ public class Manager {
int
assignRecycleCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.assignRecycleCustPermission"
);
int
callPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.callPermission"
);
Assert
.
assertEquals
(
workStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_searchSeller
,
"工作状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
assignNewCustPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_searchSeller
,
"
工作状态
错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
assignRecycleCustPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_searchSeller
,
"
工作状态
错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
callPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_searchSeller
,
"
工作状态
错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
assignNewCustPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_searchSeller
,
"
认领新客户及强制分配权限
错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
assignRecycleCustPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_searchSeller
,
"
认领回收客户权限
错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
callPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_searchSeller
,
"
呼叫权限
错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"通过销售名称查找销售"
,
priority
=
2
)
...
...
src/test/java/com/kjj/cases/otoseller/Work.java
View file @
63d06560
...
...
@@ -838,24 +838,6 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
BasicConfig
.
MANAGER_oto_updatePermission
,
"开启总监的新客户认领权限和回收客户认领权限失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"销售间客户动态取消隔离"
,
priority
=
63
)
public
void
销售间客户动态取消隔离
(){
//将客户重新分配给总监
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"customerId"
,
custId
);
params
.
put
(
"sellerId"
,
LEADER_ID
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
MANAGER_oto_assignSeller
,
"重新分配失败"
,
response
.
body
().
asString
()));
//总监查看客户动态
params
.
clear
();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"logDays"
,
1
);
Response
logRes
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_operation
);
int
logSize
=
logRes
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
logSize
>
0
,
network
.
message
(
BasicConfig
.
WORK_operation
,
"客户动态隔离失败"
,
logRes
.
body
().
asString
()));
}
@Test
(
description
=
"删除客户"
,
priority
=
79
)
public
void
删除客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
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