Commit 1a3a8155 authored by 郭姣's avatar 郭姣

Merge branch 'master' into gifeature/2021071102

# Conflicts:
#	src/test/java/com/kjj/config/BasicConfig.java
#	src/test/wechatTestNG.xml
parents 683d053d 0ef38ccb
package com.kjj.cases.assistant;
import static com.kjj.config.BasicConfig.*;
import com.kjj.cases.admin.Authorization;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.ThreadSleepUtils;
import org.testng.Assert;
import org.testng.annotations.*;
import io.restassured.response.Response;
import java.io.IOException;
import java.lang.reflect.Array;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class DailyPaper implements Authorization {
public String contentId; //获取文章id
public String currentId; //获取发圈素材id
public int firstTagId;
public Object pId; //获取早晚安打开图片ID
public Object pUrl; //获取早晚安打开图片url
public String aUrl; //获取管理后台打卡图片
public String deleteId; //获取管理后台要删除的早安打卡图片的ID
@BeforeClass
public void setUp() {
BaseUtils.ssoLogin();
// 创建用户 并传到network里
AGENT_TKU = BaseUtils.createTku();
network.agentCookies.put("tku",AGENT_TKU);
//System.out.println("代理人tku:"+AGENT_TKU);
// 获取访客tku
VISITOR_TKU = BaseUtils.getTku(VISITOR_USERID);
//System.out.println("访客tku:"+VISITOR_TKU);
}
@Test (description = "今日早报_获取今日早报列表",priority = 1)
public void 代理人_今日早报_获取今日早报列表(){
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
// String dt = simpleDateFormat.format(new Date());
Map<String,Object> params = new HashMap<>();
params.put("dateDay","20201021");
Response response = network.getResponse(params,Daily_dailyList);
Object data = response.jsonPath().getJsonObject("data");
contentId = response.jsonPath().getJsonObject("data[0].dailyId");
System.out.println(contentId);
Assert.assertNotNull(data, network.message(params,Daily_dailyList,"获取今日早报列表失败",response.body().asString()));
}
@Test(description = "今日早报_今日早报转发",priority = 2)
public void 今日早报_今日早报转发(){
//获取今日早报scid
Map<String,Object> params = new HashMap<>();
params.put("contentId",contentId);
Response response = network.getResponse(params,GETSCID);
String data = response.jsonPath().getString("data");
System.out.println(data);
Assert.assertNotNull(data,network.message(params,GETSCID,"获取文章的scid失败",response.body().asString()));
//获取visitId
Map<String,Object> infoParams = new HashMap<>();
infoParams.put("scid",data);
infoParams.put("visitPath",0);
Response infoResponse = network.getResponse(infoParams,CONTENT_READ);
String visitId = infoResponse.jsonPath().getString("data.visitId");
System.out.println(visitId);
Assert.assertNotNull(visitId, network.message(params,CONTENT_READ,"访客记录查看素材失败",response.body().asString()));
//今日早报转发
Map<String,Object> infoParams2 = new HashMap<>();
infoParams2.put("scId",data);
infoParams2.put("visitId",visitId);
infoParams2.put("forwardType",1);
Response infoResponse2 = network.getResponse(infoParams2,FORWARD);
boolean reData = infoResponse2.jsonPath().getBoolean("data");
boolean success = infoResponse2.jsonPath().getBoolean("success");
Assert.assertTrue(reData,network.message(infoParams2,FORWARD,"今日早报转发失败",infoResponse2.body().asString()));
Assert.assertTrue(success,network.message(infoParams2,FORWARD,"今日早报转发失败",infoResponse2.body().asString()));
}
@Test(description = "今日早报_今日早报首页配置",priority = 3)
public void 今日早报_今日早报首页配置(){
Map<String,Object> params = new HashMap<>();
params.put("type",2);
Response response = network.getResponse(params,Daily_getHomeConf);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(params, Daily_getHomeConf,"获取今日早报配置失败",response.body().asString()));
}
@Test(description = "今日早报_发圈素材列表",priority = 4)
public void 今日早报_发圈素材列表(){
// 获取首页发圈素材列表
Response response = network.getResponse(HOME_GETHOMETIMELINECONTENT);
currentId = response.jsonPath().getString("data.materialVos[0].contentId");
Assert.assertNotNull(currentId,network.message(HOME_GETHOMETIMELINECONTENT,"获取首页发圈列表有误",response.body().asString()));
}
@Test(description="今日早报_发圈素材_是否首次进入",priority = 5)
public void 今日早报_发圈素材_是否首次进入(){
Response response = network.getResponse(FRIENDS_ISUSERFIRSTENTERANDCOLLECT);
String desc = response.jsonPath().getString("desc");
Assert.assertEquals(desc,"OK",network.message(FRIENDS_ISUSERFIRSTENTERANDCOLLECT,"是否首次进入和首次收藏发圈素材列表-接口有误",response.body().asString()));
}
@Test(description="今日早报_发圈素材标签列表",priority = 6)
public void 今日早报_发圈素材标签列表(){
Response response = network.getResponse(FRIENDS_GETMATERIALTAGS);
boolean hasList = response.jsonPath().getInt("data.size()") > 0;
int id = response.jsonPath().getInt("data.find {it.name == '保险'}.id"); //标签tab
firstTagId = response.jsonPath().getInt("data[0].id");//第一个标签的ID
Assert.assertTrue(hasList,network.message(FRIENDS_GETMATERIALTAGS,"获取tab数量有误",response.body().asString()));
Assert.assertEquals(id,595,network.message(FRIENDS_GETMATERIALTAGS,"获取tab中不包含保险",response.body().asString()));
}
@Test(description = "今日早报_发圈素材详情",priority = 7)
public void 今日早报_发圈素材详情(){
Map<String, Object> params = new HashMap<String, Object>();
params.put("currentId",currentId);
Response response = network.getResponse(params,FRIENDS_GETCURRENTINFO);
String topContentId = response.jsonPath().getString("data.contentId");
Assert.assertEquals(topContentId,currentId,network.message(params,FRIENDS_GETCURRENTINFO,"从首页进入发圈的头部素材有误",response.body().asString()));
}
@Test(description = "今日早报_成功案例列表",priority = 8)
public void 今日早报_成功案例列表(){
Response response = network.getResponse(Daily_getHomeCaseList);
List<HashMap> hashMapList = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(hashMapList, network.message(Daily_getHomeCaseList,"获取成功案例列表失败",response.body().asString()));
}
@Test(description = "今日早报_获取案例列表",priority = 9)
public void 今日早报_获取案例列表(){
Map<String,Object> params = new HashMap<>();
params.put("pageSize",20);
params.put("pageIndex",1);
Response response = network.getResponse(params,Daily_getCaseList);
String contentId = response.jsonPath().getString("data.list[0].contentId");
Assert.assertNotNull(contentId, network.message(params,Daily_getCaseList,"获取案例列表失败",response.body().asString()));
}
@Test(description = "获取客集集专区产品列表",priority = 10)
public void 今日早报_获取客集集专区产品列表(){
Response response = network.getResponse(Daily_getHomeCompanyArea);
Object contentList = response.jsonPath().getJsonObject("data.contentList");
System.out.println(contentList);
Assert.assertNotNull(contentList, network.message(Daily_getHomeCaseList,"获取客集集专区产品列表失败",response.body().asString()));
}
@Test(description = "今日早报_客集集专区_获取公司专区标签",priority = 11)
public void 今日早报_客集集专区_获取公司专区标签(){
Response response = network.getResponse(Daily_getTagList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(Daily_getTagList,"获取公司专区标签列表失败",response.body().asString()));
}
@Test(description = "今日早报_客集集专区_获取资料列表",priority = 12)
public void 今日早报_客集集专区_获取资料列表(){
Map<String,Object> params = new HashMap<>();
params.put("pageIndex",1);
params.put("pageSize",10);
Response response = network.getResponse(params,Daily_list);
boolean success= response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params,Daily_list,"获取资料列表失败",response.body().asString() ));
}
@Test (description = "获取晚安心语列表",priority = 13)
public void 获取晚安心语列表(){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
String dt = simpleDateFormat.format(new Date());
Map<String,Object> params = new HashMap<>();
params.put("dateDay",dt);
Response response = network.getResponse(params,Daily_eveningList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params,Daily_eveningList,"获取晚安心语列表失败",response.body().asString()));
}
@Test(description = "管理后台_早安打卡图片编辑",priority = 14)
public void 管理后台_早安打卡列表查询(){
//获取早安打卡(configType= 1)图库中的的首个图片id
Map<String,Object> params = new HashMap<>();
params.put("configType",1);
params.put("pageIndex",1);
params.put("pageSize",10);
Response listRes = network.getResponse(params,MANAGER_dailyPostersList);
boolean success = listRes.jsonPath().getBoolean("success");
Object id = listRes.jsonPath().getJsonObject("data.list[0].id");
System.out.println(id);
Assert.assertTrue(success, network.message(params,MANAGER_dailyPostersList,"获取管理后台打卡列表失败",listRes.body().asString()));
//获取早安打卡图片的详细信息
Map<String,Object> paramsFind = new HashMap<>();
paramsFind.put("id",id);
Response findRes = network.getResponse(paramsFind,MANAGER_findId);
aUrl = findRes.jsonPath().getString("data.imageUrl");
System.out.println(aUrl);
boolean successDetail = findRes.jsonPath().getBoolean("success");
Assert.assertTrue(successDetail,network.message(paramsFind,MANAGER_findId,"获取打卡详情失败",findRes.body().asString()));
}
@Test(description = "管理后台_早安打卡新增",priority = 15)
public void 管理后台_早安打卡新增(){
Map<String,Object> params = new HashMap<>();
params.put("configType",1);
params.put("imageUrlConfig",aUrl);
params.put("imgContent","测试使用");
long pt = System.currentTimeMillis();
params.put("pushTime",pt);
Response response = network.postResponse(params,MANAGER_addOrUpdate);
boolean success = response.jsonPath().getBoolean("success");
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,MANAGER_addOrUpdate,"新增早安打卡图片失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,MANAGER_addOrUpdate,"新增早安打卡图片失败",response.body().asString()));
//获取新增的早安打卡的配置ID
Map<String,Object> infoParams = new HashMap<>();
infoParams.put("configType",1);
infoParams.put("pageIndex",1);
infoParams.put("pageSize",10);
Response listRes = network.getResponse(infoParams,MANAGER_dailyPostersList);
deleteId = listRes.jsonPath().getString("data.list[0].id");
boolean successList = listRes.jsonPath().getBoolean("success");
Assert.assertTrue(successList, network.message(infoParams,MANAGER_dailyPostersList,"获取管理后台打卡列表失败",listRes.body().asString()));
}
@Test(description = "获取早晚安图库列表",priority = 16)
public void 获取早晚安图库列表(){
Map<String ,Object> params = new HashMap<>();
params.put("galleryType",1);
params.put("recommend",1);
params.put("pageIndex",1);
params.put("pageSize",10);
Response response = network.getResponse(params,HOME_selectPage);
Object list = response.jsonPath().getJsonObject("data.list");
List<HashMap> hashMapList = response.jsonPath().getJsonObject("data.list");
pId = hashMapList.get(0).get("id");
pUrl = hashMapList.get(0).get("imageUrlConfig");
System.out.println(pId);
System.out.println(list);
Assert.assertNotNull(list, network.message(params,HOME_selectPage,"获取早晚安图库列表失败",response.body().asString()));
}
@Test(description = "早安打卡",priority = 17)
public void 早安打卡(){
Map<String,Object> params = new HashMap<>();
params.put("id",pId);
System.out.println(pId);
params.put("imageUrlConfig",pUrl);
params.put("clock","false");
Response response = network.getResponse(params,HOME_getInfo);
boolean isClock = response.jsonPath().getBoolean("data.isClock");
Assert.assertTrue(isClock, network.message(params,HOME_getInfo,"打卡失败",response.body().asString()));
}
@Test(description = "管理后台_删除早安打卡配置",priority = 18)
public void 管理后台_删除早安打卡配置(){
Map<String,Object> params = new HashMap<>();
params.put("id",deleteId);
Response response = network.postResponse(params,MANAGER_dailyPostersDelete);
boolean success = response.jsonPath().getBoolean("success");
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,MANAGER_dailyPostersDelete,"删除早安打卡配置失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,MANAGER_dailyPostersDelete,"删除早安打卡配置失败",response.body().asString()));
}
}
......@@ -11,6 +11,7 @@ import org.testng.annotations.*;
import java.util.HashMap;
import java.util.Map;
public class RecommendMaterial implements Authorization {
public String sid; //加密的销售id
public String grasscontentId; //文章内容id
......@@ -20,6 +21,12 @@ public class RecommendMaterial implements Authorization {
public String inId; //获取赠险详情的id,用于删除赠险
public String userId; // 代理人用户ID
public String visitId; // 访问记录ID
public Object bId; //获取资料包id
public String bScid; //获取资料包的scid
public String bContentid; //获取资料包中的文章id
public String bSid; //获取用户的id
public String aScid; //获取资料包文章内容的scid
public String qId; //获取问答列表中的问题id
@BeforeClass
public void setUp() {
......@@ -44,10 +51,11 @@ public class RecommendMaterial implements Authorization {
@Test(description = "代理人_今日早报_种草素材内容页", priority = 2)
public void 代理人_今日早报_种草素材内容页() {
//根据种草素材的ContentId获取Scid
Map<String, Object> params = new HashMap<String, Object>();
Map<String, Object> params = new HashMap<>();
params.put("contentId", grasscontentId);
Response response = network.getResponse(params, GETSCID);
scid = response.jsonPath().getString("data");
System.out.println(scid);
Assert.assertNotNull(scid, network.message(params, GETSCID, "获取文章的scid失败", response.body().asString()));
Map<String, Object> infoParams = new HashMap<String, Object>();
......@@ -57,8 +65,18 @@ public class RecommendMaterial implements Authorization {
Assert.assertEquals(grasscontentId, id, network.message(infoParams, ARTICLE_H5INFO, "获取种草文章内容失败", response.body().asString()));
}
//种草素材中资料包领取
@Test(description = "代理人_今日早报_种草资料包领取", priority = 3)
public void 代理人_今日早报_种草资料包领取() {
Map<String, Object> params = new HashMap<>();
params.put("scid", scid);
Response response = network.getResponse(params, GRASS_direct);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertNotNull(data, network.message(params, GRASS_direct, "领取文章中的资料包失败", response.body().asString()));
}
//种草文章转发
@Test(description = "代理人_今日早报_种草素材转发", priority = 3)
@Test(description = "代理人_今日早报_种草素材转发", priority = 4)
public void 代理人_今日早报_种草素材转发() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scId", scid);
......@@ -70,15 +88,16 @@ public class RecommendMaterial implements Authorization {
//种草素材标签列表
@Test(description = "代理人_今日早报_种草素材标签列表", priority = 4)
@Test(description = "代理人_今日早报_种草素材标签列表", priority = 5)
public void 代理人_今日早报_种草素材标签列表() {
Response response = network.getResponse(GRASS_getTagList);
String tagId = response.jsonPath().getString("data[0].id");
System.out.println(tagId);
Assert.assertNotNull(tagId, network.message(GRASS_getTagList, "获取种草素材标签列表失败", response.body().asString()));
}
//猜你想搜列表
@Test(description = "代理人_种草素材_猜你想搜列表", priority = 5)
@Test(description = "代理人_种草素材_猜你想搜列表", priority = 6)
public void 代理人_种草素材_猜你想搜列表() {
Response response = network.getResponse(GRASS_guessYourMind);
keyWord = response.jsonPath().getString("data[1].keyWord");
......@@ -86,7 +105,7 @@ public class RecommendMaterial implements Authorization {
}
//搜索获取种草素材列表
@Test(description = "代理人_种草素材_搜索获取动画种草素材列表", priority = 6)
@Test(description = "代理人_种草素材_搜索获取动画种草素材列表", priority = 7)
public void 代理人_种草素材_搜索获取动画种草素材列表() {
String type = "game_animation";
Map<String, Object> params = new HashMap<String, Object>();
......@@ -99,7 +118,7 @@ public class RecommendMaterial implements Authorization {
Assert.assertNotNull(gameContentId, network.message(params, GRASS_searchContent, "获取动画种草素材列表失败", response.body().asString()));
}
@Test(description = "代理人_种草素材_搜索获取文章种草素材列表", priority = 7)
@Test(description = "代理人_种草素材_搜索获取文章种草素材列表", priority = 8)
public void 代理人_种草素材_搜索获取文章种草素材列表() {
String type = "article";
Map<String, Object> params = new HashMap<String, Object>();
......@@ -111,7 +130,7 @@ public class RecommendMaterial implements Authorization {
Assert.assertNotNull(gameContentId, network.message(params, GRASS_searchContent, "获取文章种草素材列表失败", response.body().asString()));
}
@Test(description = "代理人_种草素材_搜索获取视频种草素材列表", priority = 8)
@Test(description = "代理人_种草素材_搜索获取视频种草素材列表", priority = 9)
public void 代理人_种草素材_搜索获取视频种草素材列表() {
String type = "video";
Map<String, Object> params = new HashMap<String, Object>();
......@@ -124,16 +143,15 @@ public class RecommendMaterial implements Authorization {
}
//获取赠险列表
@Test(description = "代理人_赠险管理_获取赠险列表", priority = 9)
@Test(description = "代理人_赠险管理_获取赠险列表", priority = 10)
public void 代理人_赠险管理_获取赠险列表() {
Response response = network.getResponse(GRASS_insuranceListV3t);
Object object = response.jsonPath().getJsonObject("data.insuranceVos");
System.out.println(object);
Assert.assertNotNull(object, network.message(GRASS_insuranceListV3t, "获取赠险列表失败", response.body().asString()));
}
//赠险详情
@Test(description = "代理人_赠险管理_赠险详情", priority = 10)
@Test(description = "代理人_赠险管理_赠险详情", priority = 11)
public void 代理人_赠险管理_赠险详情() {
//根据赠险列表接口获取insuranceType
Response responseParams = network.getResponse(GRASS_insuranceListV3t);
......@@ -147,7 +165,7 @@ public class RecommendMaterial implements Authorization {
// 编辑赠险
@Test(description = "代理人_赠险管理_新增赠险", priority = 11)
@Test(description = "代理人_赠险管理_新增赠险", priority = 12)
public void 代理人_赠险管理_新增赠险() {
Map<String, Object> params = new HashMap<>();
params.put("insuranceTitle", "2222");
......@@ -171,7 +189,8 @@ public class RecommendMaterial implements Authorization {
//删除赠险
@Test(description = "代理人_赠险管理_删除赠险", priority = 12)
@Test(description = "代理人_赠险管理_删除赠险", priority = 13)
public void 代理人_赠险管理_删除赠险() {
Map<String, Object> params = new HashMap<>();
params.put("id", inId);
......@@ -182,8 +201,65 @@ public class RecommendMaterial implements Authorization {
Assert.assertTrue(data, network.message(params, GRASS_delInsurance, "删除赠险信息校验失败", response.body().asString()));
}
// 获取资料包列表
@Test(description = "代理人_获取资料包列表", priority = 14)
public void 代理人_获取资料包列表() {
Response response = network.getResponse(GRASS_materialListV2);
Object obj = response.jsonPath().getJsonObject("data.materialVos");
bId = response.jsonPath().getJsonObject("data.materialVos.get(0).id");
Assert.assertNotNull(obj, network.message(GRASS_materialListV2, "获取赠险列表失败", response.body().asString()));
}
//获取资料包内容
@Test(description = "代理人_获取资料包内容", priority = 15)
public void 代理人_获取资料包内容() {
//根据资料包的id获取scid
Map<String, Object> params = new HashMap<>();
params.put("contentId", bId);
Response response = network.getResponse(params, GETSCID);
bScid = response.jsonPath().getString("data");
System.out.println(bScid);
Assert.assertNotNull(bScid, network.message(params, GETSCID, "获取资料包的scid失败", response.body().asString()));
//获取资料包内容
Map<String, Object> infoParams = new HashMap<>();
infoParams.put("scid", bScid);
Response responseInfo = network.getResponse(infoParams, GRASS_getDetailList);
Object articleBlocks = responseInfo.jsonPath().getJsonObject("data.articleBlocks");
bContentid = responseInfo.jsonPath().getJsonObject("data.articleBlocks.get(0).articles.get(0).contentId");
System.out.println(bContentid);
Assert.assertNotNull(articleBlocks, network.message(infoParams, GRASS_getDetailList, "获取资料包内容失败", responseInfo.body().asString()));
}
@Test(description = "代理人_获取资料包中的文章", priority = 16)
public void 代理人_获取资料包中的文章() {
//获取用户的id
Response response = network.getResponse(USER_INFO);
bSid = response.jsonPath().getString("data.encodeSellerId");
Assert.assertNotNull(bSid, network.message(USER_INFO, "获取用户id失败", response.body().asString()));
//获取资料包中文章的scid
Map<String, Object> infoParams = new HashMap<>();
infoParams.put("contentId", bContentid);
infoParams.put("sid", bSid);
Response responseInfo = network.getResponse(infoParams, GETSCID);
aScid = responseInfo.jsonPath().getString("data");
Assert.assertNotNull(aScid, network.message(infoParams, GETSCID, "获取scid失败", responseInfo.body().asString()));
//获取资料包中的文章
Map<String, Object> infoParams2 = new HashMap<>();
infoParams2.put("scid", aScid);
infoParams2.put("datagramScid", bScid);
infoParams2.put("needDisplayPreNext", 1);
Response responseInfo2 = network.getResponse(infoParams2, GRASS_getArticleInfo);
Object data = responseInfo2.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(infoParams2, GRASS_getArticleInfo, "获取文章失败", responseInfo2.body().asString()));
}
//******************** 访客 **********************8
@Test(description = "访客_记录查看素材", priority = 13)
@Test(description = "访客_记录查看素材", priority = 17)
public void 访客_记录查看素材() {
//tKu 切换为访客
network.agentCookies.put("tKu", VISITOR_TKU);
......@@ -197,7 +273,8 @@ public class RecommendMaterial implements Authorization {
Assert.assertNotNull(visitId, network.message(params, CONTENT_READ, "访客记录查看素材失败", response.body().asString()));
}
@Test(description = "访客_文章内容页", priority = 14)
@Test(description = "访客_文章内容页", priority = 18)
public void 访客_文章内容页() {
Map<String, Object> infoParams = new HashMap<>();
infoParams.put("scid", scid);
......@@ -206,8 +283,8 @@ public class RecommendMaterial implements Authorization {
Assert.assertEquals(grasscontentId, id, network.message(infoParams, ARTICLE_H5INFO, "访客查看文章失败", response.body().asString()));
}
//是否爆款素材
@Test(description = "访客_文章类型判断", priority = 15)
@Test(description = "访客_文章类型判断", priority = 19)
public void 访客_文章类型判断() {
Map<String, Object> params = new HashMap<>();
params.put("id", grasscontentId);
......@@ -224,7 +301,114 @@ public class RecommendMaterial implements Authorization {
Assert.assertNotNull(tags, network.message(infoParams, ARTICLE_GETEXPINFO, "访客-获取文章标签有误", response.body().asString()));
Assert.assertNotNull(recommendReason, network.message(infoParams, ARTICLE_GETEXPINFO, "访客-获取文章推荐理由有误", response.body().asString()));
}
}
// 获取互动区-专业解读
@Test(description = "访客_互动区-专业解读", priority = 20)
public void 访客_互动区_专业解读() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
params.put("pageIndex", 1);
params.put("pageSize", 10);
Response response = network.getResponse(params, ARTICLE_ENHANCEDCOLUMN_GETCONTENTS);
boolean hasList = response.jsonPath().getInt("data.list.size()") > 0;
Assert.assertTrue(hasList, network.message(params, ARTICLE_ENHANCEDCOLUMN_GETCONTENTS, "访客-获取专业解读列表有误", response.body().asString()));
}
// 获取互动区-互动问答
@Test(description = "访客_互动区-互动问答", priority = 21)
public void 访客_互动区_互动问答() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
params.put("pageIndex", 1);
params.put("pageSize", 2);
Response response = network.getResponse(params, ARTICLE_ENHANCEDCOLUMN_GETFAQS);
boolean hasList = response.jsonPath().getInt("data.list.size()") > 0;
Assert.assertTrue(hasList, network.message(params, ARTICLE_ENHANCEDCOLUMN_GETFAQS, "访客-获取个人专栏列表有误", response.body().asString()));
String answer = response.jsonPath().getString("data.list[0].answer");
qId = response.jsonPath().getString("data.list[0].questionId");
System.out.println(qId);
Assert.assertNotNull(answer, network.message(params, ARTICLE_ENHANCEDCOLUMN_GETFAQS, "访客-获取问答内容有误", response.body().asString()));
}
//获取互动问答详情
@Test(description = "获取互动问答详情", priority = 22)
public void 获取互动问答详情() {
Map<String, Object> params = new HashMap<>();
params.put("qId", qId);
params.put("scid", scid);
Response response = network.getResponse(params, ARTICLE_getQuestionDetail);
Object obj = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(obj, network.message(params, ARTICLE_getQuestionDetail, "获取互动问答详情失败", response.body().asString()));
}
// 获取互动区-风险评测
@Test(description = "访客_互动区-风险评测", priority = 23)
public void 访客_互动区_风险评测() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
Response response = network.getResponse(params, ARTICLE_ISDISPLAYACTIVITY);
boolean isDisplay = response.jsonPath().getBoolean("data.isDisplay");
String riskScid = response.jsonPath().getString("data.scid");
Assert.assertTrue(isDisplay, network.message(params, ARTICLE_ISDISPLAYACTIVITY, "访客-互动区-风险评测显示有误", response.body().asString()));
Assert.assertNotNull(riskScid, network.message(params, ARTICLE_ISDISPLAYACTIVITY, "访客-互动区-风险评测内容有误", response.body().asString()));
}
// 获取代理人个人专栏
@Test(description = "访客_代理人个人专栏", priority = 24)
public void 访客_代理人个人专栏() {
// 先获取代理人个人专栏设置
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
Response response = network.getResponse(params, ARTICLE_GETENHANCEDCOLUMNCONFIG);
boolean isOpen = response.jsonPath().getBoolean("data.find {it.code == 'personal_document_switch'}.val");
Assert.assertTrue(isOpen, network.message(params, ARTICLE_GETENHANCEDCOLUMNCONFIG, "访客-获取代理人日常精准素材个人专栏开关有误", response.body().asString()));
//tku 切换为代理人的
network.agentCookies.put("tku", AGENT_TKU);
//关闭 代理人个人专栏开关
Map<String, Object> configParams = new HashMap<String, Object>();
configParams.put("configKey", "personal_document_switch");
configParams.put("configValue", false);
response = network.postResponse(configParams, SELLERCONFIG_EDITCONFIG);
//tku 切换为访客的
network.agentCookies.put("tku", VISITOR_TKU);
//再获取代理人个人专栏
response = network.getResponse(params, ARTICLE_GETENHANCEDCOLUMNCONFIG);
isOpen = response.jsonPath().getBoolean("data.find {it.code == 'personal_document_switch'}.val");
Assert.assertFalse(isOpen, network.message(params, ARTICLE_GETENHANCEDCOLUMNCONFIG, "访客-获取代理人日常精准素材个人专栏开关有误", response.body().asString()));
//tku 切换为代理人的
network.agentCookies.put("tku", AGENT_TKU);
//再次开启 代理人个人专栏开关
configParams.put("configKey", "personal_document_switch");
configParams.put("configValue", true);
response = network.postResponse(configParams, SELLERCONFIG_EDITCONFIG);
//tku 切换为访客的
network.agentCookies.put("tku", VISITOR_TKU);
}
// 获取代理人个人专栏
@Test(description = "访客_获取代理人私信", priority = 25)
public void 访客_获取代理人私信() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
params.put("t", System.currentTimeMillis());
Response response = network.getResponse(params, CHECKUNREAD);
String desc = response.jsonPath().getString("desc");
Assert.assertEquals(desc, "OK", network.message(params, CHECKUNREAD, "访客-获取私信有误", response.body().asString()));
}
@AfterClass
public void tearDown() {
network.agentCookies.put("tku", AGENT_TKU); //tku 切换为访客的
apiCount += 13;
}
}
\ No newline at end of file
package com.kjj.cases.basics.card;
package com.kjj.cases.assistant.card;
import static com.kjj.config.BasicConfig.*;
import static com.kjj.utils.ThreadSleepUtils.sleep;
......
package com.kjj.cases.basics.card;
package com.kjj.cases.assistant.card;
import com.kjj.bean.card.GoodMajor;
import com.kjj.bean.card.WechatCard;
......
package com.kjj.cases.assistant.whoSawMe;
import com.beust.jcommander.internal.Lists;
import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.utils.BaseUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.config.BasicConfig.AGENT_TKU;
import static com.kjj.config.BasicConfig.BOSS_EDITCONFIG;
public class WhoSawMe implements Authorization {
private Response response;
private Map<String, Object> param;
private String AGENT1_TKU;
@BeforeClass
public void setUp() throws IOException {
// 代理人授权
agentTku();
BaseUtils.ssoLogin();
// 赋值
AGENT1_TKU = "T3gM31f18jCeKCBVHf5MANgyXeBZGCm8vTJQTuWYXHFqxAxq2TQ27ozxyRsZykZBimiwFTrzQnGLWkvAs4";
// 关闭数据看板演示数据
param = new HashMap<>();
param.put("configKey", "boss_board_demon_switch");
param.put("configValue", false);
response = network.postResponse(param, BOSS_EDITCONFIG);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BOSS_EDITCONFIG, "接口请求失败", response.body().asString()));
Assert.assertTrue(data, network.message(param, BOSS_EDITCONFIG, "关闭演示数据开关失败",response.body().asString()));
}
// 进入谁扛过我主页
// 判断代理人是否新会员
@Test(description = "首页_判断是否新会员", priority = 1)
public void 判断是否新会员() throws IOException {
// 判断是否新会员
param = new HashMap<>();
param.put("vipGuideType", 2);
response = network.getResponse(param, BasicConfig.HOST + "/kjy/mp/rookieGuide/isNewVipByType");
Boolean success = response.jsonPath().getBoolean("success");
Assert.assertEquals(success, Boolean.TRUE, network.message(BasicConfig.HOST + "/kjy/mp/rookieGuide/isNewVipByType", "判断代理人是否新会员失败", response.body().asString()));
Assert.assertTrue(response.jsonPath().getBoolean("data"), network.message(BasicConfig.HOST + "/kjy/mp/rookieGuide/isNewVipByType", "新老会员判断错误,预期为新会员判断为老会员", response.body().asString()));
}
// 获取代理人用户信息
@Test(description = "首页_获取代理人用户信息", priority = 2)
public void 获取代理人用户信息() throws IOException{
// 获取代理人用户信息
response = network.getResponse(BasicConfig.USER_INFO);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.USER_INFO, "获取代理人用户信息失败", response.body().asString()));
String wxName = response.jsonPath().getString("data.wxName");
Assert.assertEquals(wxName, BasicConfig.WECHAT_NAME, network.message(BasicConfig.USER_INFO, "代理人微信昵称获取有误,预期为" + BasicConfig.WECHAT_NAME, response.body().asString()));
}
// 获取当前页面Tips
@Test(description = "首页_获取当前页面Tips", priority = 3)
public void 获取当前页面Tips() throws IOException {
// 根据page获取当前页面tips
param = new HashMap<>();
String page = "who_saw_me";
param.put("page", page);
response = network.getResponse(param, BasicConfig.GETTIPSBYPAGE);
Object data = response.jsonPath().getJsonObject("data");
Boolean isShowTips = response.jsonPath().getBoolean("data.isShowTips");
Integer jumpType = response.jsonPath().getInt("data.jumpType");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(BasicConfig.GETTIPSBYPAGE, "获取当前页面tips失败", response.body().asString()));
Assert.assertNotNull(data, network.message(BasicConfig.GETTIPSBYPAGE, "获取当前页面tips失败", response.body().asString()));
Assert.assertNotNull(isShowTips, network.message(BasicConfig.GETTIPSBYPAGE, "获取isShowTips值失败", response.body().asString()));
Assert.assertNotNull(jumpType, network.message(BasicConfig.GETTIPSBYPAGE, "获取跳转类型失败", response.body().asString()));
}
// 查询代理人当前使用版本
@Test(description = "首页_查询使用版本", priority = 4)
public void 查询代理人当前使用版本() throws IOException {
param = new HashMap<>();
String sellerIdEncode = encodeSellerId(getSellerId());
param.put("sellerId", sellerIdEncode);
response = network.getResponse(param, BasicConfig.USING_VERSION);
String userVersion = response.jsonPath().getString("data.userVersion");
Assert.assertEquals(userVersion, "2", network.message(BasicConfig.USING_VERSION, "代理人当前使用版本错误,实际为2.保险专业版", response.body().asString()));
}
// 判断是否今日首次进入
@Test(description = "判断是否今日首次进入", priority = 5)
public void 判断是否今日首次进入() throws IOException {
// 判断是否今日首次进入
response = network.getResponse(BasicConfig.DAILY_FIRST);
Object data = response.jsonPath().getJsonObject("data");
Boolean needShow = response.jsonPath().getBoolean("data.needShow");
Assert.assertNotNull(data, network.message(BasicConfig.DAILY_FIRST, "判断是否今日首次进入失败,data字段为空", response.body().asString()));
Assert.assertNotNull(needShow, network.message(BasicConfig.DAILY_FIRST, "判断是否今日首次进入失败,data.needShow字段为空", response.body().asString()));
}
// 判断是否展示续费弹窗
@Test(description = "判断是否展示续费弹窗", priority = 6)
public void 判断是否展示续费弹窗() throws IOException{
// 判断是否展示续费弹窗
response = network.getResponse(BasicConfig.LAYER_RENEW);
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(BasicConfig.LAYER_RENEW, "判断是否展示续费弹窗失败,data为空", response.body().asString()));
}
// 判断是否展示邀请弹窗
@Test(description = "展示邀请活动弹窗", priority = 7)
public void 展示邀请活动弹窗() throws IOException {
// 邀请活动弹窗
response = network.getResponse(BasicConfig.DISTRIBUTION_LAYER);
boolean success = response.jsonPath().getBoolean("success");
Object data = response.jsonPath().getJsonObject("data");
Assert.assertTrue(success, network.message(BasicConfig.DISTRIBUTION_LAYER, "判断是否展示邀请活动弹窗失败", response.body().asString()));
Assert.assertNotNull(data, network.message(BasicConfig.DISTRIBUTION_LAYER, "判断是否展示邀请活动弹窗失败,data为空", response.body().asString()));
}
// 判断是否展示线索页新手引导
@Test(description = "获取线索页新手引导", priority = 8)
public void 获取线索页新手引导() throws IOException {
// 获取线索页新手引导
response = network.getResponse(BasicConfig.ROOKIECLUEGUIDE);
Boolean showClueGuide = response.jsonPath().getBoolean("data.showClueGuide");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(BasicConfig.ROOKIECLUEGUIDE, "接口请求失败", response.body().asString()));
Assert.assertNotNull(response.jsonPath().getJsonObject("data"), network.message(BasicConfig.ROOKIECLUEGUIDE, "获取线索页新手引导失败", response.body().asString()));
Assert.assertNotNull(showClueGuide, network.message(BasicConfig.ROOKIECLUEGUIDE, "获取showClueGuide值失败", response.body().asString()));
}
// 获取周报首页数据
@Test(description = "获取周报首页数据", priority = 9)
public void 获取周报首页数据() throws IOException{
// 获取周报首页数据
response = network.getResponse(BasicConfig.SELLERWEEKLY);
boolean success = response.jsonPath().getBoolean("success");
Object data = response.jsonPath().getJsonObject("data");
Assert.assertTrue(success, network.message(BasicConfig.SELLERWEEKLY, "接口请求失败", response.body().asString()));
Assert.assertNotNull(data, network.message(BasicConfig.SELLERWEEKLY, "获取周报首页数据失败", response.body().asString()));
}
// 获取代理人标签列表
@Test(description = "获取代理人标签列表", priority = 10)
public void 获取代理人标签列表() throws IOException {
// 获取代理人标签列表
response = network.getResponse(BasicConfig.HOST + "/kjy/mp/sellerTag/getTagList");
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.HOST + "/kjy/mp/sellerTag/getTagList", "接口请求失败", response.body().asString()));
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(BasicConfig.HOST + "/kjy/mp/sellerTag/getTagList", "获取代理人标签列表失败", response.body().asString()));
}
// 获取首页来访统计
@Test(description = "获取谁看过我首页来访统计", priority = 11)
public void 来访统计() throws IOException{
response = network.getResponse(BasicConfig.VISITHEADER);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.VISITHEADER, "接口请求失败", response.body().asString()));
String todayClueNum = response.jsonPath().getString("data.todayClueNum");
String todayVisitNum = response.jsonPath().getString("data.todayVisitNum");
String totalVisitNum = response.jsonPath().getString("data.totalVisitNum");
Assert.assertNotNull(todayClueNum, network.message(BasicConfig.VISITHEADER, "获取今日线索数失败", response.body().asString()));
Assert.assertNotNull(todayVisitNum, network.message(BasicConfig.VISITHEADER, "获取今日访问数失败", response.body().asString()));
Assert.assertNotNull(totalVisitNum, network.message(BasicConfig.VISITHEADER, "获取累计访问数失败", response.body().asString()));
}
// 进入运营周报首页
@Test(description = "进入运营周报首页", priority = 12)
public void 进入运营周报首页() throws IOException{
response = network.getResponse(BasicConfig.WEEKLY_LIST);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.WEEKLY_LIST, "接口请求失败", response.body().asString()));
}
// 进入团队看板首页
@Test(description = "进入团队看板首页", priority = 13)
public void 进入团队看板首页() throws IOException{
// 获取当前页面Tips
param.clear();
param.put("page", "data_board");
response = network.getResponse(param, BasicConfig.GETTIPSBYPAGE);
boolean success = response.jsonPath().getBoolean("success");
String tipsContent = response.jsonPath().getString("data.tipsContent");
Assert.assertTrue(success, network.message(BasicConfig.GETTIPSBYPAGE, "接口请求失败", response.body().asString()));
Assert.assertEquals(tipsContent, "数据看板-tips", network.message(param, BasicConfig.GETTIPSBYPAGE, "当前页面Tips错误,实际为 数据看板", response.body().asString()));
// 获取我的上级名称
param.clear();
param.put("sellerId", getSellerId());
response = network.getResponse(param, BasicConfig.BOSS_BOSS);
success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.BOSS_BOSS, "获取上级名称失败", response.body().asString()));
}
// 邀请成员加入团队
@Test(description = "生成团队邀请码", priority = 14)
public void 生成团队邀请码() throws IOException{
Integer inviteType = 2;
param = new HashMap<>();
param.put("inviteType", inviteType);
response = network.getResponse(param, BasicConfig.BOSS_CODE);
Object data = response.jsonPath().getString("data");
Assert.assertNotNull(data, network.message(param, BasicConfig.BOSS_CODE, "获取团队邀请码失败", response.body().asString()));
}
@Test(description = "其他代理人加入该代理人团队", priority = 15)
public void 邀请加入团队() throws IOException{
// 切换代理人加入团队
Long sellerId = getSellerId();
network.agentCookies.put("tku", AGENT1_TKU);
// 确定被邀请代理人没有上级
response = network.getResponse(BasicConfig.BOSS_ROLE);
boolean hasSuperior = response.jsonPath().getBoolean("data.hasSuperior");
Assert.assertFalse(hasSuperior, network.message(BasicConfig.BOSS_ROLE, "该代理人已有上级", response.body().asString()));
// 代理人加入团队
param = new HashMap<>();
param.put("inviterSid", sellerId);
param.put("inviteType", 2);
response = network.getResponse(param, BasicConfig.BOSS_BOUND);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(param, BasicConfig.BOSS_BOUND, "接口请求失败", response.body().asString()));
Assert.assertTrue(response.jsonPath().getBoolean("data"), network.message(param, BasicConfig.BOSS_BOUND, "添加代理人进入团队失败", response.body().asString()));
network.agentCookies.put("tku", BasicConfig.AGENT_TKU);
}
@Test(description = "查看被邀请代理人上级名称", priority = 16)
public void 查看上级名称() throws IOException{
// 获取被邀请代理人sellerId
Long sellerId = (Long) decodeTku(AGENT1_TKU).get("sellerId");
param = new HashMap<>();
param.put("sellerId", sellerId);
response = network.getResponse(param, BasicConfig.BOSS_BOSS);
String bossName = response.jsonPath().getString("data");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.BOSS_BOSS, "接口请求失败", response.body().asString()));
Assert.assertEquals(bossName, BasicConfig.WECHAT_NAME, network.message(param, BasicConfig.BOSS_BOSS, "被邀请人上级名称与邀请人不一致", response.body().asString()));
}
@Test(description = "删除团队成员", priority = 17)
public void 删除团队成员() throws IOException{
// 获取下级代理人sellerId
Long childSellerId = (Long) decodeTku(AGENT1_TKU).get("sellerId");
// 登陆管理后台调用管理后台接口删除成员
param = new HashMap<>();
param.put("superiorSid", getSellerId());
param.put("childSid", childSellerId);
response = network.postResponse(param, BasicConfig.MANAGER_SELLERTEAM_REMOVEMEMBER);
Assert.assertTrue(response.jsonPath().getBoolean("data"), network.message(param, BasicConfig.MANAGER_SELLERTEAM_REMOVEMEMBER, "删除成员失败", response.body().asString()));
// 切换到被删除代理人确认已没有上级
network.agentCookies.put("tku", AGENT1_TKU);
response = network.getResponse(BasicConfig.BOSS_ROLE);
boolean hasSuperior = response.jsonPath().getBoolean("data.hasSuperior");
Assert.assertFalse(hasSuperior, network.message(BasicConfig.BOSS_ROLE, "该代理人还有上级", response.body().asString()));
network.agentCookies.put("tku", AGENT_TKU);
}
// 转发素材
@Test(description = "转发素材", priority = 18)
public void 转发素材() throws IOException{
response = network.getResponse(BasicConfig.USER_INFO);
String scId = getContentScId(BasicConfig.ARTICLE_CONTENTID); // 获取文章scId
param = new HashMap<>();
param.put("scId", scId);
param.put("forwardType", 1);
response = network.getResponse(param, BasicConfig.FORWARD);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(param, BasicConfig.FORWARD, "转发素材失败", response.body().asString()));
}
// 查看今日转发素材列表
@Test(description = "查看今日转发素材列表", priority = 19)
public void 查看转发素材列表() throws IOException{
response = network.getResponse(BasicConfig.USER_INFO);
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 4);
response = network.getResponse(param, BasicConfig.MATERIALLIST);
String contentId = response.jsonPath().getString("data.list[0].contentId");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.MATERIALLIST, "接口请求失败", response.body().asString()));
Assert.assertEquals(contentId, BasicConfig.ARTICLE_CONTENTID, network.message(param, BasicConfig.MATERIALLIST, "首条转发文章contentId不符合预期", response.body().asString()));
}
// 转发名片
@Test(description = "转发名片", priority = 20)
public void 转发名片() throws IOException{
response = network.getResponse(BasicConfig.USER_INFO);
String scId = network.getResponse(BasicConfig.SELLERCARD_TOPOFDETAIL).jsonPath().getString("data.scid");
param = new HashMap<>();
param.put("scId", scId);
param.put("forwardType", 1);
response = network.getResponse(param, BasicConfig.FORWARD);
boolean forwardResult = response.jsonPath().getBoolean("data");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.FORWARD, "接口请求失败", response.body().asString()));
Assert.assertTrue(forwardResult, network.message(param, BasicConfig.FORWARD, "转发名片失败", response.body().asString()));
}
// 查看转发名片记录列表
@Test(description = "查看转发名片记录列表", priority = 21)
public void 查看转发名片记录列表() throws IOException{
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 4);
response = network.getResponse(param, BasicConfig.FORWARDCARDLIST);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.FORWARDCARDLIST, "接口请求失败", response.body().asString()));
Assert.assertNotNull(response.jsonPath().getJsonObject("data.list"), network.message(param, BasicConfig.FORWARDCARDLIST, "获取转发名片记录列表失败", response.body().asString()));
}
// 使用工具
@Test(description = "使用工具", priority = 22)
public void 使用工具() throws IOException{
// 生成抽奖转盘素材scId
String lottery_scId = getContentScId(BasicConfig.LOTTERY_CONTENTID);
// 分享抽奖
param = new HashMap<>();
param.put("scId", lottery_scId);
param.put("forwardType", 1);
response = network.getResponse(param, BasicConfig.FORWARD);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.FORWARD, "接口请求失败", response.body().asString()));
Assert.assertTrue(response.jsonPath().getBoolean("data"), network.message(param, BasicConfig.FORWARD, "分享抽奖活动失败", response.body().asString()));
}
// 查看使用工具记录列表
@Test(description = "查看使用工具记录列表", priority = 23)
public void 查看使用工具记录列表() throws IOException{
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 4);
response = network.getResponse(param, BasicConfig.MARKETINGTOOLLIST);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.MARKETINGTOOLLIST, "接口请求失败", response.body().asString()));
String firstRecordContentId = response.jsonPath().getString("data.list[0].contentId");
Assert.assertEquals(firstRecordContentId, BasicConfig.LOTTERY_CONTENTID, network.message(param, BasicConfig.MARKETINGTOOLLIST, "首条记录素材Id与预期不匹配", response.body().asString()));
}
// 查看获得线索记录列表
@Test(description = "查看获得线索记录列表", priority = 24)
public void 查看获得线索记录列表() throws IOException{
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 1);
response = network.getResponse(param, BasicConfig.SALECLUELIST);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.SALECLUELIST, "接口请求失败", response.body().asString()));
}
// 查看转发动态访问列表
@Test(description = "查看转发动态访问列表", priority = 25)
public void 查看转发动态访问列表() throws IOException{
// 获取首条素材列表中首条动态id
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 4);
response = network.getResponse(param, BasicConfig.MATERIALLIST);
Long dynamicId = response.jsonPath().getLong("data.list[0].id");
// 按照动态id查看动态访问列表
param = new HashMap<>();
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("dynamicId", dynamicId);
response = network.getResponse(param, BasicConfig.GETVISITLIST);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.GETVISITLIST, "接口请求失败", response.body().asString()));
}
// 查看谁看过我首页我的访客列表
@Test(description = "查看我的访客列表", priority = 26)
public void 查看我的访客列表() throws IOException{
List<Object> customerTagIds = Lists.newArrayList();
param = new HashMap<>();
param.put("customerTagIds", customerTagIds);
param.put("lastClueId", 0);
param.put("listType", 1);
param.put("pageSize", 20);
response = network.postResponse(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3, "接口请求失败", response.body().asString()));
List<Object> list = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(list, network.message(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3, "获取我的访客列表失败", response.body().asString()));
}
// 获取代理人sellerId
public Long getSellerId(){
network.agentCookies.put("tku", BasicConfig.AGENT_TKU);
response = network.getResponse(BasicConfig.USER_INFO);
Long sellerId = response.jsonPath().getLong("data.sellerId");
Assert.assertNotNull(sellerId, network.message(BasicConfig.USER_INFO, "获取代理人sellerId失败", response.body().asString()));
return sellerId;
}
// 通过素材contentId获取线索员文章scId
public String getContentScId(String contentId){
param = new HashMap<>();
param.put("contentId", contentId);
response = network.getResponse(param, BasicConfig.GETSCID);
String contentScid = response.jsonPath().getString("data");
Assert.assertNotNull(contentScid, network.message(param, BasicConfig.GETSCID, "获取scid失败", response.body().asString()));
return contentScid;
}
// 加密sellerId
public String encodeSellerId(Long sellerId){
// 登陆管理后台
param = new HashMap<>();
param.put("code", sellerId);
response = network.getResponse(param, BasicConfig.MANAGER_SELLERID_ENCODE);
String sIds = response.jsonPath().getString("data");
Assert.assertNotNull(sIds, network.message(param, BasicConfig.MANAGER_SELLERID_ENCODE, "加密sellerId失败", response.body().asString()));
return sIds;
}
// 解密sellerId
public HashMap<String, Object> decodeTku(String tku){
// 登陆管理后台
param = new HashMap<>();
param.put("tku", tku);
response = network.getResponse(param, BasicConfig.MANAGER_TKU_DECODE);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.MANAGER_TKU_DECODE, "接口请求失败", response.body().asString()));
Long userId = response.jsonPath().getLong("data.userId");
Long sellerId = response.jsonPath().getLong("data.sellerId");
Assert.assertNotNull(userId, network.message(param, BasicConfig.MANAGER_TKU_DECODE, "获取userId失败", response.body().asString()));
Assert.assertNotNull(userId, network.message(param, BasicConfig.MANAGER_TKU_DECODE, "获取userId失败", response.body().asString()));
HashMap<String, Object> result = new HashMap<>();
result.put("userId", userId);
result.put("sellerId", sellerId);
return result;
}
}
......@@ -78,7 +78,7 @@ public class Customer implements Authorization {
int customerNum=response.jsonPath().getInt("data.customerNum");
Assert.assertTrue(customerNum>26, network.message(BasicConfig.MOBILE_count, "总客户数量不对", response.body().asString()));
int lastOneNewNum = response.jsonPath().getJsonObject("data.lastOneNewNum");
Assert.assertTrue(lastOneNewNum>17, network.message(BasicConfig.MOBILE_count, "上场新增客户数量", response.body().asString()));
Assert.assertTrue(lastOneNewNum>15, network.message(BasicConfig.MOBILE_count, "上场新增客户数量", response.body().asString()));
}
......
......@@ -8,7 +8,9 @@ import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FlipCard implements Authorization {
......@@ -16,34 +18,46 @@ public class FlipCard implements Authorization {
public String cardConfId;
public String shareSign;
@Test(description = "查询翻牌弹窗配置状态", priority = 1)
public void 查询翻牌弹窗配置状态() {
@Test(description = "查询翻牌集字配置状态", priority = 1)
public void 查询翻牌集字配置状态() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_status);
boolean confStatus = response.jsonPath().getBoolean("data.confStatus");
int confStatus = response.jsonPath().getInt("data.confStatus");
System.out.println(confStatus);
Assert.assertTrue(confStatus, network.message(params, BasicConfig.MOBILE_status, "未开启", response.body().asString()));
cardConfId=response.jsonPath().getJsonObject("data.cardConfId");
System.out.println(cardConfId);
Assert.assertNotNull(cardConfId,network.message(params, BasicConfig.MOBILE_status, "配置ID为null", response.body().asString()));
Assert.assertTrue(confStatus==2, network.message(params, BasicConfig.MOBILE_status, "未开启", response.body().asString()));
}
@Test(description = "查询直播翻牌配置详情", priority = 2)
public void 查询直播翻牌配置详情() {
@Test(description = "查询翻牌集字配置详情", priority = 2)
public void 查询翻牌集字配置详情() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
Response response = network.getResponse(params, BasicConfig.MOBILE_cardDetail);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_wordConf);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_cardDetail, "查询直播翻牌配置详情失败", response.body().asString()));
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_wordConf, "查询直播翻牌配置详情失败", response.body().asString()));
}
//用户任务完成
//签到
@Test(description = "用户签到", priority = 3)
public void 用户签到() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
// params.put("markIds",);
Response response = network.postResponse(params, BasicConfig.MOBILE_checkIn);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(response.body().asString());
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_checkIn, "用户签到失败", response.body().asString()));
}
//分享助力
@Test(description = "访客H分享直播间", priority = 3)
public void 访客H分享直播间() {
......@@ -102,8 +116,8 @@ public class FlipCard implements Authorization {
Map<String, Object> infoParam = new HashMap<>();
infoParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
infoParam.put("shareSign",shareSign);
infoParam.put("shareType",8);
infoParam.put("confId",cardConfId);
infoParam.put("shareType",12);
// infoParam.put("confId",);
Response response = network.getResponse(infoParam, BasicConfig.MOBILE_info);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
......@@ -118,8 +132,8 @@ public class FlipCard implements Authorization {
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("shareSign",shareSign);
params.put("shareType",8);
params.put("confId",cardConfId);
params.put("shareType",12);
// params.put("confId",);
Response response = network.postResponse(params, BasicConfig.MOBILE_assist);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
......@@ -127,30 +141,92 @@ public class FlipCard implements Authorization {
}
//预约
@Test(description = "翻牌集字_预约", priority = 8)
public void 翻牌集字_预约() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("bizType",2);
// params.put("bizId",);
// params.put("markIds",);
Response response = network.postResponse(params, BasicConfig.MOBILE_appointment);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_appointment, "预约失败", response.body().asString()));
}
@Test(description = "用户邀请订阅", priority = 8)
public void 用户邀请订阅() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
List<Long> markIds = new ArrayList<>();
markIds.add(142L);
markIds.add(143L);
markIds.add(140L);
params.put("markIds", markIds);
Response response = network.postResponse(params, BasicConfig.MOBILE_appointment);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_appointment, "用户邀请订阅失败", response.body().asString()));
}
@Test(description = "开启翻牌", priority = 9)
public void 开启翻牌() {
@Test(description = "用户完成任务情况", priority = 8)
public void 用户完成任务情况() {
visitorAuth9();
for (int i =0;i<11;i++){
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_tasks);
System.out.println(response.body().asString());
boolean checkInStatus=response.jsonPath().getBoolean("data.checkInStatus");
Assert.assertTrue(checkInStatus, network.message(params, BasicConfig.MOBILE_tasks, "签到未完成", response.body().asString()));
boolean appointmentStatus=response.jsonPath().getBoolean("data.appointmentStatus");
Assert.assertTrue(appointmentStatus, network.message(params, BasicConfig.MOBILE_tasks, "预约失败", response.body().asString()));
int helpNum=response.jsonPath().getInt("data.helpNum");
Assert.assertTrue(helpNum==1, network.message(params, BasicConfig.MOBILE_tasks, "助力用户数为null", response.body().asString()));
}
@Test(description = "用户参与翻牌详情", priority = 13)
public void 用户参与翻牌详情() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_record);
System.out.println(response.body().asString());
int leftNum =response.jsonPath().getJsonObject("data.leftNum");
Assert.assertNotNull(leftNum, network.message(params, BasicConfig.MOBILE_record, "翻牌次数不足", response.body().asString()));
}
@Test(description = "翻牌", priority = 9)
public void 翻牌() {
visitorAuth9();
for (int i =0;i<6;i++){
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
params.put("turnType",1);//1-活动页翻牌,2-助力翻牌
params.put("slot",i);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_cardOpen);
Response response = network.postResponse(params, BasicConfig.MOBILE_turn);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_cardOpen, "翻牌开启失败", response.body().asString()));
ThreadSleepUtils.sleep(5000);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_turn, "翻牌开启失败", response.body().asString()));
ThreadSleepUtils.sleep(5000);
Map<String, Object> infoParam = new HashMap<>();
infoParam.put("cardConfId",cardConfId);
infoParam.put("turnType",1);
infoParam.put("slot",i);
infoParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response infoRes = network.getResponse(params, BasicConfig.MOBILE_participateInfo);
Response infoRes = network.getResponse(params, BasicConfig.MOBILE_turnState);
Object data1 = infoRes.jsonPath().getJsonObject("data");
System.out.println(data1);
Assert.assertNotNull(data1, network.message(params, BasicConfig.MOBILE_participateInfo, "用户H翻牌参与详情查询失败", infoRes.body().asString()));
Assert.assertNotNull(data1, network.message(params, BasicConfig.MOBILE_turnState, "用户H翻牌参与详情查询失败", infoRes.body().asString()));
}
......@@ -160,60 +236,81 @@ public class FlipCard implements Authorization {
}
@Test(description = "用户翻牌参与信息", priority = 10)
public void 用户翻牌参与信息() {
@Test(description = "翻牌集字领取历史记录", priority = 13)
public void 翻牌集字领取历史记录() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
Response response = network.getResponse(params, BasicConfig.MOBILE_userInfo);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Integer totalAmount =response.jsonPath().getJsonObject("data.totalAmount");
System.out.println(totalAmount);
Assert.assertTrue(totalAmount==100, network.message(params, BasicConfig.MOBILE_userInfo, "查询用户翻牌参与信息失败", response.body().asString()));
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
Response response = network.getResponse(params, BasicConfig.MOBILE_history);
System.out.println(response.body().asString());
Object data =response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_history, "集字历史记录为null", response.body().asString()));
}
//提现
@Test(description = "提现", priority = 11)
public void 提现() {
//开红包
@Test(description = "用户开红包资格查询", priority = 13)
public void 用户开红包资格查询() {
visitorAuth9();
ThreadSleepUtils.sleep(5000);
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_withdrawal);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_withdrawal, "提现失败", response.body().asString()));
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_finishStatus);
System.out.println(response.body().asString());
boolean flipStatus =response.jsonPath().getBoolean("data.flipStatus");
Assert.assertTrue(flipStatus, network.message(params, BasicConfig.MOBILE_finishStatus, "未完成集字", response.body().asString()));
int redStatus =response.jsonPath().getInt("data.redStatus");
Assert.assertTrue(redStatus==1, network.message(params, BasicConfig.MOBILE_finishStatus, "开红包", response.body().asString()));
}
@Test(description = "放弃开红包", priority = 13)
public void 放弃开红包() {
visitorAuth9();
ThreadSleepUtils.sleep(5000);
Map<String, Object> params = new HashMap<>();
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_abort);
System.out.println(response.body().asString());
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_abort, "放弃开红包报异常", response.body().asString()));
}
//提现结果
@Test(description = "提现结果", priority = 12)
public void 提现结果() {
@Test(description = "开红包", priority = 13)
public void 开红包() {
visitorAuth9();
ThreadSleepUtils.sleep(3000);
ThreadSleepUtils.sleep(5000);
Map<String, Object> params = new HashMap<>();
params.put("cardConfId", cardConfId);
Response response = network.getResponse(params, BasicConfig.MOBILE_withdrawalResult);
Integer status = response.jsonPath().getInt("data.status");
System.out.println(status);
Assert.assertTrue(status == 2, network.message(params, BasicConfig.MOBILE_withdrawalResult, "提现失败", response.body().asString()));
}
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_redOpen);
System.out.println(response.body().asString());
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_redOpen, "开红包失败", response.body().asString()));
}
//提现记录
@Test(description = "提现记录", priority = 13)
public void 提现记录() {
@Test(description = "开红包结果", priority = 13)
public void 开红包结果() {
visitorAuth9();
ThreadSleepUtils.sleep(5000);
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
Response response = network.getResponse(params, BasicConfig.MOBILE_withdrawalRecord);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Integer withdrawalAmount =response.jsonPath().getInt("data.withdrawalAmount");
System.out.println(withdrawalAmount);
Assert.assertTrue(withdrawalAmount==100, network.message(params, BasicConfig.MOBILE_withdrawalRecord, "提现失败", response.body().asString()));
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_redOpenState);
System.out.println(response.body().asString());
int openStatus =response.jsonPath().getInt("data.openStatus");
Assert.assertTrue(openStatus==3, network.message(params, BasicConfig.MOBILE_redOpenState, "红包领取状态不对", response.body().asString()));
int redAmount =response.jsonPath().getInt("data.redAmount");
Assert.assertTrue(redAmount==30, network.message(params, BasicConfig.MOBILE_redOpenState, "红包金额不对", response.body().asString()));
}
}
......@@ -1408,24 +1408,23 @@ public class SaveLive implements Authorization {
}
/**
* 翻牌活动配置
* 翻牌集字活动配置
*/
// @Test(description = "保存翻牌配置", priority = 69)
// public void 保存翻牌配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("withdrawalAmount", 100);
// Params.put("withdrawalCondition", 1);
// Params.put("withdrawalNum", 1);
// Params.put("invitePresentNum", 1);
// Params.put("initPresentNum", 10);
// Params.put("imgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
// Params.put("secondImgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
// Response response = network.postResponse(Params, BasicConfig.MANAGER_card);
// Params.put("showAmount", 100);
// Params.put("personalShowAmount",1);
// Params.put("inviteNum",1);
// Params.put("invitePresentNum",1);
// Params.put("amount", 1);
// Params.put("num", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_flipWord);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_card, "保存翻牌配置失败", response.body().asString()));
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_flipWord, "保存翻牌配置失败", response.body().asString()));
//
// }
//
......@@ -1433,10 +1432,10 @@ public class SaveLive implements Authorization {
// public void 查看直播翻牌配置详情() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_cardDetail);
// Response response = network.getResponse(Params, BasicConfig.MANAGER_wordDetail);
// Object data = response.jsonPath().getJsonObject("data");
// System.out.println(data);
// Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_cardDetail, "查看直播翻牌配置详情失败", response.body().asString()));
// Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_wordDetail, "查看直播翻牌配置详情失败", response.body().asString()));
//
// }
//
......@@ -1446,10 +1445,10 @@ public class SaveLive implements Authorization {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("confStatus", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_switch);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_wordSwitchStatus);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switch, "开启翻牌配置失败", response.body().asString()));
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_wordSwitchStatus, "开启翻牌配置失败", response.body().asString()));
//
// }
//
......@@ -1458,13 +1457,13 @@ public class SaveLive implements Authorization {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
// boolean cardConfBuildStatus = response.jsonPath().getBoolean("data.cardConfBuildStatus");
// System.out.println(cardConfBuildStatus);
// Assert.assertTrue(cardConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
// boolean flipWordConfBuildStatus = response.jsonPath().getBoolean("data.flipWordConfBuildStatus");
// System.out.println(flipWordConfBuildStatus);
// Assert.assertTrue(flipWordConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
//
// boolean cardConfStatus = response.jsonPath().getBoolean("data.cardConfStatus");
// System.out.println(cardConfStatus);
// Assert.assertTrue(cardConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
// boolean flipWordConfStatus = response.jsonPath().getBoolean("data.flipWordConfStatus");
// System.out.println(flipWordConfStatus);
// Assert.assertTrue(flipWordConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
//
//
// }
......@@ -1749,6 +1748,7 @@ public class SaveLive implements Authorization {
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_redSwitchStatus, "开启攒现金红包配置失败", response.body().asString()));
}
/**
* 闯关答题
*/
......@@ -2012,11 +2012,27 @@ public class SaveLive implements Authorization {
}
@Test(description = "查看直播好运配置状态", priority = 108)
public void 查看直播好运配置状态() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
boolean configFortune = response.jsonPath().getBoolean("data.configFortune");
System.out.println(configFortune);
Assert.assertTrue(configFortune, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置好运红包", response.body().asString()));
boolean fortuneConfBuildStatus = response.jsonPath().getBoolean("data.fortuneConfBuildStatus");
System.out.println(fortuneConfBuildStatus);
Assert.assertTrue(fortuneConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启好运红包配置", response.body().asString()));
}
/**
* 直播预告页弹窗
*/
@Test(description = "直播预告页弹窗配置", priority = 108)
@Test(description = "直播预告页弹窗配置", priority = 109)
public void 直播预告页弹窗配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
......@@ -2031,7 +2047,7 @@ public class SaveLive implements Authorization {
}
@Test(description = "预告页弹窗详情", priority = 109)
@Test(description = "预告页弹窗详情", priority = 110)
public void 预告页弹窗详情() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
......@@ -2042,7 +2058,7 @@ public class SaveLive implements Authorization {
}
@Test(description = "开启预告页弹窗", priority = 110)
@Test(description = "开启预告页弹窗", priority = 111)
public void 开启预告页弹窗() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
......@@ -2054,7 +2070,25 @@ public class SaveLive implements Authorization {
}
@Test(description = "查看直播预告页弹窗配置状态", priority = 112)
public void 查看直播预告页弹窗配置状态() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
boolean preLayerConfStatus = response.jsonPath().getBoolean("data.preLayerConfStatus");
System.out.println(preLayerConfStatus);
Assert.assertTrue(preLayerConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置预告页弹窗", response.body().asString()));
boolean preLayerOpenStatus = response.jsonPath().getBoolean("data.preLayerOpenStatus");
System.out.println(preLayerOpenStatus);
Assert.assertTrue(preLayerOpenStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启预告页弹窗", response.body().asString()));
}
}
......@@ -259,9 +259,6 @@ public class Lottery implements Authorization {
submitInfoParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
submitInfoParam.put("confId", this.List_ConfId.get(0).getWelfareConfId());
submitInfoParam.put("winnerName", "中奖姓名XX");
// submitInfoParam.put("region", "");
// submitInfoParam.put("location", "");
// submitInfoParam.put("phoneNum", "");
Response submitInfoRes = network.postResponse(submitInfoParam, BasicConfig.USER_submitInfo);
Boolean result = submitInfoRes.jsonPath().getBoolean("success");
System.out.println(result);
......@@ -269,24 +266,9 @@ public class Lottery implements Authorization {
ThreadSleepUtils.sleep(3000);
}
@Test(description = "访客A中奖任务", priority = 19)
public void 访客A中奖任务() {
visitorAuth();
ThreadSleepUtils.sleep(1000);
Map<String, Object> luckDetailParam = new HashMap<>();
luckDetailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response luckDetailRes = network.getResponse(luckDetailParam, BasicConfig.ANCHOR_luckDetail);
try {
Boolean hasDrawTask = luckDetailRes.jsonPath().getBoolean("data.hasDrawTask");
Assert.assertTrue(hasDrawTask, network.message(luckDetailParam, BasicConfig.USER_result, "查询中奖任务失败", luckDetailRes.body().asString()));
} catch (Exception e) {
System.out.println("result = " + JSON.toJSONString(luckDetailRes.jsonPath().get()));
throw e;
}
}
@Test(description = "访客A中奖任务_分享直播间", priority = 20)
public void 访客A中奖任务_分享直播间() {
@Test(description = "访客A_分享直播间", priority = 19)
public void 访客A_分享直播间() {
visitorAuth();
ThreadSleepUtils.sleep(1000);
Map<String, Object> signParam = new HashMap<>();
......@@ -300,8 +282,9 @@ public class Lottery implements Authorization {
}
@Test(description = "中奖任务邀请C关系绑定", priority = 21)
public void 中奖任务邀请C关系绑定() {
@Test(description = "邀请C关系绑定", priority = 20)
public void 邀请C关系绑定() {
visitorAuth3();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -313,8 +296,8 @@ public class Lottery implements Authorization {
}
@Test(description = "中奖任务邀请C绑定结果和绑定凭证", priority = 22)
public void 获取访客C绑定结果和绑定凭证() {
@Test(description = "邀请C绑定结果和绑定凭证", priority = 22)
public void 邀请C绑定结果和绑定凭证() {
visitorAuth3();
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
......@@ -326,24 +309,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客C给访客A助力", priority = 23)
public void 访客C给访客A助力() {
visitorAuth3();
ThreadSleepUtils.sleep(2000);
Map<String, Object> assistParam = new HashMap<>();
assistParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
assistParam.put("shareSign",shareSign);
assistParam.put("shareType",3);
assistParam.put("confId",this.List_ConfId.get(0).getWelfareConfId());
Response response = network.postResponse(assistParam, BasicConfig.MOBILE_assist);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客C给访客A助力失败", response.body().asString()));
}
@Test(description = "访客C到场", priority = 24)
@Test(description = "访客C到场", priority = 23)
public void 访客C到场() {
visitorAuth3();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -354,20 +320,9 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
//访客B绑定访客A后获取访客A的中奖任务信息
@Test(description = "访客C获取访客A的中奖任务信息", priority = 25)
public void 访客C获取访客A的中奖任务信息() {
visitorAuth3();
Map<String, Object> inviteDrawDetailParam = new HashMap<>();
inviteDrawDetailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response inviteDrawDetailRes = network.getResponse(inviteDrawDetailParam, BasicConfig.ANCHOR_inviteDrawDetail);
Object result = inviteDrawDetailRes.jsonPath().getJsonObject("success");
System.out.println(result);
Assert.assertNotNull(result, network.message(inviteDrawDetailParam, BasicConfig.ANCHOR_inviteDrawDetail, "查询邀请人中奖信息失败", inviteDrawDetailRes.body().asString()));
}
@Test(description = "访客C关注直播间", priority = 26)
@Test(description = "访客C关注直播间", priority = 24)
public void 访客C关注直播间() {
visitorAuth3();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -378,7 +333,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客C抽奖码数量", priority = 27)
@Test(description = "访客C抽奖码数量", priority = 25)
public void 访客C抽奖码数量() {
visitorAuth3();
ThreadSleepUtils.sleep(1000);
......@@ -389,22 +344,89 @@ public class Lottery implements Authorization {
System.out.println(data);
Assert.assertNotNull(data, network.message(myCountParam, BasicConfig.USER_myCount, "获取抽奖码数量失败", myCountRes.body().asString()));
}
//好运红包
@Test(description = "分享者访客A获取好运红包", priority = 26)
public void 分享者访客A获取好运红包() {
visitorAuth();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("scene",4);
Response response = network.postResponse(Params, BasicConfig.ANCHOR_getRed);
System.out.println( response.body().asString());
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(Params, BasicConfig.ANCHOR_getRed, "好运红包获取失败", response.body().asString()));
}
@Test(description = "访客A中奖任务是否完成", priority = 28)
public void 访客A中奖任务是否完成() {
@Test(description = "访客A分享好运红包给访客B", priority = 27)
public void 访客A分享好运红包给访客B() {
visitorAuth();
ThreadSleepUtils.sleep(1000);
Map<String, Object> luckDetailParam = new HashMap<>();
luckDetailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response luckDetailRes = network.getResponse(luckDetailParam, BasicConfig.ANCHOR_luckDetail);
boolean hasDrawTask = luckDetailRes.jsonPath().getJsonObject("data.hasDrawTask");
System.out.println(hasDrawTask);
Assert.assertTrue(hasDrawTask, network.message(luckDetailParam, BasicConfig.ANCHOR_luckDetail, "查询中奖任务失败", luckDetailRes.body().asString()));
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("shareType",11);
Response response = network.getResponse(Params, BasicConfig.MOBILE_helpInfo);
System.out.println( response.body().asString());
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(Params, BasicConfig.MOBILE_helpInfo, "分享失败", response.body().asString()));
}
@Test(description = "访客B获取好运红包领取记录", priority = 28)
public void 访客B获取好运红包领取记录() {
visitorAuth13();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MOBILE_receiveRecord);
System.out.println( response.body().asString());
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(Params, BasicConfig.MOBILE_receiveRecord, "访客B获取好运红包领取记录失败", response.body().asString()));
}
@Test(description = "访客B领取好运红包", priority = 29)
public void 访客B领取好运红包() {
visitorAuth13();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("shareUserId","Kj20ODYz");
Response response = network.postResponse(Params, BasicConfig.MOBILE_receiverOpen);
System.out.println( response.body().asString());
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(Params, BasicConfig.MOBILE_receiverOpen, "访客B领取好运红包失败", response.body().asString()));
}
@Test(description = "访客B参与记录", priority = 30)
public void 访客B参与记录() {
visitorAuth13();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("shareUserId","Kj20ODYz");
Response response = network.getResponse(Params, BasicConfig.MOBILE_joinRecord);
System.out.println( response.body().asString());
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(Params, BasicConfig.MOBILE_joinRecord, "访客B参与记录查询失败", response.body().asString()));
}
@Test(description = "访客A抽奖券列表", priority = 29)
@Test(description = "访客A获取好运红包领取记录", priority = 31)
public void 访客A获取好运红包领取记录() {
visitorAuth13();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("shareUserId","Kj20ODYz");
Response response = network.getResponse(Params, BasicConfig.MOBILE_joinRecord);
System.out.println( response.body().asString());
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(Params, BasicConfig.MOBILE_joinRecord, "访客A获取好运红包领取记录失败", response.body().asString()));
}
@Test(description = "访客A抽奖券列表", priority = 32)
public void 访客A抽奖券列表() {
visitorAuth();
ThreadSleepUtils.sleep(3000);
......@@ -415,18 +437,18 @@ public class Lottery implements Authorization {
Response myLotteryCodeRes = network.getResponse(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode);
Object data = myLotteryCodeRes.jsonPath().getJsonObject("data");
System.out.println(data);
List<Object> values = myLotteryCodeRes.jsonPath().getList("data.list");
boolean result = false;
for (Object value : values) {
if (Objects.equals(((Map) value).get("codeSource"), 5)) {
result = true;
break;
}
}
Assert.assertTrue(result, network.message(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode, "查询访客A抽奖券列表失败", myLotteryCodeRes.body().asString()));
}
@Test(description = "访客A抽奖码数量", priority = 30)
// List<Object> values = myLotteryCodeRes.jsonPath().getList("data.list");
// boolean result = false;
// for (Object value : values) {
// if (Objects.equals(((Map) value).get("codeSource"), 5)) {
// result = true;
// break;
// }
// }
Assert.assertNotNull(data, network.message(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode, "查询访客A抽奖券列表失败", myLotteryCodeRes.body().asString()));
}
@Test(description = "访客A抽奖码数量", priority = 33)
public void 访客A抽奖码数量() {
visitorAuth();
ThreadSleepUtils.sleep(500);
......@@ -439,7 +461,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B幸运任务", priority = 31)
@Test(description = "访客B幸运任务", priority = 34)
public void 访客B幸运任务() {
visitorAuth2();
ThreadSleepUtils.sleep(3000);
......@@ -457,7 +479,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B直播中分享直播间", priority = 32)
@Test(description = "访客B直播中分享直播间", priority = 35)
public void 访客B直播中分享直播间() {
visitorAuth2();
Map<String, Object> signParam = new HashMap<>();
......@@ -472,7 +494,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请D关系绑定", priority = 33)
@Test(description = "幸运任务邀请D关系绑定", priority = 36)
public void 幸运任务邀请D关系绑定() {
visitorAuth4();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -485,7 +507,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 34)
@Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 37)
public void 幸运任务邀请D绑定结果和绑定凭证() {
visitorAuth4();
ThreadSleepUtils.sleep(2000);
......@@ -498,7 +520,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客D给访客B助力", priority = 35)
@Test(description = "访客D给访客B助力", priority = 38)
public void 访客D给访客B助力() {
visitorAuth4();
ThreadSleepUtils.sleep(2000);
......@@ -513,7 +535,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客D给访客B助力失败", response.body().asString()));
}
@Test(description = "访客D到场", priority = 36)
@Test(description = "访客D到场", priority = 39)
public void 访客D到场() {
visitorAuth4();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -524,7 +546,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", response.body().asString()));
}
@Test(description = "访客D关注直播间", priority = 37)
@Test(description = "访客D关注直播间", priority = 40)
public void 访客D关注直播间() {
visitorAuth4();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -535,7 +557,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客D抽奖码数量", priority = 38)
@Test(description = "访客D抽奖码数量", priority = 41)
public void 访客D抽奖码数量() {
visitorAuth4();
ThreadSleepUtils.sleep(500);
......@@ -548,7 +570,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请E关系绑定", priority = 39)
@Test(description = "幸运任务邀请E关系绑定", priority = 42)
public void 幸运任务邀请E关系绑定() {
visitorAuth5();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -561,7 +583,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请E绑定结果和绑定凭证", priority = 40)
@Test(description = "幸运任务邀请E绑定结果和绑定凭证", priority = 43)
public void 幸运任务邀请E绑定结果和绑定凭证() {
visitorAuth5();
ThreadSleepUtils.sleep(2000);
......@@ -574,7 +596,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客E给访客B助力", priority = 41)
@Test(description = "访客E给访客B助力", priority = 44)
public void 访客E给访客B助力() {
visitorAuth5();
ThreadSleepUtils.sleep(2000);
......@@ -589,7 +611,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客E给访客B助力失败", response.body().asString()));
}
@Test(description = "访客E到场", priority = 42)
@Test(description = "访客E到场", priority = 45)
public void 访客E到场() {
visitorAuth5();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -600,7 +622,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
@Test(description = "访客E关注直播间", priority = 43)
@Test(description = "访客E关注直播间", priority = 46)
public void 访客E关注直播间() {
visitorAuth5();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -611,7 +633,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", response.body().asString()));
}
@Test(description = "访客E抽奖码数量", priority = 44)
@Test(description = "访客E抽奖码数量", priority = 47)
public void 访客E抽奖码数量() {
visitorAuth5();
ThreadSleepUtils.sleep(500);
......@@ -624,7 +646,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请F关系绑定", priority = 45)
@Test(description = "幸运任务邀请F关系绑定", priority = 48)
public void 幸运任务邀请F关系绑定() {
visitorAuth6();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -637,7 +659,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请F绑定结果和绑定凭证", priority = 46)
@Test(description = "幸运任务邀请F绑定结果和绑定凭证", priority = 49)
public void 幸运任务邀请F绑定结果和绑定凭证() {
visitorAuth6();
ThreadSleepUtils.sleep(2000);
......@@ -649,7 +671,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客F给访客B助力", priority = 47)
@Test(description = "访客F给访客B助力", priority = 50)
public void 访客F给访客B助力() {
visitorAuth6();
ThreadSleepUtils.sleep(2000);
......@@ -664,7 +686,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客F给访客B助力失败", response.body().asString()));
}
@Test(description = "访客F到场", priority = 48)
@Test(description = "访客F到场", priority = 51)
public void 访客F到场() {
visitorAuth6();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -675,7 +697,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", response.body().asString()));
}
@Test(description = "访客F关注直播间", priority = 49)
@Test(description = "访客F关注直播间", priority = 52)
public void 访客F关注直播间() {
visitorAuth6();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -686,7 +708,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客F抽奖码数量", priority = 50)
@Test(description = "访客F抽奖码数量", priority = 53)
public void 访客F抽奖码数量() {
visitorAuth6();
ThreadSleepUtils.sleep(500);
......@@ -700,7 +722,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请G关系绑定", priority = 51)
@Test(description = "幸运任务邀请G关系绑定", priority = 54)
public void 幸运任务邀请G关系绑定() {
visitorAuth7();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -713,7 +735,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请G绑定结果和绑定凭证", priority = 52)
@Test(description = "幸运任务邀请G绑定结果和绑定凭证", priority = 55)
public void 幸运任务邀请G绑定结果和绑定凭证() {
visitorAuth7();
ThreadSleepUtils.sleep(2000);
......@@ -725,7 +747,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客G给访客B助力", priority = 53)
@Test(description = "访客G给访客B助力", priority = 56)
public void 访客G给访客B助力() {
visitorAuth7();
ThreadSleepUtils.sleep(2000);
......@@ -740,7 +762,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客G给访客B助力失败", response.body().asString()));
}
@Test(description = "访客G到场", priority = 54)
@Test(description = "访客G到场", priority = 57)
public void 访客G到场() {
visitorAuth7();//黑名单用户
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -751,7 +773,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
@Test(description = "访客G关注直播间", priority = 55)
@Test(description = "访客G关注直播间", priority = 58)
public void 访客G关注直播间() {
visitorAuth7();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -762,7 +784,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客G抽奖码数量", priority = 56)
@Test(description = "访客G抽奖码数量", priority = 59)
public void 访客G抽奖码数量() {
visitorAuth7();
ThreadSleepUtils.sleep(500);
......@@ -776,7 +798,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B幸运任务是否完成", priority = 57)
@Test(description = "访客B幸运任务是否完成", priority = 60)
public void 访客B幸运任务是否完成() {
visitorAuth2();
ThreadSleepUtils.sleep(3000);
......@@ -789,7 +811,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B的抽奖券列表", priority = 58)
@Test(description = "访客B的抽奖券列表", priority = 61)
public void 访客B的抽奖券列表() {
visitorAuth2();
ThreadSleepUtils.sleep(3000);
......@@ -810,7 +832,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B的抽奖码数量", priority = 59)
@Test(description = "访客B的抽奖码数量", priority = 62)
public void 访客B抽奖码数量() {
visitorAuth2();
ThreadSleepUtils.sleep(3000);
......@@ -823,7 +845,7 @@ public class Lottery implements Authorization {
}
@Test(description = "开始第二轮抽奖", priority = 60)
@Test(description = "开始第二轮抽奖", priority = 63)
public void 开始第二轮抽奖() {
adminAuth();
ThreadSleepUtils.sleep(1000);
......@@ -836,7 +858,7 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第二轮抽奖失败", startRes.body().asString()));
}
@Test(description = "查询第二轮正在抽奖的福利", priority = 61)
@Test(description = "查询第二轮正在抽奖的福利", priority = 64)
public void 查询第二轮正在抽奖的福利() {
visitorAuth3();
ThreadSleepUtils.sleep(1000);
......@@ -850,7 +872,7 @@ public class Lottery implements Authorization {
}
@Test(description = "查询第二轮是否可以结束抽奖状态", priority = 62)
@Test(description = "查询第二轮是否可以结束抽奖状态", priority = 65)
public void 查询第二轮是否可以结束抽奖状态() {
adminAuth();
ThreadSleepUtils.sleep(3000);
......@@ -863,7 +885,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString()));
}
@Test(description = "结束第二轮抽奖", priority = 63)
@Test(description = "结束第二轮抽奖", priority = 66)
public void 结束第二轮抽奖() {
adminAuth();
Map<String, Object> endParam = new HashMap<>();
......@@ -876,7 +898,7 @@ public class Lottery implements Authorization {
}
//昵称:刘超 孝感区域指定中奖
@Test(description = "孝感访客C是否中奖", priority = 64)
@Test(description = "孝感访客C是否中奖", priority = 67)
public void 孝感访客C是否中奖() {
visitorAuth3();
ThreadSleepUtils.sleep(3000);
......@@ -895,7 +917,7 @@ public class Lottery implements Authorization {
}
//昵称:李执--区域中奖用户
@Test(description = "北京访客D查询是否中奖", priority = 65)
@Test(description = "北京访客D查询是否中奖", priority = 68)
public void 北京访客D查询是否中奖() {
visitorAuth4();
ThreadSleepUtils.sleep(3000);
......@@ -914,7 +936,7 @@ public class Lottery implements Authorization {
}
//昵称:周成
@Test(description = "杭州访客E是否中奖", priority = 66)
@Test(description = "杭州访客E是否中奖", priority = 69)
public void 杭州访客E是否中奖() {
visitorAuth5();
ThreadSleepUtils.sleep(3000);
......@@ -934,7 +956,7 @@ public class Lottery implements Authorization {
}
//昵称:新强
@Test(description = "厦门访客F是否中奖", priority = 67)
@Test(description = "厦门访客F是否中奖", priority = 70)
public void 厦门访客F是否中奖() {
visitorAuth6();
ThreadSleepUtils.sleep(3000);
......@@ -953,7 +975,7 @@ public class Lottery implements Authorization {
}
//黑名单用户过滤
@Test(description = "黑名单访客G是否中奖", priority = 68)
@Test(description = "黑名单访客G是否中奖", priority = 71)
public void 黑名单访客G是否中奖() {
visitorAuth7();
ThreadSleepUtils.sleep(3000);
......@@ -974,7 +996,7 @@ public class Lottery implements Authorization {
//第三轮企业指定中奖
@Test(description = "开始第三轮抽奖", priority = 69)
@Test(description = "开始第三轮抽奖", priority = 72)
public void 开始第三轮抽奖() {
adminAuth();
ThreadSleepUtils.sleep(1000);
......@@ -987,7 +1009,7 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第三轮抽奖失败", startRes.body().asString()));
}
@Test(description = "查询第三轮正在抽奖的福利", priority = 70)
@Test(description = "查询第三轮正在抽奖的福利", priority = 73)
public void 查询第三轮正在抽奖的福利() {
visitorAuth6();
ThreadSleepUtils.sleep(1000);
......@@ -1001,7 +1023,7 @@ public class Lottery implements Authorization {
}
@Test(description = "查询第三轮是否可以结束抽奖状态", priority = 71)
@Test(description = "查询第三轮是否可以结束抽奖状态", priority = 74)
public void 查询第三轮是否可以结束抽奖状态() {
adminAuth();
ThreadSleepUtils.sleep(3000);
......@@ -1014,7 +1036,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString()));
}
@Test(description = "结束第三轮抽奖", priority = 72)
@Test(description = "结束第三轮抽奖", priority = 75)
public void 结束第三轮抽奖() {
adminAuth();
Map<String, Object> endParam = new HashMap<>();
......@@ -1026,7 +1048,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(endParam, BasicConfig.ANCHOR_end, "结束第三轮抽奖失败", endRes.body().asString()));
}
@Test(description = "企业指定访客E是否中奖", priority = 73)
@Test(description = "企业指定访客E是否中奖", priority = 76)
public void 企业指定访客E是否中奖() {
visitorAuth5();
ThreadSleepUtils.sleep(3000);
......@@ -1047,7 +1069,7 @@ public class Lottery implements Authorization {
//第4轮团队指定份数
@Test(description = "不在指定团队访客H到场", priority = 74)
@Test(description = "不在指定团队访客H到场", priority = 77)
public void 访客H到场() {
visitorAuth9();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -1058,7 +1080,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
@Test(description = "访客H关注直播间", priority = 75)
@Test(description = "访客H关注直播间", priority = 78)
public void 访客H关注直播间() {
visitorAuth9();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -1069,7 +1091,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客H抽奖码数量", priority = 76)
@Test(description = "访客H抽奖码数量", priority = 79)
public void 访客H抽奖码数量() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -1083,7 +1105,7 @@ public class Lottery implements Authorization {
}
@Test(description = "不在指定团队访客I到场", priority = 77)
@Test(description = "不在指定团队访客I到场", priority = 80)
public void 访客I到场() {
visitorAuth8();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -1094,7 +1116,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
@Test(description = "访客I关注直播间", priority = 78)
@Test(description = "访客I关注直播间", priority = 81)
public void 访客I关注直播间() {
visitorAuth8();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -1105,7 +1127,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客I抽奖码数量", priority = 79)
@Test(description = "访客I抽奖码数量", priority = 82)
public void 访客I抽奖码数量() {
visitorAuth8();
ThreadSleepUtils.sleep(1000);
......@@ -1119,7 +1141,7 @@ public class Lottery implements Authorization {
}
@Test(description = "指定团队访客J到场", priority = 80)
@Test(description = "指定团队访客J到场", priority = 83)
public void 访客J到场() {
visitorAuth10();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -1130,7 +1152,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
@Test(description = "访客J关注直播间", priority = 81)
@Test(description = "访客J关注直播间", priority = 84)
public void 访客J关注直播间() {
visitorAuth10();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -1141,7 +1163,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客J抽奖码数量", priority = 82)
@Test(description = "访客J抽奖码数量", priority = 85)
public void 访客J抽奖码数量() {
visitorAuth10();
ThreadSleepUtils.sleep(1000);
......@@ -1154,7 +1176,7 @@ public class Lottery implements Authorization {
}
@Test(description = "开始第四轮抽奖", priority = 83)
@Test(description = "开始第四轮抽奖", priority = 86)
public void 开始第四轮抽奖() {
adminAuth();
ThreadSleepUtils.sleep(1000);
......@@ -1167,7 +1189,7 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第四轮抽奖失败", startRes.body().asString()));
}
@Test(description = "查询第四轮正在抽奖的福利", priority = 84)
@Test(description = "查询第四轮正在抽奖的福利", priority = 87)
public void 查询第四轮正在抽奖的福利() {
visitorAuth6();
ThreadSleepUtils.sleep(1000);
......@@ -1181,7 +1203,7 @@ public class Lottery implements Authorization {
}
@Test(description = "查询第四轮是否可以结束抽奖状态", priority = 85)
@Test(description = "查询第四轮是否可以结束抽奖状态", priority = 88)
public void 查询第四轮是否可以结束抽奖状态() {
adminAuth();
ThreadSleepUtils.sleep(3000);
......@@ -1194,7 +1216,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString()));
}
@Test(description = "结束第四轮抽奖", priority = 86)
@Test(description = "结束第四轮抽奖", priority = 89)
public void 结束第四轮抽奖() {
adminAuth();
Map<String, Object> endParam = new HashMap<>();
......@@ -1208,7 +1230,7 @@ public class Lottery implements Authorization {
//企业已指定不能再中奖
@Test(description = "团队指定访客E是否中奖", priority = 87)
@Test(description = "团队指定访客E是否中奖", priority = 90)
public void 团队指定访客E是否中奖() {
visitorAuth5();
ThreadSleepUtils.sleep(3000);
......@@ -1226,7 +1248,7 @@ public class Lottery implements Authorization {
}
//团队分配制定中奖
@Test(description = "团队指定访客是否中奖", priority = 88)
@Test(description = "团队指定访客是否中奖", priority = 91)
public void 团队指定访客是否中奖() {
ThreadSleepUtils.sleep(3000);
//构建参数
......@@ -1261,7 +1283,7 @@ public class Lottery implements Authorization {
//不在公司指定区域内的用户
@Test(description = "团队指定访客F是否中奖", priority = 89)
@Test(description = "团队指定访客F是否中奖", priority = 92)
public void 团队指定访客F是否中奖() {
visitorAuth6();
ThreadSleepUtils.sleep(3000);
......@@ -1280,7 +1302,7 @@ public class Lottery implements Authorization {
@Test(description = "不在团队指定访客I是否中奖", priority = 90)
@Test(description = "不在团队指定访客I是否中奖", priority = 93)
public void 不在团队指定访客I是否中奖() {
visitorAuth8();
ThreadSleepUtils.sleep(3000);
......@@ -1298,7 +1320,7 @@ public class Lottery implements Authorization {
}
@Test(description = "开始第五轮抽奖", priority = 91)
@Test(description = "开始第五轮抽奖", priority = 94)
public void 开始第五轮抽奖() {
adminAuth();
ThreadSleepUtils.sleep(1000);
......@@ -1311,7 +1333,7 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第五轮抽奖失败", startRes.body().asString()));
}
@Test(description = "查询第五轮正在抽奖的福利", priority = 92)
@Test(description = "查询第五轮正在抽奖的福利", priority = 95)
public void 查询第五轮正在抽奖的福利() {
visitorAuth6();
ThreadSleepUtils.sleep(1000);
......@@ -1325,7 +1347,7 @@ public class Lottery implements Authorization {
}
@Test(description = "查询第五轮是否可以结束抽奖状态", priority = 93)
@Test(description = "查询第五轮是否可以结束抽奖状态", priority = 96)
public void 查询第五轮是否可以结束抽奖状态() {
adminAuth();
ThreadSleepUtils.sleep(3000);
......@@ -1338,7 +1360,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString()));
}
@Test(description = "结束第五轮抽奖", priority = 94)
@Test(description = "结束第五轮抽奖", priority = 97)
public void 结束第五轮抽奖() {
adminAuth();
Map<String, Object> endParam = new HashMap<>();
......@@ -1352,7 +1374,7 @@ public class Lottery implements Authorization {
//团队分配指定中奖
@Test(description = "普通抽奖轮次访客是否中奖", priority = 95)
@Test(description = "普通抽奖轮次访客是否中奖", priority = 98)
public void 普通抽奖轮次访客是否中奖() {
ThreadSleepUtils.sleep(3000);
//构建参数
......
......@@ -99,10 +99,12 @@ public class BasicConfig {
public static final String MANAGER_redConfDetail = MANAGER_HOST + "/kjy/manager/live/fortune/red/confDetail";
public static final String MANAGER_redSwitch = MANAGER_HOST + "/kjy/manager/live/fortune/red/status/switch";
public static final String MANAGER_insertOrUpdate = MANAGER_HOST + "/kjy/manager/live/pre/conf/insertOrUpdate";
public static final String MANAGER_preLayer = MANAGER_HOST + "/kjy/manager/live/pre/conf/preLayer";
public static final String MANAGER_openPreLayer = MANAGER_HOST + "/kjy/manager/live/pre/conf/openPreLayer";
public static final String MOBILE_receiveRecord = MOBILE_HOST + "/kjy/live/fortune/receiver/receiveRecord";
public static final String MOBILE_receiverOpen= MOBILE_HOST + "/kjy/live/fortune/receiver/open";
public static final String MOBILE_joinRecord= MOBILE_HOST + "/kjy/live/fortune/receiver/joinRecord";
// *************** 闯关答题 ***************
public static final String MANAGER_addOrUpdateQues = MANAGER_HOST + "/kjy/manager/pass/ques/addOrUpdateQues";
......@@ -176,20 +178,25 @@ public class BasicConfig {
public static final String ANCHOR_listLiveFreeReward = MOBILE_HOST + "/kjy/live/lottery/listLiveFreeReward";
public static final String ANCHOR_receive = MOBILE_HOST + "/kjy/live/user/lottery/receive";
// *************** 翻牌红包 ***************
public static final String MANAGER_card = MANAGER_HOST + "/kjy/manager/live/flip/card/save";
public static final String MANAGER_switch = MANAGER_HOST + "/kjy/manager/live/flip/card/status/switch";
public static final String MANAGER_cardDetail = MANAGER_HOST + "/kjy/manager/live/flip/card/detail";
public static final String MOBILE_status = MOBILE_HOST + "/kjy/live/flip/card/status";
public static final String MOBILE_cardDetail= MOBILE_HOST + "/kjy/live/flip/card/detail";
public static final String MOBILE_userInfo= MOBILE_HOST + "/kjy/live/flip/card/userInfo";
public static final String MOBILE_cardOpen= MOBILE_HOST + "/kjy/live/flip/card/open";
public static final String MOBILE_participateInfo= MOBILE_HOST + "/kjy/live/flip/card/participateInfo";
public static final String MOBILE_withdrawal= MOBILE_HOST + "/kjy/live/flip/card/withdrawal";
public static final String MOBILE_withdrawalResult= MOBILE_HOST + "/kjy/live/flip/card/withdrawalResult";
public static final String MOBILE_withdrawalRecord= MOBILE_HOST + "/kjy/live/flip/card/withdrawalRecord";
// *************** 翻牌集字红包 ***************
public static final String MANAGER_flipWord = MANAGER_HOST + "/kjy/manager/flip/word/saveOrUpdate";
public static final String MANAGER_wordSwitchStatus = MANAGER_HOST + "/kjy/manager/flip/word/switchStatus";
public static final String MANAGER_wordDetail = MANAGER_HOST + "/kjy/manager/flip/word/detail";
public static final String MOBILE_status = MOBILE_HOST + "/kjy/live/flip/word/status";
public static final String MOBILE_wordConf= MOBILE_HOST + "/kjy/live/flip/word/conf";
public static final String MOBILE_checkIn= MOBILE_HOST + "/kjy/live/flip/word/checkIn";
public static final String MOBILE_history= MOBILE_HOST + "/kjy/live/flip/word/user/history";
public static final String MOBILE_finishStatus= MOBILE_HOST + "/kjy/live/flip/word/user/finishStatus";
public static final String MOBILE_redOpen= MOBILE_HOST + "/kjy/live/flip/word/red/open";
public static final String MOBILE_redOpenState= MOBILE_HOST + "/kjy/live/flip/word/red/open/state";
public static final String MOBILE_abort= MOBILE_HOST + "/kjy/live/flip/word/red/abort";
public static final String MOBILE_appointment= MOBILE_HOST + "/kjy/live/user/appointment";
public static final String MOBILE_tasks= MOBILE_HOST + "/kjy/live/flip/word/user/tasks";
public static final String MOBILE_record= MOBILE_HOST + "/kjy/live/flip/word/user/record";
public static final String MOBILE_turn= MOBILE_HOST + "/kjy/live/flip/word/turn";
public static final String MOBILE_turnState= MOBILE_HOST + "/kjy/live/flip/word/turn/state";
// *************** 直播间过渡视频 ***************
public static final String MANAGER_confCaveOrUpdate = MANAGER_HOST + "/kjy/manager/live/trans/video/conf/saveOrUpdate";
public static final String MANAGER_videoSwitch = MANAGER_HOST + "/kjy/manager/live/trans/video/conf/status/switch";
......@@ -216,6 +223,10 @@ public class BasicConfig {
public static final String MOBILE_open= MOBILE_HOST + "/clue/guess/number/red/open";
public static final String MOBILE_result = MOBILE_HOST + "/clue/guess/number/red/result";
public static final String MANAGER_encode = MANAGER_HOST + "/kjy/manager/testUser/encode";
// *************** 宝箱裂变 ***************
public static final String MANAGER_getList4Admin = MANAGER_HOST + "/kjy/manager/welfare/pre/conf/getList4Admin";
public static final String MANAGER_saveTreasureConf = MANAGER_HOST + "/kjy/manager/live/treasure/saveTreasureConf";
......@@ -290,7 +301,7 @@ public class BasicConfig {
public static final String ANCHOR_status = MOBILE_HOST + "/conf/live/lottery/status";
public static final String ANCHOR_end = MOBILE_HOST + "/conf/live/lottery/end";
public static final String ANCHOR_luckDetail = MOBILE_HOST + "/clue/lottery/task/luckDetail";
public static final String ANCHOR_inviteDrawDetail = MOBILE_HOST + "/clue/lottery/task/inviteDrawDetail";
public static final String ANCHOR_getRed = MOBILE_HOST + "/kjy/live/fortune/sharer/getRed";
// *************** 访客端 ***************
public static final String USER_SUBSCRIBE = MOBILE_HOST + "/kjy/live/user/appointment/subscribe";
......@@ -567,6 +578,7 @@ public class BasicConfig {
public static final String ANIMATION_CONTENTID = "Kj21MzgzMTk";
public static final String GAME_CONTENTID = "Kj21NjIxNTk";
public static final String UPLOAD_CONTENTID = "Kj21NjA1NTE";
public static final String LOTTERY_CONTENTID = "Kj21MzQ3ODM"; // 营销工具抽奖暖冬大转盘素材ID
// *************** 公共 ***************
public static final String CREATE_USER = HOST + "/kjy/mp/autotest/create/user";
......@@ -581,7 +593,15 @@ public class BasicConfig {
public static final String CHECKUNREAD = HOST + "/kjy/mp/chat/checkUnread";
public static final String CONTENT_READ = HOST + "/kjy/mp/content/read";
public static final String INTERACTION_LIKE = HOST + "/kjy/mp/interaction/like";
public static final String GETTIPSBYPAGE = HOST + "/kjy/mp/tips/getTipsByPage";
public static final String USING_VERSION = HOST + "/kjy/mp/version/getInUseVersion";
public static final String DAILY_FIRST = HOST + "/kjy/mp/billing/clock/dailyFirst";
public static final String LAYER_RENEW = HOST + "/kjy/mp/layer/renew";
public static final String DISTRIBUTION_LAYER = HOST + "/kjy/sp/seller/distributionLayer";
public static final String ROOKIECLUEGUIDE = HOST + "/kjy/mp/rookieGuide/clueGuide";
public static final String VISITHEADER = HOST + "/kjy/mp/visit/header/v2";
public static final String SELLERWEEKLY = HOST + "/kjy/mp/whoSawMe/sellerWeekly";
public static final String WEEKLY_LIST = HOST + "/kjy/mp/seller/weekly/list";
// *************** 支付 ***************
......@@ -663,6 +683,7 @@ public class BasicConfig {
// *************** 谁看过我 ***************
public static final String WHOSAWME_CUSTCLUELISTV2 = HOST + "/kjy/mp/whoSawMe/custClueList/v2";
public static final String WHOSAWME_CUSTCLUELISTV3 = HOST + "/kjy/mp/whoSawMe/custClueList/v3";
// *************** 文章 ***************
......@@ -674,6 +695,7 @@ public class BasicConfig {
public static final String ARTICLE_GETENHANCEDCOLUMNCONFIG = HOST + "/kjy/mp/sellerConfig/getEnhancedColumnConfig";
public static final String ARTICLE_ENHANCEDCOLUMN_GETCONTENTS = HOST + "/kjy/mp/enhancedColumn/getContents";
public static final String ARTICLE_ENHANCEDCOLUMN_GETFAQS = HOST + "/kjy/mp/enhancedColumn/getFAQs";
public static final String ARTICLE_getQuestionDetail = HOST +"/kjy/mp/explosioncontent/qa/getQuestionDetail";
public static final String ARTICLE_GETEXPLOSIONCONTENTLIST = HOST + "/kjy/mp/explosioncontent/getExplosionContentList";
......@@ -698,19 +720,31 @@ public class BasicConfig {
public static final String GRASS_lastInsurance = HOST + "/kjy/mp/welfare/lastInsurance";
public static final String GRASS_editInsurance = HOST + "/kjy/mp/welfare/editInsurance";
public static final String GRASS_delInsurance = HOST + "/kjy/mp/welfare/delInsurance";
public static final String GRASS_materialListV2 = HOST + "/kjy/mp/welfare/materialListV2";
public static final String GRASS_getDetailList = HOST + "/kjy/mp/datagram/getDetailList";
public static final String GRASS_getArticleInfo = HOST + "/kjy/mp/datagram/getArticleInfo";
public static final String GRASS_direct = HOST + "/kjy/mp/user/direct";
// ************* 今日早报 *********
public static final String Daily_dailyList = HOST + "/kjy/mp/gatherPage/dailyList";
public static final String Daily_getHomeConf = HOST + "/kjy/mp/home/getHomeConf";
public static final String Daily_getHomeCaseList = HOST + "/kjy/mp/successCases/getHomeCaseList";
public static final String Daily_getCaseList = HOST + "/kjy/mp/successCases/getCaseList";
public static final String Daily_getHomeCompanyArea = HOST + "/kjy/mp/home/getHomeCompanyArea";
public static final String Daily_getTagList = HOST + "/kjy/mp/companyArea/getTagList";
public static final String Daily_getContentList = HOST +"/kjy/mp/companyArea/getContentList";
public static final String Daily_list = HOST + "/kjy/mp/companyDocument/list";
public static final String Daily_eveningList = HOST + "/kjy/mp/gatherPage/eveningList";
// ************** 首页 ****************
public static final String HOME_GETHOMETIMELINECONTENT = HOST + "/kjy/mp/home/getHomeTimeLineContent";
public static final String HOME_getContentList = HOST +"/kjy/mp/grassContent/getContentList";
public static final String HOME_getTopHubTag = HOST + "/kjy/mp/home/getTopHubTag";
public static final String HOME_getTopHubContentList = HOST + "/kjy/mp/home/getTopHubContentList";
public static final String HOME_getTags4Poster = HOST + "/kjy/mp/posterTemplate/getTags4Poster";
public static final String HOME_getPosterTemplateList = HOST + "/kjy/mp/posterTemplate/getPosterTemplateList";
public static final String HOME_findPosterById = HOST + "/kjy/mp/posterTemplate/findPosterById";
public static final String HOME_getInfo = HOST + "/kjy/mp/dailyPoster/getInfo";
public static final String HOME_selectPage = HOST + "/kjy/mp/dailyPoster/selectPage";
// ************** 设置中心 ***************
public static final String SELLERCONFIG_EDITCONFIG = HOST + "/kjy/mp/sellerConfig/editConfig";
// ************** BOSS看板 ***************
public static final String BOSS_ROLE = HOST + "/kjy/mp/seller/team/member/role";
public static final String BOSS_CODE = HOST + "/kjy/mp/seller/team/invite/code";
......@@ -724,6 +758,12 @@ public class BasicConfig {
public static final String BOSS_DETAIL = HOST + "/kjy/mp/seller/team/task/detail";
public static final String BOSS_PUBLISH = HOST + "/kjy/mp/seller/team/task/publish";
public static final String BOSS_RECEIVERLIST = HOST + "/kjy/mp/seller/team/task/receiverList";
public static final String BOSS_BOUND = HOST + "/kjy/mp/seller/team/bound";
public static final String MATERIALLIST = HOST + "/kjy/mp/seller/dynamic/getMaterialList";
public static final String FORWARDCARDLIST = HOST + "/kjy/mp/seller/dynamic/getForwardCardList";
public static final String MARKETINGTOOLLIST = HOST + "/kjy/mp/seller/dynamic/getMarketingToolList";
public static final String SALECLUELIST = HOST + "/kjy/mp/seller/dynamic/getSaleClueList";
public static final String GETVISITLIST = HOST + "/kjy/mp/seller/dynamic/getVisitList";
......@@ -750,6 +790,11 @@ public class BasicConfig {
public static final String MANAGER_PROMOTIONCODELIST = MANAGER_HOST + "/kjy/manager/promotionCode/codeList";
public static final String MANAGER_PROMOTIONBATCHMODIFY = MANAGER_HOST + "/kjy/manager/promotionCode/batchModify";
public static final String MANAGER_PROMOTIONCODEBATCHDETAIL = MANAGER_HOST + "/kjy/manager/promotionCode/batchDetail";
public static final String MANAGER_dailyPostersList = MANAGER_HOST + "/kjy/manager/dailyPosters/list";
public static final String MANAGER_findId = MANAGER_HOST + "/kjy/manager/dailyPosters/findById";
public static final String MANAGER_addOrUpdate = MANAGER_HOST + "/kjy/manager/dailyPosters/addOrUpdate";
public static final String MANAGER_dailyPostersDelete = MANAGER_HOST + "/kjy/manager/dailyPosters/delete";
public static final String MANAGER_SELLERTEAM_REMOVEMEMBER = MANAGER_HOST + "/kjy/manager/sellerTeam/removeMember";
public static final String MANAGER_SELLERID_ENCODE = MANAGER_HOST + "/kjy/manager/testUser/encode";
public static final String MANAGER_TKU_DECODE = MANAGER_HOST + "/kjy/manager/testUser/decryptTku";
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="集客助手" verbose="1" thread-count="3">
<!-- <test preserve-order="true" name="首页" >-->
<!-- <classes>-->
<!-- <class name="com.kjj.qa.cases.Home"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="新手任务">-->
<!-- <classes>-->
<!-- <class name="com.kjj.qa.cases.Novice"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="支付">
<classes>
<class name="com.kjj.cases.basics.Pay"/>
......@@ -43,12 +34,12 @@
</test>
<test preserve-order="true" name="我的名片">
<classes>
<class name="com.kjj.cases.basics.card.PersonCard"/>
<class name="com.kjj.cases.assistant.card.PersonCard"/>
</classes>
</test>
<test preserve-order="true" name="文章中个人名片">
<classes>
<class name="com.kjj.cases.basics.card.ArticalPersonCard"/>
<class name="com.kjj.cases.assistant.card.ArticalPersonCard"/>
</classes>
</test>
<test preserve-order="true" name = "种草素材">
......@@ -56,6 +47,11 @@
<class name="com.kjj.cases.assistant.RecommendMaterial"/>
</classes>
</test>
<test preserve-order="true" name = "今日早报">
<classes>
<class name="com.kjj.cases.assistant.DailyPaper"/>
</classes>
</test>
<test preserve-order="true" name = "首页">
<classes>
<class name="com.kjj.cases.assistant.homePage"/>
......
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