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

Merge branch 'Feature/f20210923-gxh' into 'master'

Feature/f20210923 gxh

See merge request test-group/kejiji!126
parents 8bdd4375 ed82dbf8
......@@ -17,6 +17,4 @@ public class TreasureAward {
private Integer winLimitCount;
private Integer isLimit;
}
......@@ -3,6 +3,7 @@ package com.kjj.cases.live.agent;
import com.kjj.bean.agent.GrabWelfares;
import com.kjj.bean.agent.LiveUserList;
import com.kjj.cases.admin.Authorization;
import com.kjj.cases.live.liveConfig.LiveMaterial;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.IdMakeUtil;
......@@ -13,10 +14,13 @@ import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.utils.BaseUtils.ssoLogin;
public class LiveLater implements Authorization {
public String pageSize;
public List<LiveUserList> liveUserId;
......@@ -368,4 +372,23 @@ public class LiveLater implements Authorization {
int potentialNum = response.jsonPath().getInt("data.potentialNum");
Assert.assertTrue(potentialNum > 0,network.message(params,BasicConfig.MOBILE_potentialNum,"准客户数量错误",response.body().asString()));
}
@Test(description = "删除权益", priority = 21)
public void 删除权益() {
ssoLogin();
for (int resourceId : Arrays.asList(LiveMaterial.resourceId, LiveMaterial.termResourceId, LiveMaterial.freeResourceId, LiveMaterial.picResourceId)){
System.out.println(resourceId);
Map<String, Object> delResourceParam = new HashMap<>();
delResourceParam.put("id", resourceId);
Response delResourceRes = network.postResponse(delResourceParam, BasicConfig.MANAGER_delResource);
try {
boolean data = delResourceRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(delResourceParam, BasicConfig.MANAGER_delResource, "删除权益失败", delResourceRes.body().asString()));
}catch (NullPointerException e){
e.printStackTrace();
Assert.fail(network.message(delResourceParam, BasicConfig.MANAGER_delResource, "获取数据失败", delResourceRes.body().asString()));
}
}
}
}
......@@ -509,6 +509,4 @@ public class Reward implements Authorization {
}
}
......@@ -34,27 +34,5 @@ public class CloseLive implements Authorization {
}
@Test(description = "删除权益", priority = 2)
public void 删除权益() {
for (int resourceId : Arrays.asList(LiveMaterial.resourceId, LiveMaterial.termResourceId, LiveMaterial.freeResourceId, LiveMaterial.picResourceId)){
System.out.println(resourceId);
Map<String, Object> delResourceParam = new HashMap<>();
delResourceParam.put("id", resourceId);
Response delResourceRes = network.postResponse(delResourceParam, BasicConfig.MANAGER_delResource);
try {
boolean data = delResourceRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(delResourceParam, BasicConfig.MANAGER_delResource, "删除权益失败", delResourceRes.body().asString()));
}catch (NullPointerException e){
e.printStackTrace();
Assert.fail(network.message(delResourceParam, BasicConfig.MANAGER_delResource, "获取数据失败", delResourceRes.body().asString()));
}
}
}
}
}
......@@ -59,28 +59,11 @@ public class SimpleLiveConfig implements Authorization {
Params.put("shareContent", "自动化直播 #{shortLink}");
Params.put("shelfStatus", 2);
Params.put("secondPoster", "https://streamimg.kjjcrm.com/kjy/image/20210201/cc999ebde48e49f99ac3f0d93480453f.jpg");
Params.put("regionType",2);
Params.put("regionType",1);
Params.put("preAwardUrl","https://yun.dui88.com/kjy/image/20210629/1624949155842.png");
Params.put("preWindowUrl","https://yun.dui88.com/kjy/image/20210629/1624949098093.png");
Params.put("distributionType", 0);
Params.put("distributionType", 1);
Params.put("existSeriesPoster", 0);
List<ProvinceCityCodeList> provinceCityCode = new ArrayList<>();
ProvinceCityCodeList save = new ProvinceCityCodeList();
save.setProvinceCode(110000);
save.setCityCode(null);
provinceCityCode.add(save);
ProvinceCityCodeList save1 = new ProvinceCityCodeList();
save1.setProvinceCode(420000);
save1.setCityCode(420900);
provinceCityCode.add(save1);
ProvinceCityCodeList save2 = new ProvinceCityCodeList();
save2.setProvinceCode(330000);
save2.setCityCode(330100);
provinceCityCode.add(save2);
Params.put("provinceCityCodeList", provinceCityCode);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveAndUpdate_0);
liveID = response.jsonPath().getString("data");
EncodeLiveID = IdMakeUtil.encodingId(Long.valueOf(liveID));
......@@ -148,4 +131,21 @@ public class SimpleLiveConfig implements Authorization {
System.out.println(response.body().asString());
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveAndUpdate_8, "产品资料配置失败", response.body().asString()));
}
/**
* 直播中奖品
*/
//直播中奖品配置
@Test(description = "直播中抽奖", priority = 9)
public void 直播中抽奖() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", liveID);
Params.put("interactNum", 1);
Params.put("showInteractNum", 1);
Params.put("welfareId", 191);
Params.put("afterMin", 20);
Response response = network.postResponse(Params, BasicConfig.MANAGER_add_1);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_add_1, "直播中抽奖配置失败", response.body().asString()));
}
}
This diff is collapsed.
......@@ -272,7 +272,16 @@ public class BasicConfig {
public static final String MANAGER_videoSwitch = MANAGER_HOST + "/kjy/manager/live/trans/video/conf/status/switch";
public static final String MANAGER_videoDetail = MANAGER_HOST + "/kjy/manager/live/trans/video/conf/detail";
// *************** 新版预告页 ***************
// *************** 砸金蛋 ***************
public static final String MANAGER_goldenEgg_saveOrUpdate = MANAGER_HOST +"/kjy/manager/live/treasure/goldenEgg/saveOrUpdate";
public static final String MANAGER_goldenEgg_detail = MANAGER_HOST +"/kjy/manager/live/treasure/goldenEgg/detail";
public static final String MANAGER_goldenEgg_switchStatus = MANAGER_HOST +"/kjy/manager/live/treasure/goldenEgg/switchStatus";
public static final String MOBILE_goldenEgg_detail = MOBILE_HOST +"/kjy/live/treasure/goldenEgg/detail";
public static final String MOBILE_goldenEgg_open = MOBILE_HOST +"/kjy/live/treasure/goldenEgg/open";
public static final String MOBILE_goldenEgg_joinInfo = MOBILE_HOST +"/kjy/live/treasure/goldenEgg/joinInfo";
public static final String MOBILE_goldenEgg_list = MOBILE_HOST +"/kjy/live/user/list";
public static final String MOBILE_oldenEggTimeOut = MOBILE_HOST +"/test/goldenEggTimeOut";
public static final String MOBILE_goldenEgg_reset = MOBILE_HOST +"/kjy/live/treasure/goldenEgg/reset";
// *************** 猜数字红包 ***************
......
......@@ -261,5 +261,25 @@
<class name="com.kjj.cases.live.customer.PersonalPage" />
</classes>
</test>
<test preserve-order="true" name="创建简易直播">
<classes>
<class name="com.kjj.cases.live.liveConfig.SimpleLiveConfig" />
</classes>
</test>
<test preserve-order="true" name="砸金蛋">
<classes>
<class name="com.kjj.cases.live.treasure.GoldenEgg" />
</classes>
</test>
<test preserve-order="true" name="助播-开启直播">
<classes>
<class name="com.kjj.cases.live.anchor.OpenLive"/>
</classes>
</test>
<test preserve-order="true" name="助播-结束直播">
<classes>
<class name="com.kjj.cases.live.anchor.CloseLive"/>
</classes>
</test>
</suite>
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