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
77bcddef
Commit
77bcddef
authored
Aug 26, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改亲友券和客户承诺话术
parent
12d5168b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
36 deletions
+61
-36
Dialogue.java
src/test/java/com/kjj/bean/issue/Dialogue.java
+3
-3
FlipCard.java
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
+1
-0
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+4
-2
RelativeLottery.java
...test/java/com/kjj/cases/live/lottery/RelativeLottery.java
+30
-9
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+1
-1
NetworkUtils.java
src/test/java/com/kjj/utils/NetworkUtils.java
+1
-0
liveTestNG.xml
src/test/liveTestNG.xml
+21
-21
No files found.
src/test/java/com/kjj/bean/issue/Dialogue.java
View file @
77bcddef
...
...
@@ -11,17 +11,17 @@ public class Dialogue {
private
String
agentGreet
;
private
String
promiseTitle
;
private
String
promiseDesc
;
private
String
promiseButto
;
private
String
promiseButto
n
;
private
String
customerActionPromise
;
private
int
inviteType
;
public
Dialogue
(
ArrayList
<
String
>
quesList
,
String
agentConclusion
,
String
agentGreet
,
String
promiseTitle
,
String
promiseDesc
,
String
promiseButto
,
String
customerActionPromise
,
int
inviteType
)
{
public
Dialogue
(
ArrayList
<
String
>
quesList
,
String
agentConclusion
,
String
agentGreet
,
String
promiseTitle
,
String
promiseDesc
,
String
promiseButto
n
,
String
customerActionPromise
,
int
inviteType
)
{
this
.
quesList
=
quesList
;
this
.
agentConclusion
=
agentConclusion
;
this
.
agentGreet
=
agentGreet
;
this
.
promiseTitle
=
promiseTitle
;
this
.
promiseDesc
=
promiseDesc
;
this
.
promiseButto
=
promiseButto
;
this
.
promiseButto
n
=
promiseButton
;
this
.
customerActionPromise
=
customerActionPromise
;
this
.
inviteType
=
inviteType
;
}
...
...
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
View file @
77bcddef
...
...
@@ -61,6 +61,7 @@ public class FlipCard implements Authorization {
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"shareType"
,
6
);
params
.
put
(
"userType"
,
"A"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_helpInfo
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
...
...
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
77bcddef
...
...
@@ -2485,11 +2485,13 @@ public class SaveLive implements Authorization {
public
void
保存客户承诺话术配置
(){
ssoLogin
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
())
);
Params
.
put
(
"liveId"
,
5628
);
ArrayList
<
Dialogue
>
dialogues
=
new
ArrayList
<>();
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"一度问题1"
,
"一度问题2"
,
"一度问题3"
)),
"一度代理人结束语"
,
"一度代理人欢迎语"
,
"一度承诺标题"
,
"一度承诺描述"
,
"一度承诺按钮文案"
,
"一度行动承诺"
,
1
));
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"二度问题1"
,
"二度问题2"
,
"二度问题3"
)),
"二度代理人结束语"
,
"二度代理人欢迎语"
,
"二度承诺标题"
,
"二度承诺描述"
,
"二度承诺按钮文案"
,
"二度行动承诺"
,
2
));
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"二度问题1"
,
"二度问题2"
,
"二度问题3"
)),
"二度代理人结束语"
,
"二度代理人欢迎语"
,
"二度承诺标题"
,
"二度承诺描述"
,
"二度承诺按钮文案"
,
"二度行动承诺"
,
0
));
Params
.
put
(
"dialogues"
,
dialogues
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveDialogue
);
System
.
out
.
println
(
Params
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveDialogue
,
"保存客户承诺话术配置失败"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/kjj/cases/live/lottery/RelativeLottery.java
View file @
77bcddef
...
...
@@ -11,6 +11,7 @@ import org.testng.Assert;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -44,7 +45,7 @@ public class RelativeLottery implements Authorization {
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_allLottery
);
System
.
out
.
println
(
response
.
body
().
asString
());
int
fissionLotteryConfStatus
=
response
.
jsonPath
().
getInt
(
"data.
fissionLotteryConfStatus
"
);
int
fissionLotteryConfStatus
=
response
.
jsonPath
().
getInt
(
"data.
on
"
);
Assert
.
assertEquals
(
fissionLotteryConfStatus
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_allLottery
,
"亲友配置券未开启"
,
response
.
body
().
asString
()));
}
...
...
@@ -55,20 +56,22 @@ public class RelativeLottery implements Authorization {
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_confLottery
);
System
.
out
.
println
(
response
.
body
().
asString
());
int
isDirectly
=
response
.
jsonPath
().
getInt
(
"data.userDetail.isDirectly"
);
int
isAcceptable
=
response
.
jsonPath
().
getInt
(
"data.userDetail.isAcceptable"
);
int
userAcceptStatus
=
response
.
jsonPath
().
getInt
(
"data.userDetail.userAcceptStatus"
);
int
receiverInfoList
=
response
.
jsonPath
().
getInt
(
"data.userDetail.receiverInfoList.size()"
);
int
lotteryNum
=
response
.
jsonPath
().
getInt
(
"data.userDetail.lotteryNum"
);
Assert
.
assertEquals
(
isDirectly
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"一度用户没有亲友券领取资格"
,
response
.
body
().
asString
()));
int
lotteryNum
=
response
.
jsonPath
().
getInt
(
"data.confDetail.lotteryNum"
);
Assert
.
assertEquals
(
isAcceptable
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"一度用户没有亲友券领取资格"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
userAcceptStatus
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"一度用户已领取亲友券"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
receiverInfoList
,
0
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券已接受人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
lotteryNum
,
2
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
lotteryNum
,
3
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券数量错误"
,
response
.
body
().
asString
()));
visitorAuth5
();
getLiveAwardListParam
.
clear
();
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_confLottery
);
System
.
out
.
println
(
response
.
body
().
asString
());
is
Directly
=
response
.
jsonPath
().
getInt
(
"data.userDetail.isDirectly
"
);
Assert
.
assertEquals
(
is
Directly
,
0
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"非一度用户有亲友券领取资格"
,
response
.
body
().
asString
()));
is
Acceptable
=
response
.
jsonPath
().
getInt
(
"data.userDetail.isAcceptable
"
);
Assert
.
assertEquals
(
is
Acceptable
,
0
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"非一度用户有亲友券领取资格"
,
response
.
body
().
asString
()));
}
...
...
@@ -103,6 +106,7 @@ public class RelativeLottery implements Authorization {
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"shareType"
,
10
);
params
.
put
(
"userType"
,
"A"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_helpInfo
);
System
.
out
.
println
(
response
.
body
().
asString
());
Object
mpShareTitle
=
response
.
jsonPath
().
getJsonObject
(
"data.mpShareTitle"
);
...
...
@@ -156,7 +160,24 @@ public class RelativeLottery implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客Xmz给访客H助力"
,
priority
=
11
)
@Test
(
description
=
"访客A预约直播间"
,
priority
=
11
)
public
void
访客
A
预约直播间
()
{
visitorAuth26
();
Map
<
String
,
Object
>
sycParam
=
new
HashMap
<>();
sycParam
.
put
(
"bizId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
sycParam
.
put
(
"bizType"
,
1
);
List
<
Long
>
markIds1
=
new
ArrayList
<>();
markIds1
.
add
(
142L
);
markIds1
.
add
(
143L
);
markIds1
.
add
(
140L
);
sycParam
.
put
(
"markIds"
,
markIds1
);
Response
sycRes
=
network
.
postResponse
(
sycParam
,
BasicConfig
.
USER_SYCAPPOINTMENT
);
Object
data
=
sycRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
sycParam
,
BasicConfig
.
USER_SYCAPPOINTMENT
,
"预约失败"
,
sycRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客Xmz给访客H助力"
,
priority
=
12
)
public
void
访客
Xmz
给访客
H
助力
()
{
visitorAuth26
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
@@ -180,7 +201,7 @@ public class RelativeLottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MOBILE_assist
,
"访客Xmz给访客H助力失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询亲友券被领取1张"
,
priority
=
1
2
)
@Test
(
description
=
"查询亲友券被领取1张"
,
priority
=
1
3
)
public
void
查询亲友券被领取
1
张
()
{
visitorAuth9
();
Map
<
String
,
Object
>
getLiveAwardListParam
=
new
HashMap
<>();
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
77bcddef
...
...
@@ -299,7 +299,7 @@ public class BasicConfig {
public
static
final
String
MANAGER_relativeLottery
=
MANAGER_HOST
+
"/kjy/manager/fission/lottery/saveOrUpdate"
;
public
static
final
String
MANAGER_detailLottery
=
MANAGER_HOST
+
"/kjy/manager/fission/lottery/detail"
;
public
static
final
String
MANAGER_switchStatusLottery
=
MANAGER_HOST
+
"/kjy/manager/fission/lottery/switchStatus"
;
public
static
final
String
MOBILE_allLottery
=
MOBILE_HOST
+
"/kjy/live/
pre/conf/all
"
;
public
static
final
String
MOBILE_allLottery
=
MOBILE_HOST
+
"/kjy/live/
info/pre/data
"
;
public
static
final
String
MOBILE_confLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/conf/all"
;
public
static
final
String
MOBILE_codeLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/user/code"
;
public
static
final
String
MOBILE_acceptLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/user/accept"
;
...
...
src/test/java/com/kjj/utils/NetworkUtils.java
View file @
77bcddef
...
...
@@ -91,6 +91,7 @@ public class NetworkUtils {
// post 带参请求
public
Response
postResponse
(
Map
<
String
,
Object
>
params
,
String
path
)
{
String
jsonStr
=
JSONObject
.
toJSONString
(
params
);
System
.
out
.
println
(
jsonStr
);
Response
response
=
given
()
.
cookies
(
agentCookies
)
.
headers
(
agentHeaders
)
...
...
src/test/liveTestNG.xml
View file @
77bcddef
...
...
@@ -2,33 +2,33 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"直播"
verbose=
"1"
thread-count=
"3"
>
<test
preserve-order=
"true"
name=
"直播素材"
>
<classes
>
<class
name=
"com.kjj.cases.live.liveConfig.LiveMaterial"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"团队管理"
>
<classes
>
<class
name=
"com.kjj.cases.live.liveConfig.Team"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"精彩视频"
>
<classes
>
<class
name=
"com.kjj.cases.live.liveConfig.Video"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="直播素材">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.liveConfig.LiveMaterial"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="团队管理">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.liveConfig.Team"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="精彩视频">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.liveConfig.Video"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"创建直播"
>
<classes>
<class
name=
"com.kjj.cases.live.liveConfig.SaveLive"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"成功案例"
>
<classes
>
<class
name=
"com.kjj.cases.live.liveConfig.LiveCase"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="成功案例">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.liveConfig.LiveCase"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"资料贴片"
>
<classes>
...
...
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