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
906df06e
Commit
906df06e
authored
Jun 21, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加查看微信权限用例
parent
42f95b99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+16
-10
No files found.
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
906df06e
...
...
@@ -14,6 +14,7 @@ import java.util.Date;
import
java.util.HashMap
;
import
static
com
.
oto
.
config
.
BasicConfig
.
LEADER_ID
;
import
static
com
.
oto
.
config
.
BasicConfig
.
SELLER_ID
;
import
static
com
.
oto
.
utils
.
BaseUtils
.
ssoLogin
;
import
static
com
.
oto
.
utils
.
ThreadSleepUtils
.
sleep
;
...
...
@@ -31,17 +32,22 @@ public class Manager {
@Test
(
description
=
"分页查看销售列表"
,
priority
=
1
)
public
void
分页查看销售列表
(){
Response
response
=
null
;
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
"1"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_sellerList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_sellerList
,
"销售列表为空"
,
response
.
body
().
asString
()));
int
workStatus
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.workStatus"
);
int
assignNewCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.assignNewCustPermission"
);
int
assignRecycleCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.assignRecycleCustPermission"
);
int
callPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.callPermission"
);
int
size
=
0
;
int
i
=
1
;
while
(
size
<
1
){
params
.
put
(
"pageIndex"
,
i
);
params
.
put
(
"pageSize"
,
"20"
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_sellerList
);
size
=
response
.
jsonPath
().
getInt
(
"data.list.findAll{it.id == "
+
SELLER_ID
+
"}.size()"
);
i
++;
}
int
workStatus
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
SELLER_ID
+
"}.workStatus"
);
int
assignNewCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
SELLER_ID
+
"}.assignNewCustPermission"
);
int
assignRecycleCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
SELLER_ID
+
"}.assignRecycleCustPermission"
);
int
callPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
SELLER_ID
+
"}.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
()));
...
...
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