Commit 4f800dca authored by 龚小红's avatar 龚小红

修改客户数量、视频列表数量校验并增加秒杀资格字段

parent c66024ac
......@@ -38,6 +38,7 @@ public class HomePage implements Authorization {
public String visitId; //用户的visitId
public String activityScid; //测评对应的scid
public long articleId; //解密后的的文章id
public int totalCount; //视频数量
@BeforeClass
public void setUp() {
......@@ -289,8 +290,8 @@ public class HomePage implements Authorization {
params.put("secondTagId",724); //二级标签
params.put("contentType","video");
Response response = network.getResponse(params,HOME_getContentList);
Object obj = response.jsonPath().getJsonObject("data.totalCount");
Assert.assertEquals(obj,3,network.message(params,HOME_getContentList,"获取首页视频列表失败",response.body().asString()));
totalCount = response.jsonPath().getInt("data.totalCount");
Assert.assertTrue(totalCount>0,network.message(params,HOME_getContentList,"获取首页视频列表失败",response.body().asString()));
}
//验证视频是否下架成功
......@@ -313,8 +314,8 @@ public class HomePage implements Authorization {
params.put("secondTagId",724);
params.put("contentType","video");
Response response = network.getResponse(params,HOME_getContentList);
Object obj = response.jsonPath().getJsonObject("data.totalCount");
Assert.assertEquals(obj,2,network.message(params,HOME_getContentList,"获取首页视频列表失败",response.body().asString()));
int obj = response.jsonPath().getInt("data.totalCount");
Assert.assertEquals(obj,totalCount-1,network.message(params,HOME_getContentList,"获取首页视频列表失败",response.body().asString()));
}
//管理后台新增公司专区内容
......
......@@ -150,7 +150,7 @@ public class GameLottery implements Authorization {
//获取客户列表
Map<String, Object> params = new HashMap<String, Object>();
params.put("pageIndex",1);
params.put("pageSize",20);
params.put("pageSize",50);
params.put("visitorNickname","");
Response response = network.getResponse(params, LOTTERRY_customerList);
boolean success = response.jsonPath().getBoolean("success");
......
......@@ -479,8 +479,6 @@ public class Answer implements Authorization {
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("quesConfId",this.quesConfId.get(1).getQuesConfId() );
// params.put("liveId", "Kj21NTI3ODM");
// params.put("quesConfId","Kj21NzY1MTE");
Response response = network.getResponse(params, BasicConfig.MOBILE_QuesParticipateInfo);
boolean result=response.jsonPath().getBoolean("data.result");
System.out.println(response.body().asString());
......
......@@ -1206,7 +1206,7 @@ public class Lottery implements Authorization {
Response hasEndResB = network.getResponse(hasEndParam, BasicConfig.USER_result);
boolean dataB = getDataLottery(hasEndResB);
String responseBody = "A=" + hasEndResA.body().asString() + ", B=" + hasEndResB.body().asString();
Assert.assertTrue(dataA ||dataB || dataC, network.message(hasEndParam, BasicConfig.USER_result, "访客未中奖", responseBody));
Assert.assertTrue(dataA && dataB && dataC, network.message(hasEndParam, BasicConfig.USER_result, "访客未中奖", responseBody));
}
......
......@@ -47,6 +47,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar.put("goodsAmount", 1); // 1 == 0.01
secKillAddPar.put("interactNum", 3);
secKillAddPar.put("ableAgent", 0); // 代理人不可参与
secKillAddPar.put("isNeedQualified", 0); // 不需要秒杀资格
secKillAddPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response secKillAddRes = network.postResponse(secKillAddPar, BasicConfig.MANAGER_secondKillSave);
try{
......@@ -65,6 +66,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar.put("goodsAmount", 1); // 1 == 0.01
secKillAddPar.put("interactNum", 3);
secKillAddPar.put("ableAgent", 0);
secKillAddPar.put("isNeedQualified", 0); // 不需要秒杀资格
secKillAddPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response secKillAddRes;
boolean data;
......@@ -124,6 +126,7 @@ public class ConfSecondKill implements Authorization {
secKillUpdatePar.put("interactNum", 1);
secKillUpdatePar.put("id", newSecKillId);
secKillUpdatePar.put("ableAgent", 0);
secKillUpdatePar.put("isNeedQualified", 0); // 不需要秒杀资格
Response secKillUpdateRes = network.postResponse(secKillUpdatePar, BasicConfig.MANAGER_secondKillUpdate);
try{
boolean data = secKillUpdateRes.jsonPath().getBoolean("data");
......@@ -188,6 +191,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar.put("goodsAmount", 5); // 1 == 0.01
secKillAddPar.put("interactNum", 3);
secKillAddPar.put("ableAgent", 0); // 代理人不可参与
secKillAddPar.put("isNeedQualified", 0); // 不需要秒杀资格
secKillAddPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response secKillAddRes = network.postResponse(secKillAddPar, BasicConfig.ANCHOR_secondKillSave);
try {
......@@ -206,6 +210,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar.put("goodsAmount", 1); // 1 == 0.01
secKillAddPar.put("interactNum", 1);
secKillAddPar.put("ableAgent", 1); // 代理人可参与
secKillAddPar.put("isNeedQualified", 0); // 不需要秒杀资格
secKillAddPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response secKillAddRes = network.postResponse(secKillAddPar, BasicConfig.ANCHOR_secondKillSave);
try {
......@@ -224,6 +229,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar.put("goodsAmount", 0); // 1 == 0.01
secKillAddPar.put("interactNum", 1);
secKillAddPar.put("ableAgent", 1); // 代理人可参与
secKillAddPar.put("isNeedQualified", 0); // 不需要秒杀资格
secKillAddPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response secKillAddRes = network.postResponse(secKillAddPar, BasicConfig.ANCHOR_secondKillSave);
try {
......@@ -265,6 +271,7 @@ public class ConfSecondKill implements Authorization {
secKillUpdatePar.put("interactNum", 3);
secKillUpdatePar.put("id", skIdFirst);
secKillUpdatePar.put("ableAgent", 0);
secKillUpdatePar.put("isNeedQualified", 0); // 不需要秒杀资格
Response secKillUpdateRes = network.postResponse(secKillUpdatePar, BasicConfig.ANCHOR_secondKillUpdate);
try {
boolean data = secKillUpdateRes.jsonPath().getBoolean("data");
......
......@@ -39,6 +39,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar.put("interactNum", 3);
secKillUpdatePar.put("id", ConfSecondKill.skIdFirst);
secKillUpdatePar.put("ableAgent", 1);
secKillUpdatePar.put("isNeedQualified", 0); // 不需要秒杀资格
Response secKillUpdateRes = network.postResponse(secKillUpdatePar, BasicConfig.ANCHOR_secondKillUpdate);
System.out.println(secKillUpdateRes.body().asString());
}
......@@ -51,6 +52,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar.put("interactNum", 3);
secKillUpdatePar.put("id", ConfSecondKill.skIdFirst);
secKillUpdatePar.put("ableAgent", 1);
secKillUpdatePar.put("isNeedQualified", 0); // 不需要秒杀资格
Response secKillUpdateRes = network.postResponse(secKillUpdatePar, BasicConfig.ANCHOR_secondKillUpdate);
System.out.println(secKillUpdateRes.body().asString());
}
......@@ -63,6 +65,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar.put("interactNum", 1);
secKillUpdatePar.put("id", ConfSecondKill.skIdFirst);
secKillUpdatePar.put("ableAgent", 1);
secKillUpdatePar.put("isNeedQualified", 0); // 不需要秒杀资格
Response secKillUpdateRes = network.postResponse(secKillUpdatePar, BasicConfig.ANCHOR_secondKillUpdate);
System.out.println(secKillUpdateRes.body().asString());
}
......@@ -75,6 +78,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar.put("interactNum", 4);
secKillUpdatePar.put("id", ConfSecondKill.skIdFirst);
secKillUpdatePar.put("ableAgent", 1);
secKillUpdatePar.put("isNeedQualified", 0); // 不需要秒杀资格
Response secKillUpdateRes = network.postResponse(secKillUpdatePar, BasicConfig.ANCHOR_secondKillUpdate);
try {
boolean data = secKillUpdateRes.jsonPath().getBoolean("data");
......@@ -93,6 +97,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar.put("interactNum", 4);
secKillUpdatePar.put("id", ConfSecondKill.skIdFirst);
secKillUpdatePar.put("ableAgent", 0);
secKillUpdatePar.put("isNeedQualified", 0); // 不需要秒杀资格
Response secKillUpdateRes = network.postResponse(secKillUpdatePar, BasicConfig.ANCHOR_secondKillUpdate);
try {
boolean data = secKillUpdateRes.jsonPath().getBoolean("data");
......
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