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
38aada84
Commit
38aada84
authored
Apr 11, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20220408-gxh' into 'master'
增加权限管理的相关用例 See merge request test-group/kejiji!243
parents
18cd41b0
9e82d6ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
3 deletions
+39
-3
Phone.java
src/test/java/com/kjj/cases/otoseller/Phone.java
+37
-1
Work.java
src/test/java/com/kjj/cases/otoseller/Work.java
+2
-2
No files found.
src/test/java/com/kjj/cases/otoseller/Phone.java
View file @
38aada84
package
com
.
kjj
.
cases
.
otoseller
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.utils.NetworkUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeTest
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
ssoLogin
;
//手机端
public
class
Phone
implements
Authorization
{
private
static
final
NetworkUtils
network
=
NetworkUtils
.
getInstance
();
private
int
sellerId
;
//销售ID
private
String
cust_id
;
@BeforeTest
public
void
setUp
(){
//登录销售工作台手机端
}
@Test
(
description
=
"查看我的客户"
,
priority
=
1
)
public
void
查看我的客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户列表为空"
,
response
.
body
().
asString
()));
cust_id
=
response
.
jsonPath
().
getString
(
"data.list[0].id"
);
}
@Test
(
description
=
"查看我的面访"
,
priority
=
1
)
public
void
查看我的面访
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewList
,
"面访列表为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"不可创建重复手机号的客户"
,
priority
=
1
)
public
void
不可创建重复手机号的客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewList
,
"面访列表为空"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/otoseller/Work.java
View file @
38aada84
...
...
@@ -795,7 +795,7 @@ public class Work implements Authorization {
@Test
(
description
=
"关闭总监的新客户认领权限和回收客户认领权限"
,
priority
=
59
)
public
void
关闭总监的新客户认领权限和回收客户认领权限
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"
sellerI
d"
,
LEADER_ID
);
params
.
put
(
"
i
d"
,
LEADER_ID
);
params
.
put
(
"sellerStatus"
,
1
);
params
.
put
(
"callPermission"
,
1
);
params
.
put
(
"workassignNewCustPermissionStatus"
,
0
);
...
...
@@ -828,7 +828,7 @@ public class Work implements Authorization {
@Test
(
description
=
"开启总监的新客户认领权限和回收客户认领权限"
,
priority
=
62
)
public
void
开启总监的新客户认领权限和回收客户认领权限
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"
sellerI
d"
,
LEADER_ID
);
params
.
put
(
"
i
d"
,
LEADER_ID
);
params
.
put
(
"sellerStatus"
,
1
);
params
.
put
(
"callPermission"
,
1
);
params
.
put
(
"workassignNewCustPermissionStatus"
,
1
);
...
...
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