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
d7c4b106
Commit
d7c4b106
authored
Aug 25, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善亲友券
parent
c683d09d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
80 deletions
+71
-80
Dialogue.java
src/test/java/com/kjj/bean/issue/Dialogue.java
+28
-0
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+23
-60
Share.java
src/test/java/com/kjj/cases/live/liveConfig/Share.java
+20
-20
No files found.
src/test/java/com/kjj/bean/issue/Dialogue.java
0 → 100644
View file @
d7c4b106
package
com
.
kjj
.
bean
.
issue
;
import
lombok.Data
;
import
java.util.ArrayList
;
@Data
public
class
Dialogue
{
private
ArrayList
<
String
>
quesList
;
private
String
agentConclusion
;
private
String
agentGreet
;
private
String
promiseTitle
;
private
String
promiseDesc
;
private
String
promiseButto
;
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
)
{
this
.
quesList
=
quesList
;
this
.
agentConclusion
=
agentConclusion
;
this
.
agentGreet
=
agentGreet
;
this
.
promiseTitle
=
promiseTitle
;
this
.
promiseDesc
=
promiseDesc
;
this
.
promiseButto
=
promiseButto
;
this
.
customerActionPromise
=
customerActionPromise
;
this
.
inviteType
=
inviteType
;
}
}
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
d7c4b106
...
...
@@ -2347,26 +2347,6 @@ public class SaveLive implements Authorization {
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_otherDetail
,
"查询第6轮时长红包详情失败"
,
response
.
body
().
asString
()));
}
/**
* 亲友抽奖券配置
*/
@Test
(
description
=
"保存亲友抽奖券配置"
,
priority
=
125
)
public
void
保存亲友抽奖券配置
(){
ssoLogin
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
5482
);
Params
.
put
(
"giftedLotteryUrl"
,
""
);
Params
.
put
(
"notGiftedLotteryUrl"
,
""
);
Params
.
put
(
"popLotteryUrl"
,
""
);
Params
.
put
(
"envelopeWord"
,
"这是信封话术"
);
Params
.
put
(
"lotteryName"
,
"亲友抽奖券"
);
Params
.
put
(
"lotteryNum"
,
3
);
Params
.
put
(
"lotteryInstruction"
,
"这是亲友抽奖券的说明"
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_relativeLottery
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_relativeLottery
,
"保存亲友券配置失败"
,
response
.
body
().
asString
()));
/**
* 配置秒杀互动
*/
...
...
@@ -2459,45 +2439,28 @@ public class SaveLive implements Authorization {
}
}
@Test
(
description
=
"开启亲友抽奖券配置"
,
priority
=
129
)
public
void
开启亲友抽奖券配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"openStatus"
,
1
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_switchStatusLottery
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_switchStatusLottery
,
"开启亲友券配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询亲友抽奖券配置状态"
,
priority
=
130
)
public
void
查询亲友抽奖券配置状态
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
fissionLotteryConfBuildStatus
=
response
.
jsonPath
().
getBoolean
(
"data.fissionLotteryConfBuildStatus"
);
Assert
.
assertTrue
(
fissionLotteryConfBuildStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置亲友抽奖券"
,
response
.
body
().
asString
()));
boolean
fissionLotteryConfStatus
=
response
.
jsonPath
().
getBoolean
(
"data.fissionLotteryConfStatus"
);
Assert
.
assertTrue
(
fissionLotteryConfStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置亲友抽奖券"
,
response
.
body
().
asString
()));
}
//
// @Test(description = "查看亲友抽奖券配置详情", priority = 126)
// public void 查看亲友抽奖券配置详情() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_detailLottery);
// System.out.println(response.body().asString());
// Object data =response.jsonPath().getJsonObject("data");
// Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_detailLottery, "查看亲友抽奖券配置详情为空", response.body().asString()));
//
// int lotteryNum = response.jsonPath().getInt("data.lotteryNum");
// int openStatus = response.jsonPath().getInt("data.openStatus");
// Assert.assertEquals(openStatus,0, network.message(Params, BasicConfig.MANAGER_detailLottery, "亲友抽奖券数开启状态错误", response.body().asString()));
// Assert.assertEquals(lotteryNum,3, network.message(Params, BasicConfig.MANAGER_detailLottery, "亲友抽奖券数量错误", response.body().asString()));
// }
//
// @Test(description = "开启亲友抽奖券配置", priority = 127)
// public void 开启亲友抽奖券配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("openStatus", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_switchStatusLottery);
// System.out.println(response.body().asString());
// boolean data =response.jsonPath().getBoolean("data");
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switchStatusLottery, "开启亲友券配置失败", response.body().asString()));
// }
//
// @Test(description = "查询亲友抽奖券配置状态", priority = 128)
// public void 查询亲友抽奖券配置状态() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
// System.out.println(response.body().asString());
// boolean fissionLotteryConfBuildStatus = response.jsonPath().getBoolean("data.fissionLotteryConfBuildStatus");
// Assert.assertTrue(fissionLotteryConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置亲友抽奖券", response.body().asString()));
//
// boolean fissionLotteryConfStatus = response.jsonPath().getBoolean("data.fissionLotteryConfStatus");
// Assert.assertTrue(fissionLotteryConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置亲友抽奖券", response.body().asString()));
//
// }
}
src/test/java/com/kjj/cases/live/liveConfig/Share.java
View file @
d7c4b106
...
...
@@ -188,25 +188,25 @@ public class Share implements Authorization {
Assert
.
assertEquals
(
mpShareTitle
,
"答题闯关分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"答题闯关配置列表为null"
,
response
.
body
().
asString
()));
}
//
@Test(description = "亲友抽奖券分享", priority = 9)
//
public void 亲友抽奖券分享() {
//
Map<String, Object> Params = new HashMap<>();
//
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
//
Params.put("mpShareUrl", "//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg");
//
Params.put("mpShareTitle", "亲友抽奖券分享文案");
//
Params.put("shareType",10);
//
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveOrUpdateMpShare);
//
boolean data =response.jsonPath().getBoolean("data");
//
System.out.println(data);
//
Assert.assertTrue(data,network.message(Params, BasicConfig.MOBILE_info, "答题闯关分享失败", response.body().asString()));
//
//
Params.clear();
//
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
//
Params.put("shareType",10);
//
response=network.getResponse(Params, BasicConfig.MANAGER_mpShareList);
//
System.out.println(response.body().asString());
//
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
//
Assert.assertEquals(mpShareTitle,"亲友抽奖券分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "答题闯关配置列表为null", response.body().asString()));
//
}
@Test
(
description
=
"亲友抽奖券分享"
,
priority
=
9
)
public
void
亲友抽奖券分享
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"mpShareUrl"
,
"//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg"
);
Params
.
put
(
"mpShareTitle"
,
"亲友抽奖券分享文案"
);
Params
.
put
(
"shareType"
,
10
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveOrUpdateMpShare
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MOBILE_info
,
"答题闯关分享失败"
,
response
.
body
().
asString
()));
Params
.
clear
();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"shareType"
,
10
);
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_mpShareList
);
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[0].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"亲友抽奖券分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"答题闯关配置列表为null"
,
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