Commit d7c4b106 authored by 龚小红's avatar 龚小红

完善亲友券

parent c683d09d
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;
}
}
......@@ -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()));
//
// }
}
......@@ -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()));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment