Commit 9f556c37 authored by 龚小红's avatar 龚小红

Merge branch '20210813_gxh' into 'master'

增加了看直播攒现金的删除任务以及权益下架的测试用例

See merge request test-group/kejiji!98
parents 99aba342 401036fe
package com.kjj.bean.manager;
import lombok.Data;
@Data
public class Material {
private long id;
private int agentReceiveType;
public Material(long l, int i) {
this.id = l;
this.agentReceiveType = i;
}
}
......@@ -7,5 +7,5 @@ public class RedList {
private Integer id;
private long bizConfId;
private int taskType;
}
......@@ -25,6 +25,7 @@ public class SaveLive implements Authorization {
public String EncodeLiveID;
public long welfareConfId;
private Integer taskId;
public List<RedList> redId;
@BeforeClass
public void setUp() {BaseUtils.ssoLogin(); }
......@@ -154,19 +155,19 @@ public class SaveLive implements Authorization {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", liveID);
List<Long> ids = new ArrayList<>();
ids.add(355L);
ids.add(356L);
ids.add(357L);
ids.add(358L);
ids.add(359L);
ids.add(652L);
ids.add(960L);
Params.put("ids", ids);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveAndUpdate_3);
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(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveAndUpdate_3, "产品资料配置失败", response.body().asString()));
System.out.println(response.body().asString());
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveAndUpdate_8, "产品资料配置失败", response.body().asString()));
}
@Test(description = "问卷", priority = 8)
......@@ -1553,7 +1554,6 @@ public class SaveLive implements Authorization {
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_timeRed, "添加第1轮赞现金任务失败", response.body().asString()));
}
public List<RedList> redId;
@Test(description = "查询第1轮红包配置列表", priority = 79)
public void 查询第1轮红包配置列表() {
Map<String, Object> Params = new HashMap<>();
......@@ -2286,7 +2286,58 @@ public class SaveLive implements Authorization {
}
@Test(description = "保存第5轮和第6轮配置红包", priority = 122)
public void 保存第5轮和第6轮配置红包() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("viewTime",3);
Params.put("rewardAmount",100);
Params.put("bizConfId",this.bizConfId.get(2).getBizConfId());
Params.put("taskType",3);
Params.put("taskName","图文");
Params.put("authOpen",0);
Response response = network.postResponse(Params, BasicConfig.MANAGER_TimeRedSave);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_TimeRedSave, "保存第5轮配置红包失败", response.body().asString()));
Params.put("bizConfId",this.bizConfId.get(3).getBizConfId());
response = network.postResponse(Params, BasicConfig.MANAGER_TimeRedSave);
data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_TimeRedSave, "保存第6轮配置红包失败", response.body().asString()));
}
@Test(description = "查询时长红包配置列表", priority = 123)
public void 查询时长红包配置列表() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("pageIndex",1);
Params.put("pageSize",20);
Response response = network.getResponse(Params, BasicConfig.MANAGER_timeRedList);
List<RedList> list = JsonUtil.parseResponseToPageBean(response,RedList.class);
System.out.println(list);
this.redId=list;
Assert.assertEquals(list.size(), 6,network.message(Params, BasicConfig.MANAGER_timeRedList, "查询时长红包配置列表失败", response.body().asString()));
}
@Test(description = "查询第5轮和第6轮时长红包详情", priority = 124)
public void 查询第5轮和第6轮时长红包详情() {
Map<String, Object> Params = new HashMap<>();
Params.put("id",this.redId.get(4).getId() );
Response response = network.getResponse(Params, BasicConfig.MANAGER_otherDetail);
Object data =response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_otherDetail, "查询第5轮时长红包详情失败", response.body().asString()));
Params.put("id",this.redId.get(5).getId() );
response = network.getResponse(Params, BasicConfig.MANAGER_otherDetail);
data =response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_otherDetail, "查询第6轮时长红包详情失败", response.body().asString()));
}
......
......@@ -172,6 +172,7 @@ public class BasicConfig {
public static final String ANCHOR_code = MOBILE_HOST + "/kjy/live/time/red/code";
public static final String ANCHOR_state = MOBILE_HOST + "/kjy/live/time/red/code/state";
public static final String ANCHOR_tasks = MOBILE_HOST + "/kjy/live/time/red/tasks";
public static final String MANAGER_deleteTask = MANAGER_HOST + "/kjy/manager/live/time/red/deleteTask";
// *************** 成功案例库 ***************
public static final String MANAGER_caseTemp = MANAGER_HOST + "/kjy/manager/live/caseTemp/list";
......@@ -350,6 +351,7 @@ public class BasicConfig {
public static final String MANAGER_rewardList = MANAGER_HOST + "/kjy/manager/live/ques/reward/list";
public static final String MANAGER_delete = MANAGER_HOST + "/kjy/manager/live/ques/reward/delete";
public static final String MANAGER_update = MANAGER_HOST + "/kjy/manager/live/ques/reward/update";
public static final String MANAGER_saveAndUpdate_8 = MANAGER_HOST + "/kjy/manager/live/resource/pre/conf/saveOrUpdate4Resource";
//定时投票
public static final String MANAGER_timedChoice = MANAGER_HOST + "/kjy/manager/live/timedChoice/getList";
public static final String MANAGER_saveTimedChoice = MANAGER_HOST + "/kjy/manager/live/timedChoice/saveOrUpdate";
......
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