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

自己修改

parent d7c4b106
...@@ -254,7 +254,7 @@ public class Customer implements Authorization { ...@@ -254,7 +254,7 @@ public class Customer implements Authorization {
int chanceType=response.jsonPath().getInt("data.chanceType"); int chanceType=response.jsonPath().getInt("data.chanceType");
Assert.assertTrue(chanceType==1, network.message(BasicConfig.MOBILE_followChanceDetail, "跟进类型非咨询", response.body().asString())); Assert.assertTrue(chanceType==1, network.message(BasicConfig.MOBILE_followChanceDetail, "跟进类型非咨询", response.body().asString()));
String question=response.jsonPath().getString("data.question"); String question=response.jsonPath().getString("data.question");
Assert.assertEquals(question,"咨询问题一",network.message(BasicConfig.MOBILE_followChanceDetail, "咨询问题为null", response.body().asString())); Assert.assertEquals(question,"一度问题1",network.message(BasicConfig.MOBILE_followChanceDetail, "咨询问题为null", response.body().asString()));
} }
......
...@@ -353,4 +353,14 @@ public class LiveLater implements Authorization { ...@@ -353,4 +353,14 @@ public class LiveLater implements Authorization {
e.printStackTrace(); e.printStackTrace();
} }
} }
@Test(description = "直播后准客户数量统计",priority = 20)
public void 直播后准客户数量统计(){
Map<String,Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_clueChanceList);
System.out.println(response.body().asString());
int potentialNum = response.jsonPath().getInt("data.potentialNum");
Assert.assertEquals(potentialNum,1,network.message(params,BasicConfig.MOBILE_clueChanceList,"准客户数量错误",response.body().asString()));
}
} }
...@@ -28,14 +28,16 @@ public class Potential implements Authorization { ...@@ -28,14 +28,16 @@ public class Potential implements Authorization {
} }
@Test(description = "获取推送问题咨询", priority =2) @Test(description = "一度用户获取话术模板", priority =2)
public void 获取推送问题() { public void 一度用户获取话术模板() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.ANCHOR_questions); Response response = network.getResponse(Params, BasicConfig.MOBILE_dialogue);
System.out.println(response.body().asString()); System.out.println(response.body().asString());
bizConfId=response.jsonPath().getString("data[0].id"); String promiseTitle = response.jsonPath().getString("data.promiseTitle");
Assert.assertNotNull(bizConfId, network.message(Params, BasicConfig.ANCHOR_questions, "为获取到问题ID", response.body().asString())); Assert.assertEquals(promiseTitle,"一度承诺标题", network.message(Params, BasicConfig.MOBILE_dialogue, "一度用户标题", response.body().asString()));
bizConfId=response.jsonPath().getString("data.quesList[0].id");
Assert.assertNotNull(bizConfId, network.message(Params, BasicConfig.MOBILE_dialogue, "未获取到问题ID", response.body().asString()));
} }
...@@ -104,7 +106,15 @@ public class Potential implements Authorization { ...@@ -104,7 +106,15 @@ public class Potential implements Authorization {
} }
@Test(description = "二度用户获取话术模板", priority =8)
public void 二度用户获取话术模板() {
visitorAuth5();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MOBILE_dialogue);
System.out.println(response.body().asString());
String promiseTitle = response.jsonPath().getString("data.promiseTitle");
Assert.assertEquals(promiseTitle,"二度承诺标题", network.message(Params, BasicConfig.MOBILE_dialogue, "一度用户标题", response.body().asString()));
}
} }
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.kjj.bean.answer.AddReward; import com.kjj.bean.answer.AddReward;
import com.kjj.bean.answer.AddWelfareConf; import com.kjj.bean.answer.AddWelfareConf;
import com.kjj.bean.answer.RewardList; import com.kjj.bean.answer.RewardList;
import com.kjj.bean.issue.Dialogue;
import com.kjj.bean.lottery.ConfIdList; import com.kjj.bean.lottery.ConfIdList;
import com.kjj.bean.manager.*; import com.kjj.bean.manager.*;
import com.kjj.bean.secondKill.SecondKillList; import com.kjj.bean.secondKill.SecondKillList;
...@@ -2271,31 +2272,8 @@ public class SaveLive implements Authorization { ...@@ -2271,31 +2272,8 @@ public class SaveLive implements Authorization {
Assert.assertTrue(popupScene==7, network.message(Params, BasicConfig.MANAGER_popupDetail, "闯关答题授权弹窗ID查询为null", response.body().asString())); Assert.assertTrue(popupScene==7, network.message(Params, BasicConfig.MANAGER_popupDetail, "闯关答题授权弹窗ID查询为null", response.body().asString()));
} }
/**
* 准客户
*/
@Test(description = "问题配置", priority = 121)
public void 问题配置() {
//新增问题配置
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("quesList",Arrays.asList("咨询问题一", "咨询问题二","咨询问题三"));
Response response = network.postResponse(Params, BasicConfig.MANAGER_potentialSaveQues);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data,network.message(Params, BasicConfig.MANAGER_potentialSaveQues, "未配置咨询问题", response.body().asString()));
//查询问题列表
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
response=network.getResponse(Params, BasicConfig.MANAGER_potentialQuesList);
System.out.println(response.body().asString());
String quesDesc=response.jsonPath().getString("data[0].quesDesc");
Assert.assertEquals(quesDesc,"咨询问题一",network.message(Params, BasicConfig.MANAGER_potentialSaveQues, "咨询问题详情为null", response.body().asString()));
} @Test(description = "保存第5轮和第6轮配置红包", priority = 121)
@Test(description = "保存第5轮和第6轮配置红包", priority = 122)
public void 保存第5轮和第6轮配置红包() { public void 保存第5轮和第6轮配置红包() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey())); Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
...@@ -2318,7 +2296,7 @@ public class SaveLive implements Authorization { ...@@ -2318,7 +2296,7 @@ public class SaveLive implements Authorization {
} }
@Test(description = "查询时长红包配置列表", priority = 123) @Test(description = "查询时长红包配置列表", priority = 122)
public void 查询时长红包配置列表() { public void 查询时长红包配置列表() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey())); Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
...@@ -2331,7 +2309,7 @@ public class SaveLive implements Authorization { ...@@ -2331,7 +2309,7 @@ public class SaveLive implements Authorization {
Assert.assertEquals(list.size(), 6,network.message(Params, BasicConfig.MANAGER_timeRedList, "查询时长红包配置列表失败", response.body().asString())); Assert.assertEquals(list.size(), 6,network.message(Params, BasicConfig.MANAGER_timeRedList, "查询时长红包配置列表失败", response.body().asString()));
} }
@Test(description = "查询第5轮和第6轮时长红包详情", priority = 124) @Test(description = "查询第5轮和第6轮时长红包详情", priority = 123)
public void 查询第5轮和第6轮时长红包详情() { public void 查询第5轮和第6轮时长红包详情() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("id",this.redId.get(4).getId() ); Params.put("id",this.redId.get(4).getId() );
...@@ -2350,7 +2328,7 @@ public class SaveLive implements Authorization { ...@@ -2350,7 +2328,7 @@ public class SaveLive implements Authorization {
/** /**
* 配置秒杀互动 * 配置秒杀互动
*/ */
@Test(description = "添加秒杀互动", priority = 125) @Test(description = "添加秒杀互动", priority = 124)
public void 添加秒杀互动() { public void 添加秒杀互动() {
Map<String, Object> secKillAddPar = new HashMap<>(); Map<String, Object> secKillAddPar = new HashMap<>();
secKillAddPar.put("goodsId", secKillGoodsId); secKillAddPar.put("goodsId", secKillGoodsId);
...@@ -2369,7 +2347,7 @@ public class SaveLive implements Authorization { ...@@ -2369,7 +2347,7 @@ public class SaveLive implements Authorization {
} }
} }
@Test(description = "获取秒杀轮次列表", priority = 126) @Test(description = "获取秒杀轮次列表", priority = 125)
public void 获取秒杀轮次列表() { public void 获取秒杀轮次列表() {
Map<String, Object> liveSecKillPar = new HashMap<>(); Map<String, Object> liveSecKillPar = new HashMap<>();
liveSecKillPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey())); liveSecKillPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
...@@ -2399,7 +2377,7 @@ public class SaveLive implements Authorization { ...@@ -2399,7 +2377,7 @@ public class SaveLive implements Authorization {
newSecKillId = secondKillList.getId(); newSecKillId = secondKillList.getId();
} }
@Test(description = "编辑秒杀轮次", priority = 127) @Test(description = "编辑秒杀轮次", priority = 126)
public void 编辑秒杀轮次() { public void 编辑秒杀轮次() {
Map<String, Object> secKillUpdatePar = new HashMap<>(); Map<String, Object> secKillUpdatePar = new HashMap<>();
secKillUpdatePar.put("goodsId", secKillGoodsId); secKillUpdatePar.put("goodsId", secKillGoodsId);
...@@ -2417,7 +2395,7 @@ public class SaveLive implements Authorization { ...@@ -2417,7 +2395,7 @@ public class SaveLive implements Authorization {
} }
} }
@Test(description = "删除秒杀轮次", priority = 128) @Test(description = "删除秒杀轮次", priority = 127)
public void 删除秒杀轮次() { public void 删除秒杀轮次() {
Map<String, Object> secKillDelPar = new HashMap<>(); Map<String, Object> secKillDelPar = new HashMap<>();
secKillDelPar.put("id", newSecKillId); secKillDelPar.put("id", newSecKillId);
...@@ -2439,7 +2417,43 @@ public class SaveLive implements Authorization { ...@@ -2439,7 +2417,43 @@ public class SaveLive implements Authorization {
} }
} }
@Test(description = "开启亲友抽奖券配置", priority = 129) /**
* 亲友抽奖券配置
*/
@Test(description = "保存亲友抽奖券配置", priority = 128)
public void 保存亲友抽奖券配置(){
ssoLogin();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
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()));
}
@Test(description = "查看亲友抽奖券配置详情", priority = 129)
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 = 130)
public void 开启亲友抽奖券配置() { public void 开启亲友抽奖券配置() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey())); Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
...@@ -2450,7 +2464,7 @@ public class SaveLive implements Authorization { ...@@ -2450,7 +2464,7 @@ public class SaveLive implements Authorization {
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switchStatusLottery, "开启亲友券配置失败", response.body().asString())); Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switchStatusLottery, "开启亲友券配置失败", response.body().asString()));
} }
@Test(description = "查询亲友抽奖券配置状态", priority = 130) @Test(description = "查询亲友抽奖券配置状态", priority = 131)
public void 查询亲友抽奖券配置状态() { public void 查询亲友抽奖券配置状态() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey())); Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
...@@ -2463,4 +2477,38 @@ public class SaveLive implements Authorization { ...@@ -2463,4 +2477,38 @@ public class SaveLive implements Authorization {
Assert.assertTrue(fissionLotteryConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置亲友抽奖券", response.body().asString())); Assert.assertTrue(fissionLotteryConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置亲友抽奖券", response.body().asString()));
} }
/**
* 准客户承诺话术配置
*/
@Test(description = "保存客户承诺话术配置", priority = 132)
public void 保存客户承诺话术配置(){
ssoLogin();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
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));
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveDialogue);
System.out.println(response.body().asString());
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveDialogue, "保存客户承诺话术配置失败", response.body().asString()));
}
@Test(description = "查看客户承诺话术配置", priority = 133)
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_findDialogue);
System.out.println(response.body().asString());
Object data =response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_findDialogue, "查看客户承诺话术为空", response.body().asString()));
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,2, network.message(Params, BasicConfig.MANAGER_findDialogue, "客户承诺话术错误", response.body().asString()));
String promiseTitle1 = response.jsonPath().getString("data.get[0].promiseTitle");
String promiseTitle2 = response.jsonPath().getString("data.get[1].promiseTitle");
Assert.assertEquals(promiseTitle1,"一度承诺标题", network.message(Params, BasicConfig.MANAGER_findDialogue, "一度客户承诺话术错误", response.body().asString()));
Assert.assertEquals(promiseTitle2,"二度承诺标题", network.message(Params, BasicConfig.MANAGER_findDialogue, "二度客户承诺话术错误", response.body().asString()));
}
} }
...@@ -141,6 +141,12 @@ public class BasicConfig { ...@@ -141,6 +141,12 @@ public class BasicConfig {
public static final String MANAGER_secondKillDel = MANAGER_HOST + "/kjy/manager/live/second/kill/goods/delete"; public static final String MANAGER_secondKillDel = MANAGER_HOST + "/kjy/manager/live/second/kill/goods/delete";
public static final String MANAGER_secondKillUpdate = MANAGER_HOST + "/kjy/manager/live/second/kill/goods/update"; public static final String MANAGER_secondKillUpdate = MANAGER_HOST + "/kjy/manager/live/second/kill/goods/update";
//客户承诺话术配置
public static final String MANAGER_saveDialogue = MANAGER_HOST + "kjy/manager/live/potential/saveDialogue";
public static final String MANAGER_findDialogue = MANAGER_HOST + "kjy/manager/live/potential/findDialogue";
public static final String MOBILE_dialogue= MOBILE_HOST + "/kjy/live/agent/potential/dialogue";
public static final String MOBILE_potentialNum= MOBILE_HOST + "/kjy/live/agent/clue/potentialNum";
// *************** 闯关答题 *************** // *************** 闯关答题 ***************
public static final String MANAGER_addOrUpdateQues = MANAGER_HOST + "/kjy/manager/pass/ques/addOrUpdateQues"; public static final String MANAGER_addOrUpdateQues = MANAGER_HOST + "/kjy/manager/pass/ques/addOrUpdateQues";
public static final String MANAGER_deleteQues = MANAGER_HOST + "/kjy/manager/pass/ques/deleteQues"; public static final String MANAGER_deleteQues = MANAGER_HOST + "/kjy/manager/pass/ques/deleteQues";
...@@ -413,11 +419,6 @@ public class BasicConfig { ...@@ -413,11 +419,6 @@ public class BasicConfig {
public static final String MANAGER_popupDetail = MANAGER_HOST + "/kjy/manager/live/auth/popup/detail"; public static final String MANAGER_popupDetail = MANAGER_HOST + "/kjy/manager/live/auth/popup/detail";
public static final String MANAGER_popupUpdate = MANAGER_HOST + "/kjy/manager/live/auth/popup/update"; public static final String MANAGER_popupUpdate = MANAGER_HOST + "/kjy/manager/live/auth/popup/update";
//准客户
public static final String MANAGER_potentialSaveQues = MANAGER_HOST + "/kjy/manager/live/potential/saveQues";
public static final String MANAGER_potentialQuesList = MANAGER_HOST + "/kjy/manager/live/potential/quesList";
//客户管理 //客户管理
public static final String MOBILE_potentialCount = MOBILE_HOST + "/kjy/live/agent/customer/potentialCount"; public static final String MOBILE_potentialCount = MOBILE_HOST + "/kjy/live/agent/customer/potentialCount";
public static final String MOBILE_customerList = MOBILE_HOST + "/kjy/live/agent/customer/list"; public static final String MOBILE_customerList = MOBILE_HOST + "/kjy/live/agent/customer/list";
......
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