Commit bd96bb49 authored by 张艳玲's avatar 张艳玲

Merge branch 'Feature/20210416_zz' into 'master'

Feature/20210416 zz

See merge request test-group/kejiji!53
parents 6d2695ad 0f39d089
package com.kjj.bean.agent;
import com.sun.org.apache.xpath.internal.objects.XString;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class AgentVideo {
private int pageIndex;
private int pageSize;
private String totalCount;
private List<videolist> list;
private boolean hasNext;
private String totalPage;
@Data
public static class videolist{
private String id;
private String videoTitle;
private String videoTag;
private String videoTop;
private String videoFirstImg;
private String watchNum;
private String gmtCreate;
}
}
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.kjj.bean.agent.AgentBean;
import com.kjj.bean.agent.AgentCard;
import com.kjj.bean.agent.AgentEndList;
import com.kjj.bean.agent.AgentVideo;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
......@@ -37,6 +38,12 @@ public class LiveAgent implements AdminAuthorization {
public String phoneNumber;
public String jobNumber;
public String teamName;
public String id;
public String videoTitle;
public String watchNum;
public String shareNum;
public String likeNum;
public String videoTime;
......@@ -430,8 +437,148 @@ public class LiveAgent implements AdminAuthorization {
// }
//视频列表
//获取代理人首页视频列表
@Test(description="获取代理人首页视频列表",priority = 27)
public void 获取代理人首页视频列表() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("pageSize",10);
params.put("pageIndex",1);
params.put("companyId","Kj20ODE1");
Response response = network.getResponse(params,BasicConfig.MOBILE_VideoList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_VideoList, "获取代理人首页视频列表失败", response.body().asString()));
}
//获取代理人首页视频列表id、标题、观看人数
@Test(description="获取代理人首页视频列表字段",priority = 28)
public void 获取代理人首页视频列表字段() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("pageSize",10);
params.put("pageIndex",1);
params.put("companyId","Kj20ODE1");
Response response = network.getResponse(params,BasicConfig.MOBILE_VideoList);
AgentVideo list= JsonUtil.parseResponseToBean(response, AgentVideo.class);
id=list.getList().get(0).getId();
videoTitle=list.getList().get(0).getVideoTitle();
watchNum=list.getList().get(0).getWatchNum();
System.out.println(id);
System.out.println(videoTitle);
System.out.println(watchNum);
System.out.println(list);
Assert.assertNotNull(list, network.message(params, BasicConfig.MOBILE_ChoiceGetList, "获取代理人首页视频列表字段失败", response.body().asString()));
}
//获取视频详情
@Test(description="获取视频详情",priority = 29)
public void 获取视频详情() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("id","Kj20NTgz");
Response response = network.getResponse(params,BasicConfig.MOBILE_VideoGetDetail);
boolean success = response.jsonPath().getBoolean("success");
shareNum = response.jsonPath().getString("data.vo.shareNum");
likeNum = response.jsonPath().getString("data.vo.likeNum");
System.out.println(success);
System.out.println(shareNum);
System.out.println(likeNum);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_VideoGetDetail, "获取视频详情失败", response.body().asString()));
Assert.assertNotNull(shareNum, network.message(params, BasicConfig.MOBILE_VideoGetDetail, "获取视频详情分享数失败", response.body().asString()));
Assert.assertNotNull(likeNum, network.message(params, BasicConfig.MOBILE_VideoGetDetail, "获取视频详情点赞数失败", response.body().asString()));
}
//获取视频分享信息
@Test(description="获取视频分享信息",priority = 30)
public void 获取视频分享信息() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("id","Kj20NTgz");
params.put("companyId","Kj20ODE1");
Response response = network.getResponse(params,BasicConfig.MOBILE_VideoShareInfo);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_VideoShareInfo, "获取视频分享信息失败", response.body().asString()));
}
//获取视频转发是否成功
@Test(description="获取视频转发是否成功",priority = 31)
public void 获取视频转发是否成功() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("id","Kj20NTgz");
Response response = network.postResponse(params,BasicConfig.MOBILE_VideoForward);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_VideoForward, "视频转发失败", response.body().asString()));
}
//获取视频能否正常观看
@Test(description="获取视频能否正常观看",priority = 32)
public void 获取视频能否正常观看() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("id","Kj20NTgz");
Response response = network.postResponse(params,BasicConfig.MOBILE_VideoWatch);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_VideoWatch, "视频播放失败", response.body().asString()));
}
//视频点赞
@Test(description="获取视频能否正常点赞",priority = 33)
public void 获取视频能否正常点赞() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("id","Kj20NTgz");
params.put("type","1");
Response response = network.postResponse(params,BasicConfig.MOBILE_VideoLike);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_VideoLike, "点赞失败", response.body().asString()));
}
//视频取消点赞
@Test(description="获取视频能否取消点赞",priority = 34)
public void 获取视频能否取消点赞() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("id","Kj20NTgz");
params.put("type","0");
Response response = network.postResponse(params,BasicConfig.MOBILE_VideoLike);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_VideoLike, "取消点赞失败", response.body().asString()));
}
//获取代理人教程列表
@Test(description="获取代理人教程列表",priority = 36)
public void 获取代理人教程列表() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("pageIndex",1);
Response response = network.getResponse(params,BasicConfig.MOBILE_LiveGuideList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_LiveGuideList, "获取代理人教程列表失败", response.body().asString()));
}
//获取教程列表单条数据
@Test(description="获取教程列表单条数据",priority = 37)
public void 获取教程列表单条数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("id","Kj20NTgz");
Response response = network.getResponse(params,BasicConfig.MOBILE_LiveGuideList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_LiveGuideList, "获取教程列表单条数据失败", response.body().asString()));
}
......@@ -441,4 +588,4 @@ public class LiveAgent implements AdminAuthorization {
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -140,6 +140,16 @@ public class BasicConfig {
public static final String MOBILE_ClueList = MOBILE_HOST + "/kjy/live/agent/clue/list";
public static final String MOBILE_MyCustomerList = MOBILE_HOST + "/kjy/live/agent/clue/myCustomerList";
public static final String MOBILE_RewardAgentList = MOBILE_HOST + "/kjy/live/reward/agent/list";
public static final String MOBILE_VideoList = MOBILE_HOST + "/kjy/live/company/video/list";
public static final String MOBILE_VideoGetDetail = MOBILE_HOST + "/kjy/live/company/video/getDetail";
public static final String MOBILE_VideoShareInfo = MOBILE_HOST + "/kjy/live/company/video/shareInfo";
public static final String MOBILE_VideoForward = MOBILE_HOST + "/kjy/live/company/video/forward";
public static final String MOBILE_VideoWatch = MOBILE_HOST + "/kjy/live/company/video/watch";
public static final String MOBILE_VideoLike = MOBILE_HOST + "/kjy/live/company/video/like";
public static final String MOBILE_LiveGuideList = MOBILE_HOST + "/kjy/live/guide/list";
//查询资料列表//
public static final String MOBILE_Resource = MOBILE_HOST + "/clue/resource/list";
......
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