Commit 44681908 authored by 别湘灵's avatar 别湘灵

Merge remote-tracking branch 'origin/master'

parents 4709658c 7758492b
...@@ -101,7 +101,7 @@ public class SellerCard { ...@@ -101,7 +101,7 @@ public class SellerCard {
params.put("scid", scid); params.put("scid", scid);
Response response = network.getResponse(params, SELLERCARD_PERSONALPROFILE); Response response = network.getResponse(params, SELLERCARD_PERSONALPROFILE);
int exprLength = response.jsonPath().getInt("data.exprLength"); //工作年限 int exprLength = response.jsonPath().getInt("data.exprLength"); //工作年限
Assert.assertEquals(exprLength, 0, network.message(params, SELLERCARD_PERSONALPROFILE,"个人介绍-获取工作年限不匹配",response.body().asString())); Assert.assertEquals(exprLength, 2, network.message(params, SELLERCARD_PERSONALPROFILE,"个人介绍-获取工作年限不匹配",response.body().asString()));
//修改工作年限和个人介绍 //修改工作年限和个人介绍
......
...@@ -148,20 +148,8 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -148,20 +148,8 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert.assertTrue(data5, network.message(saveOrUpdate4Param, BasicConfig.MANAGER_SAVEORUPDATE4, "问卷配置失败", saveOrUpdate4Res.body().asString())); Assert.assertTrue(data5, network.message(saveOrUpdate4Param, BasicConfig.MANAGER_SAVEORUPDATE4, "问卷配置失败", saveOrUpdate4Res.body().asString()));
} }
@Test(description = "代理人参与条件", priority = 9)
public void 代理人参与条件() {
Map<String, Object> saveAgentParticipateParam = new HashMap<>(); @Test(description = "指定中奖奖品", priority = 9)
saveAgentParticipateParam.put("liveId", liveID);
saveAgentParticipateParam.put("inviteCount", 1);
Response saveAgentParticipateParamRes = network.postResponse(saveAgentParticipateParam, BasicConfig.MANAGER_SAVEAGENTPARTICIPATE);
boolean data6 = saveAgentParticipateParamRes.jsonPath().getBoolean("data");
System.out.println(data6);
Assert.assertTrue(data6, network.message(saveAgentParticipateParam, BasicConfig.MANAGER_SAVEAGENTPARTICIPATE, "代理人参与条件配置失败", saveAgentParticipateParamRes.body().asString()));
}
@Test(description = "指定中奖奖品", priority = 10)
public void 指定中奖奖品() { public void 指定中奖奖品() {
Map<String, Object> saveSpecifyAwardParam = new HashMap<>(); Map<String, Object> saveSpecifyAwardParam = new HashMap<>();
saveSpecifyAwardParam.put("Id", ""); saveSpecifyAwardParam.put("Id", "");
...@@ -169,6 +157,9 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -169,6 +157,9 @@ public class SaveAndUpdate implements AdminAuthorization {
saveSpecifyAwardParam.put("specifyAwardType", 1);//1:统一采购,2:自行准备 saveSpecifyAwardParam.put("specifyAwardType", 1);//1:统一采购,2:自行准备
saveSpecifyAwardParam.put("totalCount", 5); saveSpecifyAwardParam.put("totalCount", 5);
saveSpecifyAwardParam.put("unitPrice", 2990); saveSpecifyAwardParam.put("unitPrice", 2990);
saveSpecifyAwardParam.put("maxCanSpecifyCount", 0);
saveSpecifyAwardParam.put("privilegeScope", 1);
saveSpecifyAwardParam.put("inviteCount", 1);
saveSpecifyAwardParam.put("welfareConfId", 192); saveSpecifyAwardParam.put("welfareConfId", 192);
Response saveSpecifyAwardRes = network.postResponse(saveSpecifyAwardParam, BasicConfig.MANAGER_SAVESPECIFYAWARD); Response saveSpecifyAwardRes = network.postResponse(saveSpecifyAwardParam, BasicConfig.MANAGER_SAVESPECIFYAWARD);
...@@ -177,7 +168,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -177,7 +168,7 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert.assertTrue(data7, network.message(saveSpecifyAwardParam, BasicConfig.MANAGER_SAVESPECIFYAWARD, "指定中奖配置失败", saveSpecifyAwardRes.body().asString())); Assert.assertTrue(data7, network.message(saveSpecifyAwardParam, BasicConfig.MANAGER_SAVESPECIFYAWARD, "指定中奖配置失败", saveSpecifyAwardRes.body().asString()));
} }
@Test(description = "个人PK奖励", priority = 11) @Test(description = "个人PK奖励", priority = 10)
public void 个人PK奖励() { public void 个人PK奖励() {
Map<String, Object> saveOrUpdate5Param = new HashMap<>(); Map<String, Object> saveOrUpdate5Param = new HashMap<>();
saveOrUpdate5Param.put("liveId", liveID); saveOrUpdate5Param.put("liveId", liveID);
...@@ -185,9 +176,9 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -185,9 +176,9 @@ public class SaveAndUpdate implements AdminAuthorization {
List<RewardPkBean> rewardPks = new ArrayList<>();// [] List<RewardPkBean> rewardPks = new ArrayList<>();// []
RewardPkBean rewardPk = new RewardPkBean();// {} RewardPkBean rewardPk = new RewardPkBean();// {}
rewardPk.setPrizeName("1");// {id:1} rewardPk.setPrizeName("1");
rewardPk.setRanking(1);// {id:1,ss:"rew"} rewardPk.setRanking(1);
rewardPks.add(rewardPk);// [{id:1,ss:"rew"}] rewardPks.add(rewardPk);
RewardPkBean rewardPk1 = new RewardPkBean(); RewardPkBean rewardPk1 = new RewardPkBean();
rewardPk1.setPrizeName("2"); rewardPk1.setPrizeName("2");
...@@ -207,7 +198,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -207,7 +198,7 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
@Test(description = "团队PK奖励", priority = 12) @Test(description = "团队PK奖励", priority = 11)
public void 团队PK奖励() { public void 团队PK奖励() {
Map<String, Object> saveOrUpdate6Param = new HashMap<>(); Map<String, Object> saveOrUpdate6Param = new HashMap<>();
...@@ -239,7 +230,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -239,7 +230,7 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
@Test(description = "获取剩余红包金额", priority = 13) @Test(description = "获取剩余红包金额", priority = 12)
public void 获取剩余红包金额() { public void 获取剩余红包金额() {
Map<String, Object> getSurplusAmountParam = new HashMap<>(); Map<String, Object> getSurplusAmountParam = new HashMap<>();
getSurplusAmountParam.put("liveId", liveID); getSurplusAmountParam.put("liveId", liveID);
...@@ -252,7 +243,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -252,7 +243,7 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
//添加红包配置 //添加红包配置
@Test(description = "新增红包配置", priority = 14) @Test(description = "新增红包配置", priority = 13)
public void 新增红包配置() { public void 新增红包配置() {
Map<String, Object> saveOrUpdateRedParam = new HashMap<>(); Map<String, Object> saveOrUpdateRedParam = new HashMap<>();
saveOrUpdateRedParam.put("liveId", liveID); saveOrUpdateRedParam.put("liveId", liveID);
...@@ -270,7 +261,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -270,7 +261,7 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
//答题红包配置 //答题红包配置
@Test(description = "新增答题红包", priority = 15) @Test(description = "新增答题红包", priority = 14)
public void 新增答题红包() { public void 新增答题红包() {
Map<String, Object> saveOrUpdate9Param = new HashMap<>(); Map<String, Object> saveOrUpdate9Param = new HashMap<>();
saveOrUpdate9Param.put("liveId", liveID); saveOrUpdate9Param.put("liveId", liveID);
...@@ -302,7 +293,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -302,7 +293,7 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
//直播前奖品配置 //直播前奖品配置
@Test(description = "直播前抽奖", priority = 16) @Test(description = "直播前抽奖", priority = 15)
public void 直播前抽奖() { public void 直播前抽奖() {
Map<String, Object> addParam = new HashMap<>(); Map<String, Object> addParam = new HashMap<>();
addParam.put("liveId", liveID); addParam.put("liveId", liveID);
...@@ -319,23 +310,62 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -319,23 +310,62 @@ public class SaveAndUpdate implements AdminAuthorization {
} }
//直播中奖品配置 //直播中奖品配置
@Test(description = "直播中抽奖", priority = 17) @Test(description = "直播中抽奖", priority = 16)
public void 直播中抽奖() { public void 直播中抽奖() {
Map<String, Object> add1Param = new HashMap<>(); Map<String, Object> add1Param = new HashMap<>();
add1Param.put("liveId", liveID); add1Param.put("liveId", liveID);
add1Param.put("interactNum", 10); add1Param.put("interactNum", 100);
add1Param.put("showInteractNum", 10); add1Param.put("showInteractNum", 100);
add1Param.put("welfareId", 191); add1Param.put("welfareId", 191);
add1Param.put("afterMin", 10); add1Param.put("afterMin", 20);
Response add1Res = network.postResponse(add1Param, BasicConfig.MANAGER_ADD1); Response add1Res = network.postResponse(add1Param, BasicConfig.MANAGER_ADD1);
Object data = add1Res.jsonPath().getJsonObject("data"); Object data = add1Res.jsonPath().getJsonObject("data");
System.out.println(data); System.out.println(data);
Assert.assertNotNull(data, network.message(add1Param, BasicConfig.MANAGER_ADD1, "直播中抽奖配置失败", add1Res.body().asString())); Assert.assertNotNull(data, network.message(add1Param, BasicConfig.MANAGER_ADD1, "直播中抽奖配置失败", add1Res.body().asString()));
Map<String, Object> add2Param = new HashMap<>();
add2Param.put("liveId", liveID);
add2Param.put("interactNum", 100);
add2Param.put("showInteractNum", 100);
add2Param.put("welfareId", 192);
add2Param.put("afterMin", 30);
Response add2Res = network.postResponse(add2Param, BasicConfig.MANAGER_ADD1);
Object data1 = add2Res.jsonPath().getJsonObject("data");
System.out.println(data1);
Assert.assertNotNull(data1, network.message(add2Param, BasicConfig.MANAGER_ADD1, "直播中抽奖配置失败", add2Res.body().asString()));
Map<String, Object> add3Param = new HashMap<>();
add3Param.put("liveId", liveID);
add3Param.put("interactNum", 100);
add3Param.put("showInteractNum", 100);
add3Param.put("welfareId", 193);
add3Param.put("afterMin", 35);
Response add3Res = network.postResponse(add3Param, BasicConfig.MANAGER_ADD1);
Object data2 = add3Res.jsonPath().getJsonObject("data");
System.out.println(data2);
Assert.assertNotNull(data2, network.message(add3Param, BasicConfig.MANAGER_ADD1, "直播中抽奖配置失败", add3Res.body().asString()));
Map<String, Object> add4Param = new HashMap<>();
add4Param.put("liveId", liveID);
add4Param.put("interactNum", 100);
add4Param.put("showInteractNum", 100);
add4Param.put("welfareId", 194);
add4Param.put("afterMin", 40);
Response add4Res = network.postResponse(add4Param, BasicConfig.MANAGER_ADD1);
Object data3 = add4Res.jsonPath().getJsonObject("data");
System.out.println(data3);
Assert.assertNotNull(data3, network.message(add4Param, BasicConfig.MANAGER_ADD1, "直播中抽奖配置失败", add4Res.body().asString()));
} }
//配置免费福利 //配置免费福利
@Test(description = "配置免费福利", priority = 18) @Test(description = "配置免费福利", priority = 17)
public void 配置免费福利() { public void 配置免费福利() {
Map<String, Object> saveOrUpdate8Param = new HashMap<>(); Map<String, Object> saveOrUpdate8Param = new HashMap<>();
saveOrUpdate8Param.put("liveId", liveID); saveOrUpdate8Param.put("liveId", liveID);
......
...@@ -113,6 +113,12 @@ public class BasicConfig { ...@@ -113,6 +113,12 @@ public class BasicConfig {
public static final String MOBILE_AgentPersonalTeamCharts = MOBILE_HOST + "/kjy/live/agent/personalTeamCharts"; public static final String MOBILE_AgentPersonalTeamCharts = MOBILE_HOST + "/kjy/live/agent/personalTeamCharts";
public static final String MOBILE_GetAgentPosterInfo = MOBILE_HOST + "/kjy/live/share/getAgentPosterInfo";
public static final String MOBILE_ClueNum = MOBILE_HOST + "/kjy/live/agent/clue/clueNum";
public static final String MOBILE_ClueList = MOBILE_HOST + "/kjy/live/agent/clue/list";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<suite-files> <suite-files>
<suite-file path="liveTestNG.xml"></suite-file> <suite-file path="liveTestNG.xml"></suite-file>
<!-- <suite-file path="wechatTestNG.xml"></suite-file>--> <suite-file path="wechatTestNG.xml"></suite-file>
</suite-files> </suite-files>
<!-- 监听器--> <!-- 监听器-->
......
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
<!-- <class name="com.kjj.qa.cases.Novice"/>--> <!-- <class name="com.kjj.qa.cases.Novice"/>-->
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
<test preserve-order="true" name="支付"> <!-- <test preserve-order="true" name="支付">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.basics.Pay"/> <!-- <class name="com.kjj.cases.basics.Pay"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="名片"> <test preserve-order="true" name="名片">
<classes> <classes>
<class name="com.kjj.cases.basics.SellerCard"/> <class name="com.kjj.cases.basics.SellerCard"/>
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
<class name="com.kjj.cases.basics.BossTest"/> <class name="com.kjj.cases.basics.BossTest"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="贺卡"> <!-- <test preserve-order="true" name="贺卡">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.basics.GreetingCard"/> <!-- <class name="com.kjj.cases.basics.GreetingCard"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
</suite> </suite>
<!-- Suite --> <!-- Suite -->
......
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