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

增加亲友抽奖券的代码

parent 75b3d8cc
package com.kjj.cases.live.lottery;
import com.kjj.bean.lottery.ConfIdList;
import com.kjj.cases.admin.Authorization;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.JsonUtil;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.config.BasicConfig.*;
public class RelativeLottery implements Authorization {
public List<ConfIdList> List_ConfId;
public String shareSign;
public class RelativeLottery {
@BeforeClass
public void setUp(){
agentAuth();
}
@Test(description = "代理人查询抽奖奖品列表", priority = 1)
public void 查询抽奖奖品列表() {
Map<String, Object> getLiveAwardListParam = new HashMap<>();
getLiveAwardListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response getLiveAwardListRes = network.getResponse(getLiveAwardListParam, USER_getLiveAwardList);
List<ConfIdList> list = JsonUtil.parseResponseToListBean(getLiveAwardListRes, ConfIdList.class);
System.out.println(list);
this.List_ConfId = list;
Assert.assertNotNull(list, network.message(getLiveAwardListParam, USER_getLiveAwardList, "抽奖标记为false", getLiveAwardListRes.body().asString()));
}
@Test(description = "查询亲友配置开启状态", priority = 2)
public void 查询亲友配置开启状态() {
visitorAuth9();
Map<String, Object> getLiveAwardListParam = new HashMap<>();
getLiveAwardListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(getLiveAwardListParam, MOBILE_allLottery);
System.out.println(response.body().asString());
int fissionLotteryConfStatus = response.jsonPath().getInt("data.fissionLotteryConfStatus");
Assert.assertEquals(fissionLotteryConfStatus, 1,network.message(getLiveAwardListParam, MOBILE_allLottery, "亲友配置券未开启", response.body().asString()));
}
}
......@@ -274,9 +274,10 @@ public class BasicConfig {
public static final String MOBILE_popupDetail = MOBILE_HOST + "/kjy/live/auth/popup/detail";
// *************** 亲友抽奖券 ***************
public static final String MANAGER_relativeLottery = MOBILE_HOST + "/kjy/manager/fission/lottery/saveOrUpdate";
public static final String MANAGER_detailLottery = MOBILE_HOST + "/kjy/manager/fission/lottery/detail";
public static final String MANAGER_switchStatusLottery = MOBILE_HOST + "/kjy/manager/fission/lottery/switchStatus";
public static final String MANAGER_relativeLottery = MANAGER_HOST + "/kjy/manager/fission/lottery/saveOrUpdate";
public static final String MANAGER_detailLottery = MANAGER_HOST + "/kjy/manager/fission/lottery/detail";
public static final String MANAGER_switchStatusLottery = MANAGER_HOST + "/kjy/manager/fission/lottery/switchStatus";
public static final String MOBILE_allLottery = MOBILE_HOST + "kjy/live/pre/conf/all";
// *************** 时长宝箱 ***************
public static final String MANAGER_list1 = MANAGER_HOST + "/kjy/manager/treasure/time/conf/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