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
7ee0dad7
Commit
7ee0dad7
authored
Mar 12, 2021
by
张震
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改boss看板逻辑
parent
3fe24467
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
Boss.java
src/test/java/com/kjj/cases/basics/Boss.java
+9
-6
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+8
-5
No files found.
src/test/java/com/kjj/cases/basics/Boss.java
View file @
7ee0dad7
package
com
.
kjj
.
cases
.
basics
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.utils.NetworkUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
...
...
@@ -34,6 +35,7 @@ public class Boss {
//判断代理人的会员及版本
@Test
(
description
=
"代理人版本判断"
,
priority
=
1
)
public
void
代理人版本判断
()
throws
IOException
{
network
.
agentCookies
.
put
(
"tku"
,
AGENT_TKU
);
Response
response
=
network
.
getResponse
(
VERSION_INFO
);
int
userVersion
=
response
.
jsonPath
().
getInt
(
"data.find {it.openType == 1}.userVersion"
);
//判断是否为保险版:1是通用版 2是保险版
Assert
.
assertEquals
(
userVersion
,
2
,
network
.
message
(
VERSION_INFO
,
"获取版本有误 此版本为非保险版"
,
response
.
body
().
asString
()));
...
...
@@ -101,18 +103,19 @@ public class Boss {
}*/
//邀请结果判断
@Test
(
description
=
"邀请结果"
,
priority
=
7
)
@Test
(
description
=
"邀请结果"
,
priority
=
7
)
public
void
邀请结果
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"inviterSid"
,
sellerId
);
params
.
put
(
"inviteType"
,
2
);
network
.
agentCookies
.
put
(
"tku"
,
VISITOR_TKU
);
Response
response
=
network
.
getResponse
(
params
,
BOSS_BOUND
);
boolean
data
=
true
;
// response.jsonPath().getBoolean("data"); //1 true:邀请成功;2 false:邀请失败
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BOSS_BOUND
,
"接受邀请失败"
,
response
.
body
().
asString
()));
//获取被邀请人上级昵称
//获取被邀请人上级昵称
Map
<
String
,
Object
>
inviteparams
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"sellerId"
,
vistorId
);
Response
responses
=
network
.
getResponse
(
inviteparams
,
BOSS_BOSS
);
...
...
@@ -169,10 +172,10 @@ public class Boss {
*/
//移除团队成员
@Test
(
description
=
"移除团队成员"
,
priority
=
1
2
)
@Test
(
description
=
"移除团队成员"
,
priority
=
1
1
)
public
void
移除团队成员
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
List
<
String
>
ss
=
Collections
.
singletonList
(
sids
);
List
<
String
>
ss
=
Collections
.
singletonList
(
BasicConfig
.
sids
);
params
.
put
(
"sids"
,
ss
);
Response
response
=
network
.
postResponse
(
params
,
BOSS_REMOVE
);
System
.
out
.
println
(
response
.
getBody
().
prettyPrint
());
...
...
@@ -182,7 +185,7 @@ public class Boss {
}
//代理人无下级直接进入个人数据看板页面;获取上级昵称
@Test
(
description
=
"获取上级昵称"
,
priority
=
1
3
)
@Test
(
description
=
"获取上级昵称"
,
priority
=
1
2
)
public
void
获取上级昵称
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"sellerId"
,
sellerId
);
...
...
@@ -195,7 +198,7 @@ public class Boss {
//分享链接邀请下级加入
@Test
(
description
=
"邀请下级加入"
,
priority
=
1
4
)
@Test
(
description
=
"邀请下级加入"
,
priority
=
1
3
)
public
void
邀请下级加入
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"inviteType"
,
2
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
7ee0dad7
...
...
@@ -4,22 +4,25 @@ public class BasicConfig {
public
static
int
apiCount
;
//接口数量统计
// 是否开启钉钉机器人推送
public
static
final
boolean
isPushReport
=
tru
e
;
//true
public
static
final
boolean
isPushReport
=
fals
e
;
//true
// 代理人微信昵称
public
static
final
String
WECHAT_NAME
=
"
客集集-梦晨
"
;
//true
public
static
final
String
WECHAT_NAME
=
"
嘿保险
"
;
//true
// 代理人的openid(固定)
public
static
final
String
OPEN_ID
=
"osi5w5
l1lGC9T8f-sLNNurqvfS4A
"
;
public
static
final
String
OPEN_ID
=
"osi5w5
ggFiEXk0tPJH9b0KO_XU08
"
;
// 直播用户 authkey
public
static
String
AUTH_KEY
=
null
;
// 代理人 TKU
public
static
String
AGENT_TKU
=
null
;
public
static
String
AGENT_TKU
=
"T3gM31f18jCFEfpzTZYM4oW7udbzB6UdSqJjFdbd5BgroyqLxoTWGy8uZboRkQQmjJ8YQd8ns7TqzrPmW2"
;
// 访客 TKU
public
static
String
VISITOR_TKU
=
null
;
public
static
String
VISITOR_TKU
=
"T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sfHcRNmyhTEzEbfmwrGFy5doVEinb1k3SVwreYQE"
;
// 访客的sids
public
static
final
String
sids
=
"Kj21MjMwNTU"
;
// 访客的userId(固定)
public
static
final
int
VISITOR_USERID
=
4425
;
...
...
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