Commit 4ed80984 authored by xiamengchen's avatar xiamengchen

Merge branch 'master' into feature/20210823-xmc

parents 6c519b7b 8e11e39f
//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)
......
...@@ -148,9 +148,6 @@ public class Cashback implements Authorization { ...@@ -148,9 +148,6 @@ public class Cashback implements Authorization {
System.out.println(response.body().asString()); System.out.println(response.body().asString());
int changeType1 = response.jsonPath().getInt("data[0].changeType"); int changeType1 = response.jsonPath().getInt("data[0].changeType");
Assert.assertTrue(changeType1 ==2, network.message(PAY_accDetail, "收益明细为null", response.body().asString())); Assert.assertTrue(changeType1 ==2, network.message(PAY_accDetail, "收益明细为null", response.body().asString()));
} }
@Test(description = "代理人提现",priority = 8) @Test(description = "代理人提现",priority = 8)
......
...@@ -874,8 +874,6 @@ public class BasicConfig { ...@@ -874,8 +874,6 @@ public class BasicConfig {
public static final String ARTICLE_getQuestionDetail = HOST +"/kjy/mp/explosioncontent/qa/getQuestionDetail"; public static final String ARTICLE_getQuestionDetail = HOST +"/kjy/mp/explosioncontent/qa/getQuestionDetail";
public static final String ARTICLE_GETEXPLOSIONCONTENTLIST = HOST + "/kjy/mp/explosioncontent/getExplosionContentList"; public static final String ARTICLE_GETEXPLOSIONCONTENTLIST = HOST + "/kjy/mp/explosioncontent/getExplosionContentList";
public static final String ARTICLE_interact = HOST + "/kjy/mp/article/interact"; public static final String ARTICLE_interact = HOST + "/kjy/mp/article/interact";
// 风险评测
public static final String RISKTEST_SENDINFO = ACTIVITY1_HOST + "/kjy/mp/activity/sendInfoForRisk";
// ************** 发圈素材 *************** // ************** 发圈素材 ***************
public static final String FRIENDS_GETMATERIALTAGS = HOST + "/kjy/mp/materialContent/getmaterialTags"; public static final String FRIENDS_GETMATERIALTAGS = HOST + "/kjy/mp/materialContent/getmaterialTags";
...@@ -946,6 +944,11 @@ public class BasicConfig { ...@@ -946,6 +944,11 @@ public class BasicConfig {
// ************** 设置中心 *************** // ************** 设置中心 ***************
public static final String SELLERCONFIG_EDITCONFIG = HOST + "/kjy/mp/sellerConfig/editConfig"; public static final String SELLERCONFIG_EDITCONFIG = HOST + "/kjy/mp/sellerConfig/editConfig";
//*************** 签到领红包 ************************
public static final String ATTEND_entrance = HOST + "/kjy/mp/attend/entrance";
public static final String ATTEND_detail = HOST + "/kjy/mp/attend/detail";
public static final String ATTEND_income = HOST + "/kjy/mp/attend/income";
public static final String ATTEND_open = HOST + "/kjy/mp/attend/open";
// ************** BOSS看板 *************** // ************** BOSS看板 ***************
public static final String BOSS_ROLE = HOST + "/kjy/mp/seller/team/member/role"; public static final String BOSS_ROLE = HOST + "/kjy/mp/seller/team/member/role";
......
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