Commit 7527281c authored by 龚小红's avatar 龚小红

增加签到领红包的接口,删除设置中心-顶部名片配置

parent d3b81c67
//package com.kjj.cases.assistant.homePage;
//
//import com.kjj.cases.admin.Authorization;
//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.Map;
//
//import static com.kjj.config.BasicConfig.*;
//
//public class SignRed implements Authorization {
// private int attendAmount;
// private int totalPromotionEarnings;
// @BeforeClass
// public void setUp() {
// agentTku();
// }
//
// @Test(description = "指定用户展示入口", priority = 1)
// public void 指定用户展示入口() {
// Response response = network.getResponse(ATTEND_entrance);
// System.out.println(response.body().asString());
// Boolean showFlag = response.jsonPath().getBoolean("data.showFlag");
// Boolean vipExpireFlag = response.jsonPath().getBoolean("data.vipExpireFlag");
// Assert.assertTrue(showFlag, network.message(ATTEND_entrance, "指定用户不展示入口", response.body().asString()));
// Assert.assertFalse(vipExpireFlag, network.message(ATTEND_entrance, "指定用户会员已到期", response.body().asString()));
// }
//
// @Test(description = "非指定用户展示入口", priority = 2)
// public void 非指定用户展示入口() {
// visitor2Tku();
// Response response = network.getResponse(ATTEND_entrance);
// System.out.println(response.body().asString());
// Boolean showFlag = response.jsonPath().getBoolean("data.showFlag");
// Boolean vipExpireFlag = response.jsonPath().getBoolean("data.vipExpireFlag");
// Assert.assertFalse(showFlag, network.message(ATTEND_entrance, "非指定用户展示入口", response.body().asString()));
// Assert.assertFalse(vipExpireFlag, network.message(ATTEND_entrance, "指定用户会员已到期", response.body().asString()));
// }
//
// @Test(description = "签到详情", priority = 3)
// public void 签到详情() {
// agentTku();
// Response response = network.getResponse(ATTEND_detail);
// System.out.println(response.body().asString());
// int roundNum = response.jsonPath().getInt("data.roundNum");
// Boolean todayAttendFlag = response.jsonPath().getBoolean("data.todayAttendFlag");
// Assert.assertEquals(roundNum, 7, network.message(ATTEND_detail, "签到周期错误", response.body().asString()));
// Assert.assertFalse(todayAttendFlag, network.message(ATTEND_detail, "用户今日已签到", response.body().asString()));
// }
//
// @Test(description = "获取累计收益", priority = 4)
// public void 获取累计收益() {
// Response response = network.getResponse(ATTEND_income);
// System.out.println(response.body().asString());
// totalPromotionEarnings = response.jsonPath().getInt("data.totalPromotionEarnings");
// int balance = response.jsonPath().getInt("data.balance");
// Assert.assertTrue(totalPromotionEarnings > 0, network.message(ATTEND_income, "签到周期错误", response.body().asString()));
// Assert.assertTrue(balance > 0, network.message(ATTEND_income, "签到周期错误", response.body().asString()));
//
// }
//
// @Test(description = "签到", priority = 5)
// public void 签到() {
// Response response = network.getResponse(ATTEND_open);
// System.out.println(response.body().asString());
// attendAmount = response.jsonPath().getInt("data.attendAmount");
// String attendDate = response.jsonPath().getString("data.attendDate");
// Assert.assertTrue(attendAmount > 0, network.message(ATTEND_open, "签到失败", response.body().asString()));
//
// }
//
// @Test(description = "签到金额验证", priority = 6)
// public void 签到金额验证() {
// Response response = network.getResponse(ATTEND_income);
// System.out.println(response.body().asString());
// int total = response.jsonPath().getInt("data.totalPromotionEarnings");
// Assert.assertEquals(total , attendAmount + totalPromotionEarnings,network.message(ATTEND_income, "签到周期错误", response.body().asString()));
// }
//
// @Test(description = "代理人账户明细",priority = 7)
// public void 代理人账户明细() {
// agentTku();
// Map<String, Object> Params = new HashMap<String, Object>();
// Params.put("type", 2);
// Params.put("pageNo", 1);
// Params.put("pageSize", 20);
// Response response = network.getResponse(Params, PAY_accDetail);
// System.out.println(response.body().asString());
// int changeType1 = response.jsonPath().getInt("data[0].changeType");
// String nickname = response.jsonPath().getString("data[0].nickname");
// String bizType = response.jsonPath().getString("data[0].bizType");
// int changeMoney = response.jsonPath().getInt("data[0].changeMoney");
// Assert.assertEquals(changeType1 ,2, network.message(PAY_accDetail, "收益明细为null", response.body().asString()));
// Assert.assertEquals(nickname, "吉吉",network.message(PAY_accDetail, "收益明细为null", response.body().asString()));
// Assert.assertEquals(bizType, "吉吉",network.message(PAY_accDetail, "收益明细为null", response.body().asString()));
// Assert.assertEquals(changeMoney, "吉吉",network.message(PAY_accDetail, "收益明细为null", response.body().asString()));
// }
//}
......@@ -256,20 +256,13 @@ public class PersonalCenter implements Authorization{
public void 关闭向客户展示底部和顶部名片(){
//关闭向客户展示底部和顶部名片
HashMap<String,Object> params = new HashMap<String,Object>();
params.put("configKey", "card_show_on_top");
params.put("configKey", "card_show_on_bottom");
params.put("configValue", false);
Response response = network.postResponse(params,SELLERCONFIG_EDITCONFIG);
boolean success = response.jsonPath().getBoolean("success");
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,SELLERCONFIG_EDITCONFIG,"接口返回失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,SELLERCONFIG_EDITCONFIG,"返回数据为空",response.body().asString()));
params.put("configKey", "card_show_on_bottom");
response = network.postResponse(params,SELLERCONFIG_EDITCONFIG);
success = response.jsonPath().getBoolean("success");
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,SELLERCONFIG_EDITCONFIG,"接口返回失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,SELLERCONFIG_EDITCONFIG,"返回数据为空",response.body().asString()));
Assert.assertTrue(data,network.message(params,SELLERCONFIG_EDITCONFIG,"关闭底部名片",response.body().asString()));
//娇艳是否关闭成功
response = network.getResponse(SELLERCARD_GETSELLERCARDCONFIG);
......@@ -280,20 +273,14 @@ public class PersonalCenter implements Authorization{
int size = response.jsonPath().getInt("data.findAll{it.val == false}.size()");
System.out.println("size:"+size);
Assert.assertTrue(size==2,network.message(USINGSTRATAGY_index,"接口返回失败",response.body().asString()));
Assert.assertTrue(size==1,network.message(SELLERCARD_GETSELLERCARDCONFIG,"接口返回失败",response.body().asString()));
//开启向客户展示底部和顶部名片
params.clear();
params.put("configKey", "card_show_on_top");
params.put("configValue", true);
response = network.postResponse(params,SELLERCONFIG_EDITCONFIG);
success = response.jsonPath().getBoolean("success");
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,SELLERCONFIG_EDITCONFIG,"接口返回失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,SELLERCONFIG_EDITCONFIG,"返回数据为空",response.body().asString()));
params.put("configKey", "card_show_on_bottom");
response = network.postResponse(params,SELLERCONFIG_EDITCONFIG);
System.out.println(response.body().asString());
success = response.jsonPath().getBoolean("success");
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,SELLERCONFIG_EDITCONFIG,"接口返回失败",response.body().asString()));
......@@ -306,7 +293,7 @@ public class PersonalCenter implements Authorization{
Assert.assertNotNull(result,network.message(params,SELLERCARD_GETSELLERCARDCONFIG ,"配置列表为空",response.body().asString()));
size = response.jsonPath().getInt("data.findAll{it.val == true}.size()");
Assert.assertTrue(size==2,network.message(USINGSTRATAGY_index,"接口返回失败",response.body().asString()));
Assert.assertTrue(size==1,network.message(USINGSTRATAGY_index,"接口返回失败",response.body().asString()));
}
@Test(description = "关闭理财类互动区展示设置",priority = 10)
......
......@@ -2,46 +2,46 @@
<!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.cases.live.liveConfig.LiveMaterial"/>
</classes>
</test>
<test preserve-order="true" name="团队管理">
<classes>
<class name="com.kjj.cases.live.liveConfig.Team"/>
</classes>
</test>
<test preserve-order="true" name="精彩视频">
<classes>
<class name="com.kjj.cases.live.liveConfig.Video"/>
</classes>
</test>
<!-- <test preserve-order="true" name="直播素材">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.LiveMaterial"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="团队管理">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.Team"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="精彩视频">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.Video"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="创建直播">
<classes>
<class name="com.kjj.cases.live.liveConfig.SaveLive"/>
</classes>
</test>
<test preserve-order="true" name="成功案例">
<classes>
<class name="com.kjj.cases.live.liveConfig.LiveCase"/>
</classes>
</test>
<!-- <test preserve-order="true" name="成功案例">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.LiveCase"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="资料贴片">
<classes>
<class name="com.kjj.cases.live.liveConfig.Paster"/>
</classes>
</test>
<!-- <test preserve-order="true" name="资料贴片">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.Paster"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="代理人首页">
<classes>
<class name="com.kjj.cases.live.agent.Agent"/>
</classes>
</test>
<!-- <test preserve-order="true" name="代理人首页">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.Agent"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="小程序分享">
<classes>
......@@ -55,42 +55,42 @@
</classes>
</test>
<test preserve-order="false" name="预告页">
<classes>
<class name="com.kjj.cases.live.preview.Preview"/>
</classes>
</test>
<!-- <test preserve-order="false" name="预告页">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.preview.Preview"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="false" name="翻牌集字红包">
<classes>
<class name="com.kjj.cases.live.flipCard.FlipCard"/>
</classes>
</test>
<!-- <test preserve-order="false" name="翻牌集字红包">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.flipCard.FlipCard"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="中奖规则配置">
<classes>
<class name="com.kjj.cases.live.liveConfig.WinningRules"/>
</classes>
</test>
<!-- <test preserve-order="true" name="中奖规则配置">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.WinningRules"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="指定中奖">
<classes>
<class name="com.kjj.cases.live.lottery.DesignatedWinner"/>
</classes>
</test>
<!-- <test preserve-order="true" name="指定中奖">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.lottery.DesignatedWinner"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="亲友券">
<classes>
<class name="com.kjj.cases.live.lottery.RelativeLottery"/>
</classes>
</test>
<!-- <test preserve-order="true" name="亲友券">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.lottery.RelativeLottery"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="直播前-我的客户页">
<classes>
<class name="com.kjj.cases.live.agent.LiveBefore"/>
</classes>
</test>
<!-- <test preserve-order="true" name="直播前-我的客户页">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.LiveBefore"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="助播-开启直播">
......@@ -99,17 +99,17 @@
</classes>
</test>
<test preserve-order="true" name="访客签到">
<classes>
<class name="com.kjj.cases.live.lotteryCode.SignIn"/>
</classes>
</test>
<!-- <test preserve-order="true" name="访客签到">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.lotteryCode.SignIn"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="宝箱裂变">
<classes>
<class name="com.kjj.cases.live.treasure.Treasure"/>
</classes>
</test>
<!-- <test preserve-order="true" name="宝箱裂变">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.treasure.Treasure"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="直播中抽奖">
<classes>
......@@ -117,34 +117,34 @@
</classes>
</test>
<test preserve-order="true" name="猜数字红包">
<classes>
<class name="com.kjj.cases.live.guess.LiveGuess"/>
</classes>
</test>
<test preserve-order="true" name="看直播攒现金">
<classes>
<class name="com.kjj.cases.live.treasure.TimeRed"/>
</classes>
</test>
<test preserve-order="true" name="免费领福利">
<classes>
<class name="com.kjj.cases.live.FreeReward.FreeReward"/>
</classes>
</test>
<test preserve-order="true" name="我要咨询">
<classes>
<class name="com.kjj.cases.live.agent.Potential"/>
</classes>
</test>
<test preserve-order="true" name="访客领取资料">
<classes>
<class name="com.kjj.cases.live.anchor.LiveVisitors"/>
</classes>
</test>
<!-- <test preserve-order="true" name="猜数字红包">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.guess.LiveGuess"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="看直播攒现金">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.treasure.TimeRed"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="免费领福利">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.FreeReward.FreeReward"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="我要咨询">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.Potential"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="访客领取资料">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.anchor.LiveVisitors"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="红包领取">
<classes>
......@@ -152,41 +152,41 @@
</classes>
</test>
<test preserve-order="true" name="有奖答题">
<classes>
<class name="com.kjj.cases.live.answer.Answer"/>
</classes>
</test>
<!-- <test preserve-order="true" name="有奖答题">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.answer.Answer"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="投票">
<classes>
<class name="com.kjj.cases.live.choice.Choice"/>
</classes>
</test>
<!-- <test preserve-order="true" name="投票">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.choice.Choice"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="问题">
<classes>
<class name="com.kjj.cases.live.question.Question"/>
</classes>
</test>
<!-- <test preserve-order="true" name="问题">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.question.Question"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="直播中时长宝箱">
<classes>
<class name="com.kjj.cases.live.treasure.TreasureTime"/>
</classes>
</test>
<!-- <test preserve-order="true" name="直播中时长宝箱">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.treasure.TreasureTime"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="闯关答题">
<classes>
<class name="com.kjj.cases.live.answer.passQues"/>
</classes>
</test>
<!-- <test preserve-order="true" name="闯关答题">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.answer.passQues"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="直播中获取线索统计">
<classes>
<class name="com.kjj.cases.live.agent.LiveAgent"/>
</classes>
</test>
<!-- <test preserve-order="true" name="直播中获取线索统计">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.LiveAgent"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="助播-结束直播">
<classes>
......@@ -194,40 +194,40 @@
</classes>
</test>
<test preserve-order="true" name="直播结束-我的客户页">
<classes>
<class name="com.kjj.cases.live.agent.LiveLater"/>
</classes>
</test>
<test preserve-order="true" name="奖品发放配置">
<classes>
<class name="com.kjj.cases.live.agent.Reward"/>
</classes>
</test>
<test preserve-order="true" name="指定中奖付款码">
<classes>
<class name="com.kjj.cases.live.liveConfig.spec"/>
</classes>
</test>
<test preserve-order="true" name="客户管理">
<classes>
<class name="com.kjj.cases.live.agent.Customer"/>
</classes>
</test>
<test preserve-order="true" name="访客端直播结束页">
<classes>
<class name="com.kjj.cases.live.customer.AfterLive" />
</classes>
</test>
<test preserve-order="true" name="访客端个人主页">
<classes>
<class name="com.kjj.cases.live.customer.PersonalPage" />
</classes>
</test>
<!-- <test preserve-order="true" name="直播结束-我的客户页">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.LiveLater"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="奖品发放配置">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.Reward"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="指定中奖付款码">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.spec"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="客户管理">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.Customer"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="访客端直播结束页">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.customer.AfterLive" />-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="访客端个人主页">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.customer.PersonalPage" />-->
<!-- </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