Commit ed4d8426 authored by 龚小红's avatar 龚小红

Merge branch '20210816_gxh' into 'master'

20210816 gxh

See merge request test-group/kejiji!99
parents 9f556c37 b2bc55f2
......@@ -352,57 +352,5 @@ public class LiveMaterial implements Authorization {
}
@Test(description = "秒薪测试", priority = 15)
public void 秒薪测试() {
Map<String, Object> testParam = new HashMap<>();
testParam.put("companyId", 101);
testParam.put("clueType", 1);
testParam.put("mainButtonTitle","领取门票");
testParam.put("resourcePicturesArr", Arrays.asList("https://yun.dui88.com/kjy/image/20210306/1615033326937.jpg"));
testParam.put("resourceImg", "https://yun.dui88.com/kjy/image/20210306/1615033315608.jpeg");
testParam.put("resourceTitle", "秒薪测试");
testParam.put("saleButtonTitle","saleButtonTitle");
testParam.put("testType", 1);
testParam.put("resourceButtonTitle", "我要报名");
testParam.put("tradeIntroducePictures", "https://yun.dui88.com/kjy/image/20210306/1615040918512.jpeg");
Response testRes = network.postResponse(testParam, BasicConfig.MANAGER_saveTest);
Object data = testRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(testParam, BasicConfig.MANAGER_saveTest, "新增秒薪失败", testRes.body().asString()));
}
@Test(description = "删除秒薪测试", priority = 16)
public void 删除秒薪测试() {
Map<String, Object> test1Param = new HashMap<>();
test1Param.put("companyId", 101);
test1Param.put("pageIndex", 1);
test1Param.put("pageSize", 1);
test1Param.put("resourceTypeList", 13);
Response test1Res = network.getResponse(test1Param, BasicConfig.MANAGER_resourceList);
WelfareListBean data1 = JsonUtil.parseResponseToBean(test1Res, WelfareListBean.class);
if (data1.getTotalCount() > 0) {
WelfareBean bean = data1.getList().get(0);
Assert.assertNotNull(bean, network.message(test1Param, BasicConfig.MANAGER_resourceList, "查询测试失败", test1Res.body().asString()));
int id = bean.getId();
Map<String, Object> delResourceParam = new HashMap<>();
delResourceParam.put("id", id);
Response delResourceRes = network.postResponse(delResourceParam, BasicConfig.MANAGER_delResource);
boolean data = delResourceRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(delResourceParam, BasicConfig.MANAGER_delResource, "删除测试失败", delResourceRes.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