Commit 77bcddef authored by 龚小红's avatar 龚小红

修改亲友券和客户承诺话术

parent 12d5168b
...@@ -11,17 +11,17 @@ public class Dialogue { ...@@ -11,17 +11,17 @@ public class Dialogue {
private String agentGreet; private String agentGreet;
private String promiseTitle; private String promiseTitle;
private String promiseDesc; private String promiseDesc;
private String promiseButto; private String promiseButton;
private String customerActionPromise; private String customerActionPromise;
private int inviteType; 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 promiseButton, String customerActionPromise, int inviteType) {
this.quesList = quesList; this.quesList = quesList;
this.agentConclusion = agentConclusion; this.agentConclusion = agentConclusion;
this.agentGreet = agentGreet; this.agentGreet = agentGreet;
this.promiseTitle = promiseTitle; this.promiseTitle = promiseTitle;
this.promiseDesc = promiseDesc; this.promiseDesc = promiseDesc;
this.promiseButto = promiseButto; this.promiseButton = promiseButton;
this.customerActionPromise = customerActionPromise; this.customerActionPromise = customerActionPromise;
this.inviteType = inviteType; this.inviteType = inviteType;
} }
......
...@@ -61,6 +61,7 @@ public class FlipCard implements Authorization { ...@@ -61,6 +61,7 @@ public class FlipCard implements Authorization {
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()));
params.put("shareType",6); params.put("shareType",6);
params.put("userType","A");
Response response = network.getResponse(params, BasicConfig.MOBILE_helpInfo); Response response = network.getResponse(params, BasicConfig.MOBILE_helpInfo);
Object data = response.jsonPath().getJsonObject("data"); Object data = response.jsonPath().getJsonObject("data");
System.out.println(data); System.out.println(data);
......
...@@ -2485,11 +2485,13 @@ public class SaveLive implements Authorization { ...@@ -2485,11 +2485,13 @@ public class SaveLive implements Authorization {
public void 保存客户承诺话术配置(){ public void 保存客户承诺话术配置(){
ssoLogin(); ssoLogin();
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", 5628);
ArrayList<Dialogue> dialogues = new ArrayList<>(); 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")),"一度代理人结束语","一度代理人欢迎语","一度承诺标题","一度承诺描述","一度承诺按钮文案","一度行动承诺",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); Response response = network.postResponse(Params, BasicConfig.MANAGER_saveDialogue);
System.out.println(Params);
System.out.println(response.body().asString()); System.out.println(response.body().asString());
boolean data =response.jsonPath().getBoolean("data"); boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveDialogue, "保存客户承诺话术配置失败", response.body().asString())); Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveDialogue, "保存客户承诺话术配置失败", response.body().asString()));
......
...@@ -11,6 +11,7 @@ import org.testng.Assert; ...@@ -11,6 +11,7 @@ import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -44,7 +45,7 @@ public class RelativeLottery implements Authorization { ...@@ -44,7 +45,7 @@ public class RelativeLottery implements Authorization {
getLiveAwardListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); getLiveAwardListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(getLiveAwardListParam, MOBILE_allLottery); Response response = network.getResponse(getLiveAwardListParam, MOBILE_allLottery);
System.out.println(response.body().asString()); 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())); Assert.assertEquals(fissionLotteryConfStatus, 1,network.message(getLiveAwardListParam, MOBILE_allLottery, "亲友配置券未开启", response.body().asString()));
} }
...@@ -55,20 +56,22 @@ public class RelativeLottery implements Authorization { ...@@ -55,20 +56,22 @@ public class RelativeLottery implements Authorization {
getLiveAwardListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); getLiveAwardListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(getLiveAwardListParam, MOBILE_confLottery); Response response = network.getResponse(getLiveAwardListParam, MOBILE_confLottery);
System.out.println(response.body().asString()); 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 receiverInfoList = response.jsonPath().getInt("data.userDetail.receiverInfoList.size()");
int lotteryNum = response.jsonPath().getInt("data.userDetail.lotteryNum"); int lotteryNum = response.jsonPath().getInt("data.confDetail.lotteryNum");
Assert.assertEquals(isDirectly, 1,network.message(getLiveAwardListParam, MOBILE_confLottery, "一度用户没有亲友券领取资格", response.body().asString())); 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(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(); visitorAuth5();
getLiveAwardListParam.clear(); getLiveAwardListParam.clear();
getLiveAwardListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); getLiveAwardListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
response = network.getResponse(getLiveAwardListParam, MOBILE_confLottery); response = network.getResponse(getLiveAwardListParam, MOBILE_confLottery);
System.out.println(response.body().asString()); System.out.println(response.body().asString());
isDirectly = response.jsonPath().getInt("data.userDetail.isDirectly"); isAcceptable = response.jsonPath().getInt("data.userDetail.isAcceptable");
Assert.assertEquals(isDirectly, 0,network.message(getLiveAwardListParam, MOBILE_confLottery, "非一度用户有亲友券领取资格", response.body().asString())); Assert.assertEquals(isAcceptable, 0,network.message(getLiveAwardListParam, MOBILE_confLottery, "非一度用户有亲友券领取资格", response.body().asString()));
} }
...@@ -103,6 +106,7 @@ public class RelativeLottery implements Authorization { ...@@ -103,6 +106,7 @@ public class RelativeLottery implements Authorization {
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()));
params.put("shareType",10); params.put("shareType",10);
params.put("userType","A");
Response response = network.getResponse(params, BasicConfig.MOBILE_helpInfo); Response response = network.getResponse(params, BasicConfig.MOBILE_helpInfo);
System.out.println(response.body().asString()); System.out.println(response.body().asString());
Object mpShareTitle = response.jsonPath().getJsonObject("data.mpShareTitle"); Object mpShareTitle = response.jsonPath().getJsonObject("data.mpShareTitle");
...@@ -156,7 +160,24 @@ public class RelativeLottery implements Authorization { ...@@ -156,7 +160,24 @@ public class RelativeLottery implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString())); 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助力() { public void 访客Xmz给访客H助力() {
visitorAuth26(); visitorAuth26();
ThreadSleepUtils.sleep(2000); ThreadSleepUtils.sleep(2000);
...@@ -180,7 +201,7 @@ public class RelativeLottery implements Authorization { ...@@ -180,7 +201,7 @@ public class RelativeLottery implements Authorization {
Assert.assertTrue(data, network.message(Params, BasicConfig.MOBILE_assist, "访客Xmz给访客H助力失败", response.body().asString())); Assert.assertTrue(data, network.message(Params, BasicConfig.MOBILE_assist, "访客Xmz给访客H助力失败", response.body().asString()));
} }
@Test(description = "查询亲友券被领取1张", priority = 12) @Test(description = "查询亲友券被领取1张", priority = 13)
public void 查询亲友券被领取1() { public void 查询亲友券被领取1() {
visitorAuth9(); visitorAuth9();
Map<String, Object> getLiveAwardListParam = new HashMap<>(); Map<String, Object> getLiveAwardListParam = new HashMap<>();
......
...@@ -299,7 +299,7 @@ public class BasicConfig { ...@@ -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_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_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 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_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_codeLottery = MOBILE_HOST +"/kjy/live/fission/lottery/user/code";
public static final String MOBILE_acceptLottery = MOBILE_HOST +"/kjy/live/fission/lottery/user/accept"; public static final String MOBILE_acceptLottery = MOBILE_HOST +"/kjy/live/fission/lottery/user/accept";
......
...@@ -91,6 +91,7 @@ public class NetworkUtils { ...@@ -91,6 +91,7 @@ public class NetworkUtils {
// post 带参请求 // post 带参请求
public Response postResponse(Map<String, Object> params, String path) { public Response postResponse(Map<String, Object> params, String path) {
String jsonStr = JSONObject.toJSONString(params); String jsonStr = JSONObject.toJSONString(params);
System.out.println(jsonStr);
Response response = given() Response response = given()
.cookies(agentCookies) .cookies(agentCookies)
.headers(agentHeaders) .headers(agentHeaders)
......
...@@ -2,33 +2,33 @@ ...@@ -2,33 +2,33 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="直播" verbose="1" thread-count="3"> <suite name="直播" verbose="1" thread-count="3">
<test preserve-order="true" name="直播素材"> <!-- <test preserve-order="true" name="直播素材">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.LiveMaterial"/> <!-- <class name="com.kjj.cases.live.liveConfig.LiveMaterial"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="团队管理"> <!-- <test preserve-order="true" name="团队管理">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.Team"/> <!-- <class name="com.kjj.cases.live.liveConfig.Team"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="精彩视频"> <!-- <test preserve-order="true" name="精彩视频">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.Video"/> <!-- <class name="com.kjj.cases.live.liveConfig.Video"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="创建直播"> <test preserve-order="true" name="创建直播">
<classes> <classes>
<class name="com.kjj.cases.live.liveConfig.SaveLive"/> <class name="com.kjj.cases.live.liveConfig.SaveLive"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="成功案例"> <!-- <test preserve-order="true" name="成功案例">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.LiveCase"/> <!-- <class name="com.kjj.cases.live.liveConfig.LiveCase"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="资料贴片"> <test preserve-order="true" name="资料贴片">
<classes> <classes>
......
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