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
73df322d
Commit
73df322d
authored
Aug 13, 2021
by
郭姣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户线索也增加准客户接口用例
parent
ad6eb8bf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
5 deletions
+33
-5
LiveAgent.java
src/test/java/com/kjj/cases/live/agent/LiveAgent.java
+13
-1
LiveLater.java
src/test/java/com/kjj/cases/live/agent/LiveLater.java
+18
-3
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+2
-1
No files found.
src/test/java/com/kjj/cases/live/agent/LiveAgent.java
View file @
73df322d
...
...
@@ -89,7 +89,19 @@ public class LiveAgent implements Authorization {
}
@Test
(
description
=
"获取直播间线索数统计"
,
priority
=
6
)
@Test
(
description
=
"获取直播间准客户线索"
,
priority
=
6
)
public
void
获取直播间准客户线索
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_clueList
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_clueList
,
"直播中准客户线索为null"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取直播间线索数统计"
,
priority
=
7
)
public
void
获取直播间线索数统计
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
src/test/java/com/kjj/cases/live/agent/LiveLater.java
View file @
73df322d
...
...
@@ -105,6 +105,9 @@ public class LiveLater implements Authorization {
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
>
18
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"线索数量不对"
,
response
.
body
().
asString
()));
Object
customerType
=
response
.
jsonPath
().
getJsonObject
(
"data.list.get(0).customerType"
);
System
.
out
.
println
(
customerType
);
Assert
.
assertEquals
(
customerType
,
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"准客户标签错误"
,
response
.
body
().
asString
()));
}
...
...
@@ -228,6 +231,8 @@ public class LiveLater implements Authorization {
Assert
.
assertNotNull
(
choiceQuestions
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"投票列表为null"
,
response
.
body
().
asString
()));
Object
testResources
=
response
.
jsonPath
().
getJsonObject
(
"data.testResources"
);
Assert
.
assertNotNull
(
testResources
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"用户提交测试资源报告为null"
,
response
.
body
().
asString
()));
int
customerType
=
response
.
jsonPath
().
getInt
(
"data.customerType"
);
Assert
.
assertEquals
(
customerType
,
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"准客户标记错误"
,
response
.
body
().
asString
()));
List
<
GrabWelfares
>
list
=
JsonUtil
.
parseResponseToListBean
(
response
,
GrabWelfares
.
class
,
"grabWelfares"
);
Boolean
specifyAward
=
list
.
get
(
0
).
getSpecifyAward
();
Assert
.
assertTrue
(
specifyAward
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"指定中奖为null"
,
response
.
body
().
asString
()));
...
...
@@ -264,8 +269,7 @@ public class LiveLater implements Authorization {
//需要校验返回结果
@Test
(
description
=
"访客邀请列表"
,
priority
=
15
)
public
void
访客邀请列表
()
{
public
void
访客邀请列表
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
...
...
@@ -311,5 +315,16 @@ public class LiveLater implements Authorization {
}
@Test
(
description
=
"查看客户A跟进机会"
,
priority
=
18
)
public
void
查看客户
A
跟进机会
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveVisitorId"
,
this
.
liveUserId
.
get
(
0
).
getLiveUserId
());
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
5
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_clueChanceList
);
Object
clueList
=
response
.
jsonPath
().
getJsonObject
(
"data.list"
);
System
.
out
.
println
(
clueList
);
Assert
.
assertNotNull
(
clueList
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_clueChanceList
,
"跟进机会获取失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/config/BasicConfig.java
View file @
73df322d
...
...
@@ -399,6 +399,7 @@ public class BasicConfig {
public
static
final
String
MOBILE_RewardAgentList
=
MOBILE_HOST
+
"/kjy/live/reward/agent/list"
;
public
static
final
String
MOBILE_signInfo
=
MOBILE_HOST
+
"/kjy/live/reward/agent/signInfo"
;
public
static
final
String
MOBILE_getDeliveryWay
=
MOBILE_HOST
+
"/kjy/live/getDeliveryWay"
;
public
static
final
String
MOBILE_clueChanceList
=
MOBILE_HOST
+
"/kjy/live/agent/clue/followChanceList"
;
public
static
final
String
MOBILE_Procurator
=
MOBILE_HOST
+
"/kjy/live/agent/liveList"
;
...
...
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