Commit 62339b22 authored by 龚小红's avatar 龚小红

修复上传链接ICON位置校验、公司专区数量校验

parent 62c668f2
......@@ -39,6 +39,7 @@ public class HomePage implements Authorization {
public String activityScid; //测评对应的scid
public long articleId; //解密后的的文章id
public int totalCount; //视频数量
public int companyCount; //公司专区数量
@BeforeClass
public void setUp() {
......@@ -378,8 +379,8 @@ public class HomePage implements Authorization {
params.put("pageIndex",1);
params.put("source",1);
Response listRes = network.getResponse(params,HOME_companyGetContentList);
int totalCount = listRes.jsonPath().getInt("data.totalCount");
Assert.assertEquals(totalCount,2,network.message(params,HOME_companyGetContentList,"获取公司专区内容列表数据错误",listRes.body().asString()));
companyCount = listRes.jsonPath().getInt("data.totalCount");
Assert.assertTrue(companyCount>0,network.message(params,HOME_companyGetContentList,"获取公司专区内容列表数据错误",listRes.body().asString()));
}
//管理后台删除文章
......@@ -414,8 +415,8 @@ public class HomePage implements Authorization {
paramsList.put("pageIndex",1);
paramsList.put("source",1);
Response dataRes = network.getResponse(paramsList,HOME_companyGetContentList);
int totalCount = dataRes.jsonPath().getInt("data.totalCount");
Assert.assertEquals(totalCount,1,network.message(paramsList,HOME_companyGetContentList,"获取公司专区内容列表数据错误",dataRes.body().asString()));
int totalCountNew = dataRes.jsonPath().getInt("data.totalCount");
Assert.assertEquals(totalCountNew,companyCount-1,network.message(paramsList,HOME_companyGetContentList,"获取公司专区内容列表数据错误",dataRes.body().asString()));
}
......
......@@ -176,6 +176,7 @@ public class RecommendMaterial implements Authorization {
params.put("insuranceTitle", "2222");
params.put("insuranceType", 1);
params.put("insureAmount", 1000);
params.put("insuranceLink", "https://www.baidu.com");
Response response = network.postResponse(params, GRASS_editInsurance);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, GRASS_editInsurance, "修改赠险信息失败", response.body().asString()));
......@@ -197,6 +198,7 @@ public class RecommendMaterial implements Authorization {
@Test(description = "代理人_赠险管理_删除赠险", priority = 13)
public void 代理人_赠险管理_删除赠险() {
agentTku();
Map<String, Object> params = new HashMap<>();
params.put("id", inId);
Response response = network.getResponse(params, GRASS_delInsurance);
......
......@@ -25,19 +25,12 @@ public class Upload implements Authorization {
BaseUtils.ssoLogin();
}
// @Test(description="会员判断",priority = 1)
// public void 会员判断() throws IOException{
// Response response = network.getResponse(ISVIPSUBSCRIBE);
// boolean isVip = response.jsonPath().getBoolean("data.vip");
// Assert.assertTrue(true, network.message(ISVIPSUBSCRIBE,"会员判断错误",response.body().asString()));
// }
@Test(description = "获取首页上传链接配置",priority = 1)
public void 上传链接配置(){
Map<String,Object> params = new HashMap<>();
params.put("type",1);
Response response = network.getResponse(params,Daily_getHomeConf);
Object resourceLocatorName = response.jsonPath().getJsonObject("data.get(5).resourceLocatorName");
Object resourceLocatorName = response.jsonPath().getJsonObject("data.get(4).resourceLocatorName");
Assert.assertEquals(resourceLocatorName,"上传链接", network.message(params,Daily_getHomeConf,"获取上传链接配置失败",response.body().asString()));
}
@Test(description = "爬虫支持的域名",priority = 2)
......
......@@ -65,6 +65,7 @@ public class SaveLive implements Authorization {
Params.put("preWindowUrl","https://yun.dui88.com/kjy/image/20210629/1624949098093.png");
Params.put("distributionType", 0);
Params.put("existSeriesPoster", 0);
Params.put("followPushState", 0);
List<ProvinceCityCodeList> provinceCityCode = new ArrayList<>();
ProvinceCityCodeList save = new ProvinceCityCodeList();
save.setProvinceCode(110000);
......@@ -2241,7 +2242,6 @@ public class SaveLive implements Authorization {
Params.put("lotteryNum",3);
Params.put("lotteryDesc","这是亲友抽奖券的说明");
Response response = network.postResponse(Params, BasicConfig.MANAGER_relativeLottery);
System.out.println(response.body().asString());
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_relativeLottery, "保存亲友券配置失败", 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