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
75ca94d6
Commit
75ca94d6
authored
Jun 20, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20220620-gxh' into 'master'
增加查看微信权限用例 See merge request
!10
parents
0ce1f9f1
42f95b99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+12
-1
NetworkUtils.java
src/test/java/com/oto/utils/NetworkUtils.java
+1
-1
No files found.
src/test/java/com/oto/cases/otoseller/Work.java
View file @
75ca94d6
...
...
@@ -649,6 +649,7 @@ public class Work implements Authorization {
params
.
put
(
"callPermission"
,
1
);
params
.
put
(
"assignNewCustPermission"
,
0
);
params
.
put
(
"assignRecycleCustPermission"
,
0
);
params
.
put
(
"lookCustPhonePermission"
,
0
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updatePermission
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
BasicConfig
.
MANAGER_oto_updatePermission
,
"关闭总监的新客户认领权限和回收客户认领权限失败"
,
response
.
body
().
asString
()));
...
...
@@ -661,7 +662,16 @@ public class Work implements Authorization {
params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_freshList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertFalse
(
success
,
network
.
message
(
BasicConfig
.
WORK_logout
,
"无新客户认领权限可查看新客户列表"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
BasicConfig
.
WORK_freshList
,
"无新客户认领权限可查看新客户列表"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"无查看微信权限不可查看客户号码"
,
priority
=
60
)
public
void
无查看微信权限不可查看客户号码
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_phone
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertFalse
(
success
,
network
.
message
(
BasicConfig
.
WORK_phone
,
"无查看微信权限可查看客户号码"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"无回收客户认领权限不可查看回收客户列表"
,
priority
=
61
)
...
...
@@ -682,6 +692,7 @@ public class Work implements Authorization {
params
.
put
(
"callPermission"
,
1
);
params
.
put
(
"assignNewCustPermission"
,
1
);
params
.
put
(
"assignRecycleCustPermission"
,
1
);
params
.
put
(
"lookCustPhonePermission"
,
1
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updatePermission
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
BasicConfig
.
MANAGER_oto_updatePermission
,
"开启总监的新客户认领权限和回收客户认领权限失败"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/oto/utils/NetworkUtils.java
View file @
75ca94d6
...
...
@@ -27,7 +27,7 @@ public class NetworkUtils {
//cookies中的tku
agentCookies
.
put
(
"tku"
,
AGENT_TKU
);
//多场景测试标志
// agentCookies.put("_duibaServiceGroupKey","miria-
265
2");
// agentCookies.put("_duibaServiceGroupKey","miria-
313
2");
//json类型的headers
agentHeaders
.
put
(
"Content-Type"
,
"application/json"
);
//二进制文件的headers
...
...
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