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
1fb3a2fd
Commit
1fb3a2fd
authored
Jun 21, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20220620-gxh' into 'master'
增加查看微信权限用例 See merge request
!11
parents
75ca94d6
906df06e
Changes
1
Show 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 @
1fb3a2fd
...
@@ -14,6 +14,7 @@ import java.util.Date;
...
@@ -14,6 +14,7 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
static
com
.
oto
.
config
.
BasicConfig
.
LEADER_ID
;
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
.
BaseUtils
.
ssoLogin
;
import
static
com
.
oto
.
utils
.
ThreadSleepUtils
.
sleep
;
import
static
com
.
oto
.
utils
.
ThreadSleepUtils
.
sleep
;
...
@@ -31,17 +32,22 @@ public class Manager {
...
@@ -31,17 +32,22 @@ public class Manager {
@Test
(
description
=
"分页查看销售列表"
,
priority
=
1
)
@Test
(
description
=
"分页查看销售列表"
,
priority
=
1
)
public
void
分页查看销售列表
(){
public
void
分页查看销售列表
(){
Response
response
=
null
;
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
"1"
);
int
size
=
0
;
int
i
=
1
;
while
(
size
<
1
){
params
.
put
(
"pageIndex"
,
i
);
params
.
put
(
"pageSize"
,
"20"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_sellerList
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_sellerList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
size
=
response
.
jsonPath
().
getInt
(
"data.list.findAll{it.id == "
+
SELLER_ID
+
"}.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_sellerList
,
"销售列表为空"
,
response
.
body
().
asString
()));
i
++;
}
int
workStatus
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.workStatus"
);
int
workStatus
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
SELLER_ID
+
"}.workStatus"
);
int
assignNewCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.assignNewCustPermission"
);
int
assignNewCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
SELLER_ID
+
"}.assignNewCustPermission"
);
int
assignRecycleCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.assignRecycleCustPermission"
);
int
assignRecycleCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
SELLER_ID
+
"}.assignRecycleCustPermission"
);
int
callPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
42
+
"}.callPermission"
);
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
(
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
(
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
(
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