Commit 13d0000b authored by 龚小红's avatar 龚小红

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

修改时长宝箱的校验条件

See merge request test-group/kejiji!150
parents 1eb2dfd2 4d2d9dc5
......@@ -104,11 +104,9 @@ public class TreasureTime implements Authorization {
params.put("treasureConfId",this.treasureConfId.get(0).getTreasureConfId());
Response response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Integer treasureType=response.jsonPath().getInt("data.treasureType");
System.out.println(treasureType);
Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
Integer receiveStatus=response.jsonPath().getInt("data.receiveStatus");
System.out.println(receiveStatus);
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
}
......@@ -127,14 +125,12 @@ public class TreasureTime implements Authorization {
ThreadSleepUtils.sleep(1000);
Response response = network.postResponse(params, BasicConfig.MOBILE_finish);
boolean data=response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_finish, "访客H获取宝箱参与情况失败", response.body().asString()));
visitorAuth9();
ThreadSleepUtils.sleep(1000);
Response response1 = network.postResponse(params, BasicConfig.MOBILE_finish);
boolean data1=response.jsonPath().getBoolean("data");
System.out.println(data1);
Assert.assertTrue(data1, network.message(params, BasicConfig.MOBILE_finish, "访客H获取宝箱参与情况失败", response1.body().asString()));
//红包发完降级抽奖码
......@@ -142,7 +138,6 @@ public class TreasureTime implements Authorization {
ThreadSleepUtils.sleep(1000);
Response response2 = network.postResponse(params, BasicConfig.MOBILE_finish);
boolean data2=response.jsonPath().getBoolean("data");
System.out.println(data2);
Assert.assertTrue(data2, network.message(params, BasicConfig.MOBILE_finish, "访客H获取宝箱参与情况失败", response2.body().asString()));
}
......@@ -159,7 +154,6 @@ public class TreasureTime implements Authorization {
Response response = network.getResponse(params, BasicConfig.MOBILE_joinDetail1);
List<CondDetail> treasureList = JsonUtil.parseResponseToListBean(response, CondDetail.class,"condDetail");
boolean finishFlag=treasureList.get(1).isFinishFlag();
System.out.println(finishFlag);
Assert.assertTrue(finishFlag, network.message(params, BasicConfig.MOBILE_joinDetail1, "访客H获取第2个宝箱参与情况失败", response.body().asString()));
visitorAuth9();
......@@ -167,7 +161,6 @@ public class TreasureTime implements Authorization {
Response response1 = network.getResponse(params, BasicConfig.MOBILE_joinDetail1);
List<CondDetail> treasureList1 = JsonUtil.parseResponseToListBean(response1, CondDetail.class,"condDetail");
boolean finishFlag1=treasureList1.get(1).isFinishFlag();
System.out.println(finishFlag1);
Assert.assertTrue(finishFlag1, network.message(params, BasicConfig.MOBILE_joinDetail1, "访客H获取第2个宝箱参与情况失败", response.body().asString()));
//红包发完降级抽奖码
......@@ -176,7 +169,6 @@ public class TreasureTime implements Authorization {
Response response2 = network.getResponse(params, BasicConfig.MOBILE_joinDetail1);
List<CondDetail> treasureList2 = JsonUtil.parseResponseToListBean(response2, CondDetail.class,"condDetail");
boolean finishFlag2=treasureList2.get(1).isFinishFlag();
System.out.println(finishFlag2);
Assert.assertTrue(finishFlag2, network.message(params, BasicConfig.MOBILE_joinDetail1, "访客H获取第2个宝箱参与情况失败", response.body().asString()));
......@@ -224,25 +216,27 @@ public class TreasureTime implements Authorization {
visitorAuth7();
ThreadSleepUtils.sleep(1000);
Response response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data=response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response.body().asString()));
Integer treasureType=response.jsonPath().getInt("data.treasureType");
Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
Integer receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
visitorAuth9();
ThreadSleepUtils.sleep(1000);
Response response1 = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data1=response1.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data1, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response1.body().asString()));
response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
treasureType=response.jsonPath().getInt("data.treasureType");
Assert.assertTrue(treasureType==2, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
//红包发完降级抽奖码
visitorAuth13();
ThreadSleepUtils.sleep(1000);
Response response2 = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data2=response2.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data2, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response2.body().asString()));
response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
treasureType=response.jsonPath().getInt("data.treasureType");
Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
}
......@@ -358,24 +352,27 @@ public class TreasureTime implements Authorization {
visitorAuth7();
ThreadSleepUtils.sleep(1000);
Response response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data=response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response.body().asString()));
Integer treasureType=response.jsonPath().getInt("data.treasureType");
Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
Integer receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
visitorAuth9();
ThreadSleepUtils.sleep(1000);
Response response1 = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data1=response1.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data1, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response1.body().asString()));
response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
treasureType=response.jsonPath().getInt("data.treasureType");
Assert.assertTrue(treasureType==3, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
//红包发完降级抽奖码
visitorAuth13();
ThreadSleepUtils.sleep(1000);
Response response2 = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data2=response2.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data2, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response2.body().asString()));
response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
treasureType=response.jsonPath().getInt("data.treasureType");
Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
}
......@@ -441,13 +438,5 @@ public class TreasureTime implements Authorization {
int receiveStatus=response.jsonPath().getInt("data.receiveStatus");
System.out.println(receiveStatus);
Assert.assertTrue(receiveStatus==2,network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.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