Commit 7570440f authored by xiamengchen's avatar xiamengchen

baocun

parent 978cc6c3
......@@ -5,6 +5,7 @@ import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.JsonUtil;
import com.kjj.utils.MysqlUtils;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.testng.Assert;
......@@ -14,6 +15,7 @@ import org.testng.annotations.Test;
import org.testng.collections.Lists;
import java.io.IOException;
import java.sql.SQLException;
import java.util.*;
// 我的客户-首页
......@@ -36,6 +38,12 @@ public class MyCustomer implements Authorization {
far = new ForwardAndRead();
}
@Test()
public void 链接数据库() throws SQLException{
MysqlUtils mysqlUtils = new MysqlUtils("kejiyun");
}
// 我的客户首页_客户统计
@Test(description = "首页_客户统计", priority = 1)
public void 首页_客户统计() throws IOException{
......
......@@ -163,11 +163,23 @@ public class WhoSawMe implements Authorization {
response = network.postResponse(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3, "接口请求失败", response.body().asString()));
String visitorWxName = response.jsonPath().getString("data.list[0].nickName");
boolean isNew = response.jsonPath().getBoolean("data.list[0].isNew");
Assert.assertEquals(visitorWxName, far.getUserInfo(BasicConfig.VISITOR1_TKU).get("wxName"), network.message(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3, "访客微信昵称不匹配", response.body().asString()));
Assert.assertTrue(isNew, network.message(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3, "新老客户身份判断错误", response.body().asString()));
clueId = response.jsonPath().getLong("data.list[0].clueId");
}
// 将新用户标记为老用户(小葡萄)
@Test(description = "标记新用户为老用户", priority = 11)
public void 标记新用户为老用户() throws IOException{
param.clear();
param.put("userId", xxrUserId);
response = network.getResponse(param, BasicConfig.UPDATENEWTOOLD);
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(param, BasicConfig.UPDATENEWTOOLD, "用户身份更新失败", response.body().asString()));
}
// 获取代理人标签列表
@Test(description = "获取代理人标签列表", priority = 11)
public void 获取代理人标签列表() throws IOException{
......
......@@ -764,7 +764,7 @@ public class BasicConfig {
public static final String RELATIONINFO_LIST = HOST + "/kjy/mp/seller/customer/getRelationInfoList";
public static final String RELATIONINFO_RANKING = HOST + "/kjy/mp/seller/customer/relation/ranking";
public static final String UPDATECUSTMATERIAL = HOST + "/kjy/mp/seller/v2/customer/material/saveOrUpdate";
public static final String DELWINNER = HOST + "/kjy/mp/seller/delWinner";
public static final String UPDATENEWTOOLD = HOST + "/kjy/mp/whoSawMe/updateNewCustomerToOld";
// *************** 标签管理 ***************
public static final String TAG_ADDORUPDATE = HOST + "/kjy/mp/sellerTag/addOrUpdateTag";
public static final String TAG_GETLIST = HOST + "/kjy/mp/sellerTag/getTagList";
......
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