Commit 07882ebb authored by xiamengchen's avatar xiamengchen

Merge branch 'master' into feat/202111111-xmc

# Conflicts:
#	src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
parents 34c11595 50848fcd
......@@ -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() {
......@@ -331,10 +332,17 @@ public class HomePage implements Authorization {
String infoDesc = response.jsonPath().getString("desc");
Assert.assertEquals(infoDesc,"OK",network.message(params,MANAGER_simpleInfo,"匹配内容失败",response.body().asString()));
//获取生效的公司专区素材id
params.clear();
response = network.getResponse(params,MANAGER_manage);
int index = response.jsonPath().getInt("data.list[2].parentTagList.size()")-1;
int tag = response.jsonPath().getJsonObject("data.list[2].parentTagList.get("+index+").id");
Assert.assertNotNull(tag,network.message(params,MANAGER_simpleInfo,"匹配内容失败",response.body().asString()));
//新增公司专区内容
Map<String,Object> addParams = new HashMap<>();
List list = new ArrayList();
list.add(589);
list.add(tag);
List tagList = new ArrayList();
tagList.add(list);
addParams.put("contentTag","");
......@@ -378,8 +386,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()));
}
//管理后台删除文章
......@@ -396,6 +404,7 @@ public class HomePage implements Authorization {
Object id = listRes.jsonPath().getJsonObject("data.list.get(0).id");
String desc = listRes.jsonPath().getString("desc");
Assert.assertEquals(desc,"OK",network.message(params,MANAGER_exclusiveItemPage,"获取id失败",listRes.body().asString()));
companyCount = listRes.jsonPath().getInt("data.list.size()");
//删除公司专区内容
Map<String,Object> delParams = new HashMap<>();
......@@ -414,8 +423,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,13 +25,6 @@ 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<>();
......
package com.kjj.cases.live.liveConfig;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.kjj.bean.answer.AddReward;
import com.kjj.bean.answer.AddWelfareConf;
import com.kjj.bean.answer.RewardList;
......@@ -12,7 +13,6 @@ import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.IdMakeUtil;
import com.kjj.utils.JsonUtil;
import com.kjj.utils.NetworkUtils;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.apache.commons.lang3.RandomUtils;
......
......@@ -1166,6 +1166,7 @@ public class BasicConfig {
public static final String MANAGER_exclusiveItemDel = MANAGER_HOST + "/kjy/manager/exclusiveItem/del";
public static final String MANAGER_searchCompany = MANAGER_HOST + "/kjy/manager/live/company/search";
public static final String MANAGER_liveList = MANAGER_HOST + "/kjy/manager/live/list";
public static final String MANAGER_manage = MANAGER_HOST + "/kjy/manager/tag/manage";
// 企业后台
public static final String MANAGER_corp_saveCorp = MANAGER_HOST + "/kjy/manager/corp/company/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