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{ ...@@ -256,20 +256,13 @@ public class PersonalCenter implements Authorization{
public void 关闭向客户展示底部和顶部名片(){ public void 关闭向客户展示底部和顶部名片(){
//关闭向客户展示底部和顶部名片 //关闭向客户展示底部和顶部名片
HashMap<String,Object> params = new HashMap<String,Object>(); 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); params.put("configValue", false);
Response response = network.postResponse(params,SELLERCONFIG_EDITCONFIG); Response response = network.postResponse(params,SELLERCONFIG_EDITCONFIG);
boolean success = response.jsonPath().getBoolean("success"); boolean success = response.jsonPath().getBoolean("success");
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,SELLERCONFIG_EDITCONFIG,"接口返回失败",response.body().asString())); 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()));
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()));
//娇艳是否关闭成功 //娇艳是否关闭成功
response = network.getResponse(SELLERCARD_GETSELLERCARDCONFIG); response = network.getResponse(SELLERCARD_GETSELLERCARDCONFIG);
...@@ -280,20 +273,14 @@ public class PersonalCenter implements Authorization{ ...@@ -280,20 +273,14 @@ public class PersonalCenter implements Authorization{
int size = response.jsonPath().getInt("data.findAll{it.val == false}.size()"); int size = response.jsonPath().getInt("data.findAll{it.val == false}.size()");
System.out.println("size:"+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.clear();
params.put("configKey", "card_show_on_top");
params.put("configValue", true); 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"); params.put("configKey", "card_show_on_bottom");
response = network.postResponse(params,SELLERCONFIG_EDITCONFIG); response = network.postResponse(params,SELLERCONFIG_EDITCONFIG);
System.out.println(response.body().asString());
success = response.jsonPath().getBoolean("success"); success = response.jsonPath().getBoolean("success");
data = response.jsonPath().getBoolean("data"); data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,SELLERCONFIG_EDITCONFIG,"接口返回失败",response.body().asString())); Assert.assertTrue(success,network.message(params,SELLERCONFIG_EDITCONFIG,"接口返回失败",response.body().asString()));
...@@ -306,7 +293,7 @@ public class PersonalCenter implements Authorization{ ...@@ -306,7 +293,7 @@ public class PersonalCenter implements Authorization{
Assert.assertNotNull(result,network.message(params,SELLERCARD_GETSELLERCARDCONFIG ,"配置列表为空",response.body().asString())); Assert.assertNotNull(result,network.message(params,SELLERCARD_GETSELLERCARDCONFIG ,"配置列表为空",response.body().asString()));
size = response.jsonPath().getInt("data.findAll{it.val == true}.size()"); 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) @Test(description = "关闭理财类互动区展示设置",priority = 10)
......
...@@ -2,46 +2,46 @@ ...@@ -2,46 +2,46 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="直播" verbose="1" thread-count="3"> <suite name="直播" verbose="1" thread-count="3">
<test preserve-order="true" name="直播素材"> <!-- <test preserve-order="true" name="直播素材">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.LiveMaterial"/> <!-- <class name="com.kjj.cases.live.liveConfig.LiveMaterial"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="团队管理"> <!-- <test preserve-order="true" name="团队管理">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.Team"/> <!-- <class name="com.kjj.cases.live.liveConfig.Team"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="精彩视频"> <!-- <test preserve-order="true" name="精彩视频">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.Video"/> <!-- <class name="com.kjj.cases.live.liveConfig.Video"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="创建直播"> <test preserve-order="true" name="创建直播">
<classes> <classes>
<class name="com.kjj.cases.live.liveConfig.SaveLive"/> <class name="com.kjj.cases.live.liveConfig.SaveLive"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="成功案例"> <!-- <test preserve-order="true" name="成功案例">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.LiveCase"/> <!-- <class name="com.kjj.cases.live.liveConfig.LiveCase"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="资料贴片"> <!-- <test preserve-order="true" name="资料贴片">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.Paster"/> <!-- <class name="com.kjj.cases.live.liveConfig.Paster"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="代理人首页"> <!-- <test preserve-order="true" name="代理人首页">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.agent.Agent"/> <!-- <class name="com.kjj.cases.live.agent.Agent"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="小程序分享"> <test preserve-order="true" name="小程序分享">
<classes> <classes>
...@@ -55,42 +55,42 @@ ...@@ -55,42 +55,42 @@
</classes> </classes>
</test> </test>
<test preserve-order="false" name="预告页"> <!-- <test preserve-order="false" name="预告页">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.preview.Preview"/> <!-- <class name="com.kjj.cases.live.preview.Preview"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="false" name="翻牌集字红包"> <!-- <test preserve-order="false" name="翻牌集字红包">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.flipCard.FlipCard"/> <!-- <class name="com.kjj.cases.live.flipCard.FlipCard"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="中奖规则配置"> <!-- <test preserve-order="true" name="中奖规则配置">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.WinningRules"/> <!-- <class name="com.kjj.cases.live.liveConfig.WinningRules"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="指定中奖"> <!-- <test preserve-order="true" name="指定中奖">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.lottery.DesignatedWinner"/> <!-- <class name="com.kjj.cases.live.lottery.DesignatedWinner"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="亲友券"> <!-- <test preserve-order="true" name="亲友券">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.lottery.RelativeLottery"/> <!-- <class name="com.kjj.cases.live.lottery.RelativeLottery"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="直播前-我的客户页"> <!-- <test preserve-order="true" name="直播前-我的客户页">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.agent.LiveBefore"/> <!-- <class name="com.kjj.cases.live.agent.LiveBefore"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="助播-开启直播"> <test preserve-order="true" name="助播-开启直播">
...@@ -99,17 +99,17 @@ ...@@ -99,17 +99,17 @@
</classes> </classes>
</test> </test>
<test preserve-order="true" name="访客签到"> <!-- <test preserve-order="true" name="访客签到">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.lotteryCode.SignIn"/> <!-- <class name="com.kjj.cases.live.lotteryCode.SignIn"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="宝箱裂变"> <!-- <test preserve-order="true" name="宝箱裂变">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.treasure.Treasure"/> <!-- <class name="com.kjj.cases.live.treasure.Treasure"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="直播中抽奖"> <test preserve-order="true" name="直播中抽奖">
<classes> <classes>
...@@ -117,34 +117,34 @@ ...@@ -117,34 +117,34 @@
</classes> </classes>
</test> </test>
<test preserve-order="true" name="猜数字红包"> <!-- <test preserve-order="true" name="猜数字红包">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.guess.LiveGuess"/> <!-- <class name="com.kjj.cases.live.guess.LiveGuess"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="看直播攒现金"> <!-- <test preserve-order="true" name="看直播攒现金">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.treasure.TimeRed"/> <!-- <class name="com.kjj.cases.live.treasure.TimeRed"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="免费领福利"> <!-- <test preserve-order="true" name="免费领福利">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.FreeReward.FreeReward"/> <!-- <class name="com.kjj.cases.live.FreeReward.FreeReward"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="我要咨询"> <!-- <test preserve-order="true" name="我要咨询">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.agent.Potential"/> <!-- <class name="com.kjj.cases.live.agent.Potential"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="访客领取资料"> <!-- <test preserve-order="true" name="访客领取资料">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.anchor.LiveVisitors"/> <!-- <class name="com.kjj.cases.live.anchor.LiveVisitors"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="红包领取"> <test preserve-order="true" name="红包领取">
<classes> <classes>
...@@ -152,41 +152,41 @@ ...@@ -152,41 +152,41 @@
</classes> </classes>
</test> </test>
<test preserve-order="true" name="有奖答题"> <!-- <test preserve-order="true" name="有奖答题">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.answer.Answer"/> <!-- <class name="com.kjj.cases.live.answer.Answer"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="投票"> <!-- <test preserve-order="true" name="投票">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.choice.Choice"/> <!-- <class name="com.kjj.cases.live.choice.Choice"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="问题"> <!-- <test preserve-order="true" name="问题">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.question.Question"/> <!-- <class name="com.kjj.cases.live.question.Question"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="直播中时长宝箱"> <!-- <test preserve-order="true" name="直播中时长宝箱">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.treasure.TreasureTime"/> <!-- <class name="com.kjj.cases.live.treasure.TreasureTime"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="闯关答题"> <!-- <test preserve-order="true" name="闯关答题">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.answer.passQues"/> <!-- <class name="com.kjj.cases.live.answer.passQues"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="直播中获取线索统计"> <!-- <test preserve-order="true" name="直播中获取线索统计">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.agent.LiveAgent"/> <!-- <class name="com.kjj.cases.live.agent.LiveAgent"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="助播-结束直播"> <test preserve-order="true" name="助播-结束直播">
<classes> <classes>
...@@ -194,40 +194,40 @@ ...@@ -194,40 +194,40 @@
</classes> </classes>
</test> </test>
<test preserve-order="true" name="直播结束-我的客户页"> <!-- <test preserve-order="true" name="直播结束-我的客户页">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.agent.LiveLater"/> <!-- <class name="com.kjj.cases.live.agent.LiveLater"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="奖品发放配置"> <!-- <test preserve-order="true" name="奖品发放配置">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.agent.Reward"/> <!-- <class name="com.kjj.cases.live.agent.Reward"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="指定中奖付款码"> <!-- <test preserve-order="true" name="指定中奖付款码">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.spec"/> <!-- <class name="com.kjj.cases.live.liveConfig.spec"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="客户管理"> <!-- <test preserve-order="true" name="客户管理">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.agent.Customer"/> <!-- <class name="com.kjj.cases.live.agent.Customer"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="访客端直播结束页"> <!-- <test preserve-order="true" name="访客端直播结束页">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.customer.AfterLive" /> <!-- <class name="com.kjj.cases.live.customer.AfterLive" />-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="访客端个人主页"> <!-- <test preserve-order="true" name="访客端个人主页">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.customer.PersonalPage" /> <!-- <class name="com.kjj.cases.live.customer.PersonalPage" />-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
</suite> </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