Commit 8c36baba authored by 龚小红's avatar 龚小红

Merge branch 'Feature/20211014-gxh' into 'master'

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

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