Commit a8b48fde authored by xiamengchen's avatar xiamengchen

Merge branch 'master' into feature/20210907-xmc

# Conflicts:
#	src/test/liveTestNG.xml
parents 8b758343 de46e8bf
......@@ -6,16 +6,84 @@ import com.kjj.constants.LiveConstants;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.*;
import static com.kjj.utils.BaseUtils.ssoLogin;
public class FlipCard implements Authorization {
public String redConfId;
public String shareSign;
@Test(description = "查询翻牌集字配置状态", priority = 1)
@BeforeClass
public void setUp() {
ssoLogin(); }
/**
* 翻牌集字活动配置
*/
@Test(description = "保存翻牌配置", priority = 1)
public void 保存翻牌配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("amount", 1000);
Params.put("helpNum", 1);
Params.put("num",2);
Params.put("showAmount",1000);
Params.put("showMaxAmount",1000);
Params.put("poolType",1);
Params.put("openSceneType",1);
Params.put("freeNum",1);
Response response = network.postResponse(Params, BasicConfig.MANAGER_flipWord);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_flipWord, "保存翻牌配置失败", response.body().asString()));
}
@Test(description = "查看直播翻牌配置详情", priority = 2)
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_wordDetail);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_wordDetail, "查看直播翻牌配置详情失败", response.body().asString()));
}
@Test(description = "开启翻牌配置", priority = 3)
public void 开启翻牌配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("confStatus",2);
Response response = network.postResponse(Params, BasicConfig.MANAGER_wordSwitchStatus);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_wordSwitchStatus, "开启翻牌配置失败", response.body().asString()));
}
@Test(description = "查看直播配置", priority = 4)
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);
boolean flipWordConfBuildStatus = response.jsonPath().getBoolean("data.flipWordConfBuildStatus");
System.out.println(flipWordConfBuildStatus);
Assert.assertTrue(flipWordConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
boolean flipWordConfStatus = response.jsonPath().getBoolean("data.flipWordConfStatus");
System.out.println(flipWordConfStatus);
Assert.assertTrue(flipWordConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
}
@Test(description = "查询翻牌集字配置状态", priority = 5)
public void 查询翻牌集字配置状态() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
......@@ -27,7 +95,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "查询翻牌集字配置详情", priority = 2)
@Test(description = "查询翻牌集字配置详情", priority = 6)
public void 查询翻牌集字配置详情() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
......@@ -41,7 +109,7 @@ public class FlipCard implements Authorization {
//用户任务完成
@Test(description = "访客H分享直播间", priority = 3)
@Test(description = "访客H分享直播间", priority = 7)
public void 访客H分享直播间() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
......@@ -55,7 +123,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "根据分享类型获取分享内容", priority = 4)
@Test(description = "根据分享类型获取分享内容", priority = 8)
public void 根据分享类型获取分享内容() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
......@@ -68,7 +136,7 @@ public class FlipCard implements Authorization {
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_helpInfo, "根据分享类型获取分享内容", response.body().asString()));
}
@Test(description = "访客邀请关系绑定", priority = 5)
@Test(description = "访客邀请关系绑定", priority = 9)
public void 访客邀请关系绑定() {
Map<String, Object> bindingParam = new HashMap<>();
......@@ -89,7 +157,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "获取绑定结果和绑定凭证", priority = 6)
@Test(description = "获取绑定结果和绑定凭证", priority = 10)
public void 获取绑定结果和绑定凭证() {
ThreadSleepUtils.sleep(2000);
......@@ -110,7 +178,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "已登录查询分享人头像昵称", priority = 7)
@Test(description = "已登录查询分享人头像昵称", priority = 11)
public void 已登录查询分享人头像昵称() {
Map<String, Object> infoParam = new HashMap<>();
......@@ -135,7 +203,7 @@ public class FlipCard implements Authorization {
@Test(description = "访客H获得助力", priority = 8)
@Test(description = "访客H获得助力", priority = 12)
public void 访客H获得助力() {
Map<String, Object> params = new HashMap<>();
visitorAuth22();
......@@ -166,7 +234,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "访客S分享直播间", priority = 9)
@Test(description = "访客S分享直播间", priority = 13)
public void 访客S分享直播间() {
visitorAuth22();
Map<String, Object> params = new HashMap<>();
......@@ -180,7 +248,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "访客S获得助力", priority = 10)
@Test(description = "访客S获得助力", priority = 14)
public void 访客S获得助力() {
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -204,7 +272,7 @@ public class FlipCard implements Authorization {
}
//签到
@Test(description = "用户签到", priority = 11)
@Test(description = "用户签到", priority = 15)
public void 用户签到() {
Map<String, Object> params = new HashMap<>();
......@@ -227,7 +295,7 @@ public class FlipCard implements Authorization {
//预约
@Test(description = "翻牌集字_预约", priority = 12)
@Test(description = "翻牌集字_预约", priority = 16)
public void 翻牌集字_预约() {
Map<String, Object> params = new HashMap<>();
......@@ -252,7 +320,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "用户完成任务情况", priority = 13)
@Test(description = "用户完成任务情况", priority = 17)
public void 用户完成任务情况() {
Map<String, Object> params = new HashMap<>();
......@@ -281,7 +349,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "查询用户翻牌剩余次数", priority = 14)
@Test(description = "查询用户翻牌剩余次数", priority = 18)
public void 查询用户翻牌剩余次数() {
ThreadSleepUtils.sleep(1000);
......@@ -303,7 +371,7 @@ public class FlipCard implements Authorization {
@Test(description = "翻牌", priority = 15)
@Test(description = "翻牌", priority = 19)
public void 翻牌() {
for (int i =0;i<6;i++){
Map<String, Object> params = new HashMap<>();
......@@ -348,7 +416,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "用户参与翻牌详情", priority = 16)
@Test(description = "用户参与翻牌详情", priority = 20)
public void 用户参与翻牌详情() {
ThreadSleepUtils.sleep(1000);
......@@ -373,7 +441,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "翻牌集字领取历史记录", priority = 17)
@Test(description = "翻牌集字领取历史记录", priority = 21)
public void 翻牌集字领取历史记录() {
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
......@@ -397,7 +465,7 @@ public class FlipCard implements Authorization {
//开红包
@Test(description = "用户开红包资格查询", priority = 18)
@Test(description = "用户开红包资格查询", priority = 22)
public void 用户开红包资格查询() {
ThreadSleepUtils.sleep(5000);
......@@ -417,7 +485,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "放弃开红包", priority = 19)
@Test(description = "放弃开红包", priority = 23)
public void 放弃开红包() {
visitorAuth22();
ThreadSleepUtils.sleep(1000);
......@@ -431,7 +499,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "开红包", priority = 20)
@Test(description = "开红包", priority = 24)
public void 开红包() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -443,7 +511,7 @@ public class FlipCard implements Authorization {
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_redOpen, "开红包失败", response.body().asString()));
}
@Test(description = "用户开红包状态查询", priority = 21)
@Test(description = "用户开红包状态查询", priority = 25)
public void 用户开红包状态查询() {
ThreadSleepUtils.sleep(3000);
Map<String, Object> params = new HashMap<>();
......@@ -466,7 +534,7 @@ public class FlipCard implements Authorization {
}
@Test(description = "开红包结果", priority = 22)
@Test(description = "开红包结果", priority = 26)
public void 开红包结果() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -480,6 +548,4 @@ public class FlipCard implements Authorization {
Assert.assertTrue(redAmount==1000, network.message(params, BasicConfig.MOBILE_redOpenState, "红包金额不对", response.body().asString()));
}
}
package com.kjj.cases.live.liveConfig;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.kjj.bean.answer.AddReward;
......@@ -7,21 +8,19 @@ import com.kjj.bean.answer.RewardList;
import com.kjj.bean.issue.Dialogue;
import com.kjj.bean.lottery.ConfIdList;
import com.kjj.bean.manager.*;
import com.kjj.bean.secondKill.SecondKillList;
import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.IdMakeUtil;
import com.kjj.utils.JsonUtil;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.bson.json.JsonParseException;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.*;
import static com.kjj.utils.BaseUtils.ssoLogin;
......@@ -32,6 +31,7 @@ public class SaveLive implements Authorization {
public long welfareConfId;
private Integer taskId;
public List<RedList> redId;
public List<WelfareList> id; //奖品列表id
@BeforeClass
public void setUp() {
......@@ -422,12 +422,6 @@ public class SaveLive implements Authorization {
}
/**
* 裂变宝箱配置
*/
public List<WelfareList> id;
public JSONObject treasureConf;
@Test(description = "查询配置奖品列表", priority = 20)
public void 查询配置奖品列表() {
Map<String, Object> getListParam = new HashMap<>();
......@@ -443,75 +437,6 @@ public class SaveLive implements Authorization {
Assert.assertNotNull(list, network.message(getListParam, BasicConfig.MANAGER_getList4Admin, "查询奖品列表失败", response.body().asString()));
}
@Test(description = "宝箱实物中奖限制1次", priority = 21)
public void 宝箱实物中奖限制1() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("openCondition", 1);
saveParam.put("openNum", 10);
TreasureAward treasureAward = new TreasureAward();
treasureAward.setWelfareId(this.id.get(0).getId());
treasureAward.setAwardName("宝箱锦鲤");
treasureAward.setTreasureProbability(10000);
treasureAward.setTreasureType(3);
treasureAward.setRuleType(1);
treasureAward.setTotalNum(3);
treasureAward.setWinLimitCount(1);
saveParam.put("treasureAward", treasureAward);
TreasureRed treasureRed = new TreasureRed();
treasureRed.setRedTotalAmount(100);
treasureRed.setRuleType(2);
treasureRed.setTotalNum(2);
treasureRed.setTreasureProbability(0);
treasureRed.setTreasureType(2);
treasureRed.setWinLimitCount(1);
treasureRed.setShowAmount(200);
saveParam.put("treasureRed", treasureRed);
TreasureCode treasureCode = new TreasureCode();
treasureCode.setFixedNum(1);
treasureCode.setMaxNum(3);
treasureCode.setRuleType(2);
treasureCode.setTreasureProbability(0);
treasureCode.setTreasureType(1);
saveParam.put("treasureCode", treasureCode);
saveParam.put("treasurePeriod", 3);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_saveTreasureConf);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(saveParam, BasicConfig.MANAGER_saveTreasureConf, "新增宝箱裂变配置失败", response.body().asString()));
}
@Test(description = "查询宝箱配置详情", priority = 22)
public void 查询宝箱配置详情() {
Map<String, Object> confDetailParam = new HashMap<>();
confDetailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(confDetailParam, BasicConfig.MANAGER_confDetail);
System.out.println(response);
Integer openCondition = response.jsonPath().getInt("data.openCondition");
System.out.println(openCondition);
Assert.assertTrue(openCondition > 0, network.message(confDetailParam, BasicConfig.MANAGER_confDetail, "查询宝箱配置详情失败", response.body().asString()));
treasureConf = JSON.parseObject(JSON.toJSONString(response.jsonPath().get("data")));
}
@Test(description = "开启宝箱配置", priority = 23)
public void 开启宝箱配置() {
Map<String, Object> switchStatusParam = new HashMap<>();
switchStatusParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
switchStatusParam.put("confStatus", 1);
Response response = network.postResponse(switchStatusParam, BasicConfig.MANAGER_switchStatus);
boolean data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertTrue(data, network.message(switchStatusParam, BasicConfig.MANAGER_switchStatus, "开启宝箱失败", response.body().asString()));
}
/**
* 时长宝箱配置
*/
......@@ -549,7 +474,6 @@ public class SaveLive implements Authorization {
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MANAGER_update1, "停留时长1分钟固定抽奖码", response.body().asString()));
}
......@@ -1417,66 +1341,39 @@ public class SaveLive implements Authorization {
}
/**
* 翻牌集字活动配置
* 准客户承诺话术配置
*/
@Test(description = "保存翻牌配置", priority = 69)
public void 保存翻牌配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("amount", 1000);
Params.put("helpNum", 1);
Params.put("num",2);
Params.put("showAmount",1000);
Params.put("showMaxAmount",1000);
Params.put("poolType",1);
Params.put("openSceneType",1);
Params.put("freeNum",1);
Response response = network.postResponse(Params, BasicConfig.MANAGER_flipWord);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_flipWord, "保存翻牌配置失败", response.body().asString()));
}
@Test(description = "查看直播翻牌配置详情", priority = 70)
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_wordDetail);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_wordDetail, "查看直播翻牌配置详情失败", response.body().asString()));
}
@Test(description = "开启翻牌配置", priority = 71)
public void 开启翻牌配置() {
@Test(description = "保存客户承诺话术配置", priority = 69)
public void 保存客户承诺话术配置(){
ssoLogin();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("confStatus",2);
Response response = network.postResponse(Params, BasicConfig.MANAGER_wordSwitchStatus);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_wordSwitchStatus, "开启翻牌配置失败", response.body().asString()));
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")),"二度代理人结束语","二度代理人欢迎语","二度承诺标题","二度承诺描述","二度承诺按钮文案","二度行动承诺",0));
Params.put("dialogues", dialogues);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveDialogue);
System.out.println(Params);
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 = 72)
public void 查看直播配置() {
@Test(description = "查看客户承诺话术配置", priority = 70)
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);
boolean flipWordConfBuildStatus = response.jsonPath().getBoolean("data.flipWordConfBuildStatus");
System.out.println(flipWordConfBuildStatus);
Assert.assertTrue(flipWordConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
boolean flipWordConfStatus = response.jsonPath().getBoolean("data.flipWordConfStatus");
System.out.println(flipWordConfStatus);
Assert.assertTrue(flipWordConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
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.find{it.inviteType == 1}.promiseTitle");
String promiseTitle2 = response.jsonPath().getString("data.find{it.inviteType == 0}.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()));
}
/**
......@@ -2099,7 +1996,7 @@ public class SaveLive implements Authorization {
/**
* 授权弹窗
*/
*/
@Test(description = "查看授权弹窗配置状态", priority = 113)
public void 查看授权弹窗配置状态() {
......@@ -2111,7 +2008,7 @@ public class SaveLive implements Authorization {
Assert.assertTrue(hasConfAuthPopup, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置预告页弹窗", response.body().asString()));
}
}
@Test(description = "授权弹窗配置_直播抽奖", priority = 114)
public void 授权弹窗配置_直播抽奖() {
......@@ -2388,40 +2285,4 @@ public class SaveLive implements Authorization {
Assert.assertTrue(fissionLotteryConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置亲友抽奖券", response.body().asString()));
}
/**
* 准客户承诺话术配置
*/
@Test(description = "保存客户承诺话术配置", priority = 128)
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")),"二度代理人结束语","二度代理人欢迎语","二度承诺标题","二度承诺描述","二度承诺按钮文案","二度行动承诺",0));
Params.put("dialogues", dialogues);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveDialogue);
System.out.println(Params);
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 = 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_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.find{it.inviteType == 1}.promiseTitle");
String promiseTitle2 = response.jsonPath().getString("data.find{it.inviteType == 0}.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()));
}
}
package com.kjj.cases.live.liveConfig;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.kjj.bean.answer.AddReward;
import com.kjj.bean.answer.AddWelfareConf;
import com.kjj.bean.answer.RewardList;
import com.kjj.bean.issue.Dialogue;
import com.kjj.bean.lottery.ConfIdList;
import com.kjj.bean.manager.*;
import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.IdMakeUtil;
import com.kjj.utils.JsonUtil;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.*;
import static com.kjj.utils.BaseUtils.ssoLogin;
public class SimpleLiveConfig implements Authorization {
public String liveID;
public String EncodeLiveID;
public long welfareConfId;
private Integer taskId;
public List<RedList> redId;
@BeforeClass
public void setUp() {
ssoLogin(); }
/**
* 创建直播
*/
@Test(description = "创建直播", priority = 1)
public void 创建直播() {
Map<String, Object> Params = new HashMap<>();
Params.put("posterUrl", "https://streamimg.kjjcrm.com/kjy/image/20210201/e36cb31828e14a3ebb9d01e6be79ad66.jpg");
Params.put("videoUrl", "http://streamimg.kjjcrm.com/kjy/image/20210201/1612171657348.mp4");
Params.put("welfareUrl", "https://streamimg.kjjcrm.com/kjy/image/20210201/62c25dcb3b9b4d269a74894e4255a193.jpg");
Params.put("coverUrl", "https://streamimg.kjjcrm.com/kjy/image/20210201/d4093b24aaca49da8f0e3e276721feea.jpg");
Params.put("mpShareUrl", "https://streamimg.kjjcrm.com/kjy/image/20210201/182f3659e39b4ea6898af781cc6344a1.jpg");
Params.put("title", "直播测试" + RandomUtils.nextInt(1, 100));
Params.put("mpShareTitle", "自动化直播");
Params.put("companyId", 101);
Params.put("agentInviteAuthType", 1);
Params.put("agentInviteAuthLimitNum", 1);
long noticeTime = DateUtils.addHours(new Date(), 2).getTime();
long broadcastTime = DateUtils.addHours(new Date(), 5).getTime();
Params.put("noticeTime", noticeTime);
Params.put("broadcastTime", broadcastTime);
Params.put("shareContent", "自动化直播 #{shortLink}");
Params.put("shelfStatus", 2);
Params.put("secondPoster", "https://streamimg.kjjcrm.com/kjy/image/20210201/cc999ebde48e49f99ac3f0d93480453f.jpg");
Params.put("regionType",2);
Params.put("preAwardUrl","https://yun.dui88.com/kjy/image/20210629/1624949155842.png");
Params.put("preWindowUrl","https://yun.dui88.com/kjy/image/20210629/1624949098093.png");
Params.put("distributionType", 0);
Params.put("existSeriesPoster", 0);
List<ProvinceCityCodeList> provinceCityCode = new ArrayList<>();
ProvinceCityCodeList save = new ProvinceCityCodeList();
save.setProvinceCode(110000);
save.setCityCode(null);
provinceCityCode.add(save);
ProvinceCityCodeList save1 = new ProvinceCityCodeList();
save1.setProvinceCode(420000);
save1.setCityCode(420900);
provinceCityCode.add(save1);
ProvinceCityCodeList save2 = new ProvinceCityCodeList();
save2.setProvinceCode(330000);
save2.setCityCode(330100);
provinceCityCode.add(save2);
Params.put("provinceCityCodeList", provinceCityCode);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveAndUpdate_0);
liveID = response.jsonPath().getString("data");
EncodeLiveID = IdMakeUtil.encodingId(Long.valueOf(liveID));
System.out.println(liveID);
LiveConstants.setValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey(), liveID);
LiveConstants.setValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey(), EncodeLiveID);
Assert.assertNotNull(liveID, network.message(Params, BasicConfig.MANAGER_saveAndUpdate_0, "新增直播失败", response.body().asString()));
LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey());
}
/**
* 基础配置
*/
@Test(description = "查询直播配置", priority = 2)
public void 查询直播配置() {
Map<String, Object> params = new HashMap<>();
params.put("liveId", liveID);
Response response = network.getResponse(params, BasicConfig.MANAGER_getConfDetail);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(params, BasicConfig.MANAGER_getConfDetail, "查询配置失败", response.body().asString()));
}
@Test(description = "单场红包配置", priority = 3)
public void 单场红包配置() {
//单场红包限额
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", liveID);
Params.put("maxAmount", 100000);
Response response = network.postResponse(Params, BasicConfig.MANAGER_MaxAmount);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_MaxAmount, "单场红包限额配置失败", response.body().asString()));
}
@Test(description = "展示红包金额", priority = 4)
public void 展示红包金额() {
//展示红包金额
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", liveID);
Params.put("showAmount", 100000);
Response response = network.postResponse(Params, BasicConfig.MANAGER_ShowAmount);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_ShowAmount, "展示红包配置失败", response.body().asString()));
}
@Test(description = "直播资料", priority = 5)
public void 直播资料() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", liveID);
List<Material> ids = new ArrayList<>();
ids.add(new Material(355L,0));
ids.add(new Material(356L,0));
ids.add(new Material(357L,0));
ids.add(new Material(358L,0));
ids.add(new Material(359L,0));
ids.add(new Material(960L,0));
ids.add(new Material(3384L,0));
Params.put("resourceList", ids);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveAndUpdate_8);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(response.body().asString());
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveAndUpdate_8, "产品资料配置失败", response.body().asString()));
}
}
......@@ -329,10 +329,4 @@ public class DesignatedWinner implements Authorization {
Assert.assertNotNull(data, network.message(AwardConfParam, BasicConfig.MOBILE_agentSpecifyAwardConf, "代理人指定中奖配置查询失败", AwardConfRes.body().asString()));
}
}
......@@ -2,10 +2,15 @@ package com.kjj.cases.live.treasure;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.kjj.bean.manager.TreasureAward;
import com.kjj.bean.manager.TreasureCode;
import com.kjj.bean.manager.TreasureRed;
import com.kjj.bean.manager.WelfareList;
import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.JsonUtil;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.testng.Assert;
......@@ -25,19 +30,96 @@ public class Treasure implements Authorization {
public String shareSign;
public JSONObject treasureConf;
@Test(description = "查询宝箱配置详情", priority = 1)
/**
* 裂变宝箱配置
*/
public List<WelfareList> id;
@Test(description = "查询配置奖品列表", priority = 1)
public void 查询配置奖品列表() {
Map<String, Object> getListParam = new HashMap<>();
getListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getListParam.put("companyId", 101);
getListParam.put("pageIndex", 1);
getListParam.put("pageSize", 20);
getListParam.put("welfareType", 6);
Response response = network.getResponse(getListParam, BasicConfig.MANAGER_getList4Admin);
List<WelfareList> list = JsonUtil.parseResponseToPageBean(response, WelfareList.class);
System.out.println(list);
this.id = list;
Assert.assertNotNull(list, network.message(getListParam, BasicConfig.MANAGER_getList4Admin, "查询奖品列表失败", response.body().asString()));
}
@Test(description = "宝箱实物中奖限制1次", priority = 2)
public void 宝箱实物中奖限制1() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("openCondition", 1);
saveParam.put("openNum", 10);
TreasureAward treasureAward = new TreasureAward();
treasureAward.setWelfareId(this.id.get(0).getId());
treasureAward.setAwardName("宝箱锦鲤");
treasureAward.setTreasureProbability(10000);
treasureAward.setTreasureType(3);
treasureAward.setRuleType(1);
treasureAward.setTotalNum(3);
treasureAward.setWinLimitCount(1);
saveParam.put("treasureAward", treasureAward);
TreasureRed treasureRed = new TreasureRed();
treasureRed.setRedTotalAmount(100);
treasureRed.setRuleType(2);
treasureRed.setTotalNum(2);
treasureRed.setTreasureProbability(0);
treasureRed.setTreasureType(2);
treasureRed.setWinLimitCount(1);
treasureRed.setShowAmount(200);
saveParam.put("treasureRed", treasureRed);
TreasureCode treasureCode = new TreasureCode();
treasureCode.setFixedNum(1);
treasureCode.setMaxNum(3);
treasureCode.setRuleType(2);
treasureCode.setTreasureProbability(0);
treasureCode.setTreasureType(1);
saveParam.put("treasureCode", treasureCode);
saveParam.put("treasurePeriod", 3);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_saveTreasureConf);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(saveParam, BasicConfig.MANAGER_saveTreasureConf, "新增宝箱裂变配置失败", response.body().asString()));
}
@Test(description = "查询宝箱配置详情", priority = 3)
public void 查询宝箱配置详情() {
Map<String, Object> confDetailParam = new HashMap<>();
confDetailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(confDetailParam, BasicConfig.MANAGER_confDetail);
System.out.println(response);
Integer openCondition =response.jsonPath().getInt("data.openCondition");
Integer openCondition = response.jsonPath().getInt("data.openCondition");
System.out.println(openCondition);
Assert.assertTrue(openCondition>0, network.message(confDetailParam, BasicConfig.MANAGER_confDetail, "查询宝箱配置详情失败", response.body().asString()));
Assert.assertTrue(openCondition > 0, network.message(confDetailParam, BasicConfig.MANAGER_confDetail, "查询宝箱配置详情失败", response.body().asString()));
treasureConf = JSON.parseObject(JSON.toJSONString(response.jsonPath().get("data")));
}
@Test(description = "查询直播前宝箱配置状态", priority = 2)
@Test(description = "开启宝箱配置", priority = 4)
public void 开启宝箱配置() {
Map<String, Object> switchStatusParam = new HashMap<>();
switchStatusParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
switchStatusParam.put("confStatus", 1);
Response response = network.postResponse(switchStatusParam, BasicConfig.MANAGER_switchStatus);
boolean data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertTrue(data, network.message(switchStatusParam, BasicConfig.MANAGER_switchStatus, "开启宝箱失败", response.body().asString()));
}
@Test(description = "查询直播前宝箱配置状态", priority = 5)
public void 查询宝箱配置状态() {
visitorAuth9();
Map<String, Object> statusParam = new HashMap<>();
......@@ -49,7 +131,7 @@ public class Treasure implements Authorization {
}
@Test(description = "查询直播前宝箱配置信息", priority = 3)
@Test(description = "查询直播前宝箱配置信息", priority = 6)
public void 查询直播前宝箱配置信息() {
visitorAuth9();
ThreadSleepUtils.sleep(2000);
......@@ -65,7 +147,7 @@ public class Treasure implements Authorization {
}
@Test(description = "选择宝箱", priority = 4)
@Test(description = "选择宝箱", priority = 7)
public void 选择宝箱() {
visitorAuth9();
Map<String, Object> chooseAwardParam = new HashMap<>();
......@@ -79,7 +161,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H获取分享加密串", priority = 5)
@Test(description = "访客H获取分享加密串", priority = 8)
public void 访客H获取分享加密串() {
visitorAuth9();
Map<String, Object> signParam = new HashMap<>();
......@@ -93,7 +175,7 @@ public class Treasure implements Authorization {
}
@Test(description = "根据分享类型获取分享内容", priority = 6)
@Test(description = "根据分享类型获取分享内容", priority = 9)
public void 根据分享类型获取分享内容() {
visitorAuth2();
Map<String, Object> infoParam = new HashMap<>();
......@@ -107,7 +189,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H与访客B邀请关系绑定", priority = 7)
@Test(description = "访客H与访客B邀请关系绑定", priority = 10)
public void 访客H与访客B邀请关系绑定() {
visitorAuth2();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -119,7 +201,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客B获取绑定结果和绑定凭证", priority = 8)
@Test(description = "访客B获取绑定结果和绑定凭证", priority = 11)
public void 访客B获取绑定结果和绑定凭证() {
visitorAuth2();
ThreadSleepUtils.sleep(2000);
......@@ -133,7 +215,7 @@ public class Treasure implements Authorization {
//助力流程
@Test(description = "未登录查询分享人头像昵称", priority = 9)
@Test(description = "未登录查询分享人头像昵称", priority = 12)
public void 未登录查询分享人头像昵称() {
visitorAuth2();
Map<String, Object> simpleParam = new HashMap<>();
......@@ -147,7 +229,7 @@ public class Treasure implements Authorization {
Assert.assertNotNull(data, network.message(simpleParam, BasicConfig.MOBILE_simple, "未登录查询分享人头像昵称失败", response.body().asString()));
}
@Test(description = "已登录查询助力信息", priority = 10)
@Test(description = "已登录查询助力信息", priority = 13)
public void 已登录查询分享人头像昵称() {
visitorAuth2();
Map<String, Object> infoParam = new HashMap<>();
......@@ -162,7 +244,7 @@ public class Treasure implements Authorization {
}
@Test(description = "用户B给用户H助力", priority = 11)
@Test(description = "用户B给用户H助力", priority = 14)
public void 用户B给用户H助力() {
visitorAuth2();
Map<String, Object> Params = new HashMap<>();
......@@ -185,7 +267,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客B获取直播所有的订阅消息模板", priority = 12)
@Test(description = "访客B获取直播所有的订阅消息模板", priority = 15)
public void 获取B直播所有的订阅消息模板() {
visitorAuth2();
Map<String, Object> sycParam = new HashMap<>();
......@@ -196,7 +278,7 @@ public class Treasure implements Authorization {
Assert.assertNotNull(data, network.message(sycParam, BasicConfig.USER_wxIdAllList, "获取订阅消息失败", sycRes.body().asString()));
}
@Test(description = "访客B预约直播间", priority = 13)
@Test(description = "访客B预约直播间", priority = 16)
public void 访客B预约直播间() {
visitorAuth2();
Map<String, Object> sycParam = new HashMap<>();
......@@ -213,7 +295,7 @@ public class Treasure implements Authorization {
Assert.assertNotNull(data, network.message(sycParam, BasicConfig.USER_SYCAPPOINTMENT, "预约失败", sycRes.body().asString()));
}
@Test(description = "访客B关注直播间", priority = 14)
@Test(description = "访客B关注直播间", priority = 17)
public void 访客B关注直播间() {
visitorAuth2();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -228,7 +310,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客B关注状态查询", priority = 15)
@Test(description = "访客B关注状态查询", priority = 18)
public void 访客B关注状态查询() {
visitorAuth2();
Map<String, Object> findParam = new HashMap<>();
......@@ -240,7 +322,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客B保存海报获得抽奖码", priority = 16)
@Test(description = "访客B保存海报获得抽奖码", priority = 19)
public void 访客B保存海报获得抽奖码() {
visitorAuth2();
Map<String, Object> savePosterParam = new HashMap<>();
......@@ -252,7 +334,7 @@ public class Treasure implements Authorization {
}
@Test(description = "查询访客B抽奖码数量", priority = 17)
@Test(description = "查询访客B抽奖码数量", priority = 20)
public void 查询访客B抽奖码数量() {
visitorAuth2();
Map<String, Object> myCountParam = new HashMap<>();
......@@ -264,7 +346,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客K邀请关系绑定", priority = 18)
@Test(description = "访客K邀请关系绑定", priority = 21)
public void 访客K邀请关系绑定() {
visitorAuth11();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -276,7 +358,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", response.body().asString()));
}
@Test(description = "访客K获取绑定结果和绑定凭证", priority = 19)
@Test(description = "访客K获取绑定结果和绑定凭证", priority = 22)
public void 访客K获取绑定结果和绑定凭证() {
visitorAuth11();
ThreadSleepUtils.sleep(2000);
......@@ -288,7 +370,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "用户K给用户H助力", priority = 20)
@Test(description = "用户K给用户H助力", priority = 23)
public void 用户K给用户H助力() {
visitorAuth11();
Map<String, Object> infoParam = new HashMap<>();
......@@ -304,7 +386,7 @@ public class Treasure implements Authorization {
@Test(description = "访客L邀请关系绑定", priority = 21)
@Test(description = "访客L邀请关系绑定", priority = 24)
public void 访客L邀请关系绑定() {
visitorAuth12();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -316,7 +398,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客L获取绑定结果和绑定凭证", priority = 22)
@Test(description = "访客L获取绑定结果和绑定凭证", priority = 25)
public void 访客L获取绑定结果和绑定凭证() {
visitorAuth12();
ThreadSleepUtils.sleep(2000);
......@@ -328,7 +410,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "用户L给用户H助力", priority = 23)
@Test(description = "用户L给用户H助力", priority = 26)
public void 用户L给用户H助力() {
visitorAuth12();
Map<String, Object> infoParam = new HashMap<>();
......@@ -344,7 +426,7 @@ public class Treasure implements Authorization {
@Test(description = "访客M邀请关系绑定", priority = 24)
@Test(description = "访客M邀请关系绑定", priority = 27)
public void 访客M邀请关系绑定() {
visitorAuth13();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -356,7 +438,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客M获取绑定结果和绑定凭证", priority = 25)
@Test(description = "访客M获取绑定结果和绑定凭证", priority = 28)
public void 访客M获取绑定结果和绑定凭证() {
visitorAuth13();
ThreadSleepUtils.sleep(2000);
......@@ -368,7 +450,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "用户M给用户H助力", priority = 26)
@Test(description = "用户M给用户H助力", priority = 29)
public void 用户M给用户H助力() {
visitorAuth13();
Map<String, Object> infoParam = new HashMap<>();
......@@ -383,7 +465,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客P邀请关系绑定", priority = 27)
@Test(description = "访客P邀请关系绑定", priority = 30)
public void 访客P邀请关系绑定() {
visitorAuth16();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -395,7 +477,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客P获取绑定结果和绑定凭证", priority = 28)
@Test(description = "访客P获取绑定结果和绑定凭证", priority = 31)
public void 访客P获取绑定结果和绑定凭证() {
visitorAuth16();
ThreadSleepUtils.sleep(2000);
......@@ -407,7 +489,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "用户P给用户H助力", priority = 29)
@Test(description = "用户P给用户H助力", priority = 32)
public void 用户P给用户H助力() {
visitorAuth16();
Map<String, Object> infoParam = new HashMap<>();
......@@ -422,7 +504,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客Q邀请关系绑定", priority = 30)
@Test(description = "访客Q邀请关系绑定", priority = 33)
public void 访客Q邀请关系绑定() {
visitorAuth17();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -434,7 +516,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客Q获取绑定结果和绑定凭证", priority = 31)
@Test(description = "访客Q获取绑定结果和绑定凭证", priority = 34)
public void 访客Q获取绑定结果和绑定凭证() {
visitorAuth17();
ThreadSleepUtils.sleep(2000);
......@@ -446,7 +528,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "用户Q给用户H助力", priority = 32)
@Test(description = "用户Q给用户H助力", priority = 35)
public void 用户Q给用户H助力() {
visitorAuth17();
Map<String, Object> infoParam = new HashMap<>();
......@@ -461,7 +543,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H查询第1次参与详情的进度显示", priority = 33)
@Test(description = "访客H查询第1次参与详情的进度显示", priority = 36)
public void 访客H查询第1次参与详情的进度显示() {
visitorAuth9();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -475,7 +557,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H开启第1轮宝箱获得实物", priority = 34)
@Test(description = "访客H开启第1轮宝箱获得实物", priority = 37)
public void 访客H开启第1轮宝箱获得实物() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -490,7 +572,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H第1轮开宝箱参与详情", priority = 35)
@Test(description = "访客H第1轮开宝箱参与详情", priority = 38)
public void 访客H1轮开宝箱参与详情() {
visitorAuth9();
ThreadSleepUtils.sleep(2000);
......@@ -510,7 +592,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H第2次参与详情的进度显示", priority = 36)
@Test(description = "访客H第2次参与详情的进度显示", priority = 39)
public void 访客H2次参与详情的进度显示() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -524,7 +606,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H开启第2轮宝箱降级抽奖码", priority = 37)
@Test(description = "访客H开启第2轮宝箱降级抽奖码", priority = 40)
public void 访客H开启第2轮宝箱降级抽奖码() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -540,7 +622,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H第2轮开宝箱参与详情", priority = 38)
@Test(description = "访客H第2轮开宝箱参与详情", priority = 41)
public void 访客H2轮开宝箱参与详情() {
visitorAuth9();
ThreadSleepUtils.sleep(2000);
......@@ -560,7 +642,7 @@ public class Treasure implements Authorization {
}
@Test(description = "宝箱实物中奖无限制", priority = 39)
@Test(description = "宝箱实物中奖无限制", priority = 42)
public void 宝箱实物中奖无限制() {
JSONObject treasureAward = treasureConf.getJSONObject("treasureAward");
treasureAward.put("winLimitCount",-1);//-1无限制,1限制1次
......@@ -571,7 +653,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H第3次参与详情的进度显示", priority = 40)
@Test(description = "访客H第3次参与详情的进度显示", priority = 43)
public void 访客H3次参与详情的进度显示() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -584,7 +666,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(invitationNum>0, network.message(InfoParam, BasicConfig.MANAGER_treasureUserInfo, "查询第3次参与详情进度失败", response.body().asString()));
}
@Test(description = "访客H开启第3轮宝箱获得实物", priority = 41)
@Test(description = "访客H开启第3轮宝箱获得实物", priority = 44)
public void 访客H开启第3轮宝箱获得实物() {
visitorAuth9();
ThreadSleepUtils.sleep(3000);
......@@ -599,7 +681,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H第3轮开宝箱参与详情", priority = 42)
@Test(description = "访客H第3轮开宝箱参与详情", priority = 45)
public void 访客H3轮开宝箱参与详情() {
visitorAuth9();
ThreadSleepUtils.sleep(2000);
......@@ -619,7 +701,7 @@ public class Treasure implements Authorization {
//B 用户邀请
@Test(description = "访客M获取分享加密串", priority = 43)
@Test(description = "访客M获取分享加密串", priority = 46)
public void 访客M获取分享加密串() {
visitorAuth13();
Map<String, Object> signParam = new HashMap<>();
......@@ -632,7 +714,7 @@ public class Treasure implements Authorization {
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "访客M与访客N邀请关系绑定", priority = 44)
@Test(description = "访客M与访客N邀请关系绑定", priority = 47)
public void 访客M与访客N邀请关系绑定() {
visitorAuth14();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -644,7 +726,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客N获取绑定结果和绑定凭证", priority = 45)
@Test(description = "访客N获取绑定结果和绑定凭证", priority = 48)
public void 访客N获取绑定结果和绑定凭证() {
visitorAuth14();
ThreadSleepUtils.sleep(2000);
......@@ -657,7 +739,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客N给访客M助力", priority = 46)
@Test(description = "访客N给访客M助力", priority = 49)
public void 访客N给访客M助力() {
visitorAuth14();
Map<String, Object> infoParam = new HashMap<>();
......@@ -671,7 +753,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(data, network.message(infoParam, BasicConfig.MOBILE_assist, "访客N给访客M助力失败", response.body().asString()));
}
@Test(description = "访客M与访客R邀请关系绑定", priority = 47)
@Test(description = "访客M与访客R邀请关系绑定", priority = 50)
public void 访客M与访客R邀请关系绑定() {
visitorAuth18();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -683,7 +765,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客R获取绑定结果和绑定凭证", priority = 48)
@Test(description = "访客R获取绑定结果和绑定凭证", priority = 51)
public void 访客R获取绑定结果和绑定凭证() {
visitorAuth18();
ThreadSleepUtils.sleep(2000);
......@@ -695,7 +777,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客R给访客M助力", priority = 49)
@Test(description = "访客R给访客M助力", priority = 52)
public void 访客R给访客M助力() {
visitorAuth18();
Map<String, Object> infoParam = new HashMap<>();
......@@ -711,7 +793,7 @@ public class Treasure implements Authorization {
//验证实物奖品数量是否会超发
@Test(description = "访客H第4次参与详情的进度显示", priority = 50)
@Test(description = "访客H第4次参与详情的进度显示", priority = 53)
public void 访客H4次参与详情的进度显示() {
visitorAuth9();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -724,7 +806,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客M第1次参与详情的进度显示", priority = 51)
@Test(description = "访客M第1次参与详情的进度显示", priority = 54)
public void 访客M1次参与详情的进度显示() {
visitorAuth13();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -738,7 +820,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H和访客M开启第4轮宝箱实物是否超发", priority = 52)
@Test(description = "访客H和访客M开启第4轮宝箱实物是否超发", priority = 55)
public void 访客H和访客M开启第4轮宝箱实物是否超发() {
ThreadSleepUtils.sleep(3000);
Map<String, Object> openParam = new HashMap<>();
......@@ -762,7 +844,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H和访客M第4轮开宝箱参与详情", priority = 53)
@Test(description = "访客H和访客M第4轮开宝箱参与详情", priority = 56)
public void 访客H和访客M4轮开宝箱参与详情() {
Map<String, Object> infoParam = new HashMap<>();
infoParam.put("treasureConfId", ConfId);
......@@ -795,7 +877,7 @@ public class Treasure implements Authorization {
}
@Test(description = "宝箱红包限制1次", priority = 54)
@Test(description = "宝箱红包限制1次", priority = 57)
public void 宝箱红包限制1() {
JSONObject treasureRed = treasureConf.getJSONObject("treasureRed");
......@@ -810,7 +892,7 @@ public class Treasure implements Authorization {
}
//访客A领取红包
@Test(description = "访客H第5次参与详情的进度显示", priority = 55)
@Test(description = "访客H第5次参与详情的进度显示", priority = 58)
public void 访客H5次参与详情的进度显示() {
visitorAuth9();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -822,7 +904,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(invitationNum>0, network.message(InfoParam, BasicConfig.MANAGER_treasureUserInfo, "查询第5次参与详情进度失败", response.body().asString()));
}
@Test(description = "访客H开启第5次宝箱获得红包", priority = 56)
@Test(description = "访客H开启第5次宝箱获得红包", priority = 59)
public void 访客H开启第5次宝箱获得红包() {
visitorAuth9();
ThreadSleepUtils.sleep(15000);
......@@ -838,7 +920,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H第5轮开宝箱参与详情", priority = 57)
@Test(description = "访客H第5轮开宝箱参与详情", priority = 60)
public void 访客H5轮开宝箱参与详情() {
visitorAuth9();
ThreadSleepUtils.sleep(2000);
......@@ -858,7 +940,7 @@ public class Treasure implements Authorization {
//访客A降级抽奖码
@Test(description = "访客H第6次参与详情的进度显示", priority = 58)
@Test(description = "访客H第6次参与详情的进度显示", priority = 61)
public void 访客H6次参与详情的进度显示() {
visitorAuth9();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -870,7 +952,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(invitationNum>0, network.message(InfoParam, BasicConfig.MANAGER_treasureUserInfo, "查询第6次参与详情进度失败", response.body().asString()));
}
@Test(description = "访客H开启第6次宝箱降级抽奖码", priority = 59)
@Test(description = "访客H开启第6次宝箱降级抽奖码", priority = 62)
public void 访客H开启第6次宝箱降级抽奖码() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -885,7 +967,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H第6轮开宝箱参与详情", priority = 60)
@Test(description = "访客H第6轮开宝箱参与详情", priority = 63)
public void 访客H6轮开宝箱参与详情() {
visitorAuth9();
ThreadSleepUtils.sleep(2000);
......@@ -904,7 +986,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客N获取分享加密串", priority = 61)
@Test(description = "访客N获取分享加密串", priority = 64)
public void 访客N获取分享加密串() {
visitorAuth14();
Map<String, Object> signParam = new HashMap<>();
......@@ -918,7 +1000,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客N与访客O邀请关系绑定", priority = 62)
@Test(description = "访客N与访客O邀请关系绑定", priority = 65)
public void 访客N与访客O邀请关系绑定() {
visitorAuth15();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -930,7 +1012,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客O获取绑定结果和绑定凭证", priority = 63)
@Test(description = "访客O获取绑定结果和绑定凭证", priority = 66)
public void 访客O获取绑定结果和绑定凭证() {
visitorAuth15();
ThreadSleepUtils.sleep(2000);
......@@ -942,7 +1024,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客O给访客N助力", priority = 64)
@Test(description = "访客O给访客N助力", priority = 67)
public void 访客O给访客N助力() {
visitorAuth15();
Map<String, Object> infoParam = new HashMap<>();
......@@ -959,7 +1041,7 @@ public class Treasure implements Authorization {
//访客M和N同时抢红包
@Test(description = "访客M参与详情的进度显示", priority = 65)
@Test(description = "访客M参与详情的进度显示", priority = 68)
public void 访客M参与详情的进度显示() {
visitorAuth13();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -972,7 +1054,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客N参与详情的进度显示", priority = 66)
@Test(description = "访客N参与详情的进度显示", priority = 69)
public void 访客N参与详情的进度显示() {
visitorAuth14();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -986,7 +1068,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客M和访客N同时开启宝箱验证红包是否超发", priority = 67)
@Test(description = "访客M和访客N同时开启宝箱验证红包是否超发", priority = 70)
public void 访客M和访客N同时开启宝箱验证红包是否超发() {
Map<String, Object> openParam = new HashMap<>();
openParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -1010,7 +1092,7 @@ public class Treasure implements Authorization {
@Test(description = "访客M和访客N第7轮开宝箱参与详情", priority = 68)
@Test(description = "访客M和访客N第7轮开宝箱参与详情", priority = 71)
public void 访客M和访客N7轮开宝箱参与详情() {
ThreadSleepUtils.sleep(3000);
Map<String, Object> infoParam = new HashMap<>();
......@@ -1041,7 +1123,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H宝箱领取记录", priority = 69)
@Test(description = "访客H宝箱领取记录", priority = 72)
public void 访客H宝箱领取记录() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -1058,7 +1140,7 @@ public class Treasure implements Authorization {
/**
* 添加代理人绑定关系
*/
@Test(description = "代理人绑定", priority = 70)
@Test(description = "代理人绑定", priority = 73)
public void 代理人绑定() {
agentAuth();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -1068,10 +1150,4 @@ public class Treasure implements Authorization {
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.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