Commit 6ef6f0f3 authored by 郭姣's avatar 郭姣

Merge remote-tracking branch 'origin/master' into gifeature/20220629-gj

# Conflicts:
#	src/test/java/com/oto/cases/otoseller/Manager.java
parents 793c76de b4614791
......@@ -22,10 +22,6 @@ public interface Authorization {
default void otoLeaderAuth() {
network.agentCookies.put(otoLeaderCookieKey, otoLeaderCookieValue);
}
//oto销售工作台手机端-销售
default void otoSellerTku() {
network.agentCookies.put("tku", OTO_TKU);
}
//oto销售工作台-管理员
default void otoManagerAuth() {
......@@ -36,6 +32,9 @@ public interface Authorization {
default void jjbManagerAuth() {network.agentCookies.put(JJBManagerCookieKey,JJBManagerCookieValue);}
//oto销售工作台手机端-销售
default void otoSellerTku() { network.agentCookies.put("tku", OTO_TKU); }
/**
* 集客助手相关授权
*/
......@@ -53,4 +52,12 @@ public interface Authorization {
}
/**
* 直播小程序相关授权
*/
default void visitorAuth() {
network.agentCookies.put("authKey", visitorAuth);
System.out.println("用户AUTH_KEY:" + visitorAuth);
}
}
......@@ -7,17 +7,25 @@ import org.testng.Assert;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import static com.oto.config.BasicConfig.LEADER_ID;
import static com.oto.config.BasicConfig.*;
import static com.oto.utils.BaseUtils.ssoLogin;
import static com.oto.utils.ThreadSleepUtils.sleep;
public class Manager {
public class Manager implements Authorization {
private static final NetworkUtils network = NetworkUtils.getInstance();
private int sellerId; //销售ID
private String insureOrderstr; //告知书的保单号
private String pdfUrl; //告知书的模板pdfURL
private String encryptId; //告知书的加密id
private int linkId; //直播投放链接id
private String linkRemark; //直播投放链接备注
private long pathkeyId; //固定链接id
@BeforeTest
public void setUp(){
ssoLogin();
......@@ -25,17 +33,22 @@ public class Manager {
@Test(description = "分页查看销售列表",priority = 1)
public void 分页查看销售列表(){
Response response = null;
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", "1");
int size= 0 ;
int i= 1;
while(size<1){
params.put("pageIndex",i);
params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.MANAGER_oto_sellerList);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.MANAGER_oto_sellerList,"销售列表为空",response.body().asString()));
response = network.getResponse(params, BasicConfig.MANAGER_oto_sellerList);
size = response.jsonPath().getInt("data.list.findAll{it.id == "+ SELLER_ID+"}.size()");
i++;
}
int workStatus = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.workStatus");
int assignNewCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.assignNewCustPermission");
int assignRecycleCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.assignRecycleCustPermission");
int callPermission = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.callPermission");
int workStatus = response.jsonPath().getInt("data.list.find{it.id == "+ SELLER_ID+"}.workStatus");
int assignNewCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ SELLER_ID+"}.assignNewCustPermission");
int assignRecycleCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ SELLER_ID+"}.assignRecycleCustPermission");
int callPermission = response.jsonPath().getInt("data.list.find{it.id == "+ SELLER_ID+"}.callPermission");
Assert.assertEquals(workStatus,1,network.message(params,BasicConfig.MANAGER_oto_searchSeller,"工作状态错误",response.body().asString()));
Assert.assertEquals(assignNewCustPermission,1,network.message(params,BasicConfig.MANAGER_oto_searchSeller,"认领新客户及强制分配权限错误",response.body().asString()));
Assert.assertEquals(assignRecycleCustPermission,1,network.message(params,BasicConfig.MANAGER_oto_searchSeller,"认领回收客户权限错误",response.body().asString()));
......@@ -118,23 +131,6 @@ public class Manager {
Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_saveSeller,"新增同一手机号销售成功",response.body().asString()));
}
//接口对此场景做校验,仅前端做了限制
// @Test(description = "不可修改总监为普通",priority = 6)
// public void 不可修改总监为普通(){
// HashMap<String,Object> params = new HashMap<>();
// params.put("id", LEADER_ID);
// params.put("sellerName", "勿动-自动化测试总监");
// params.put("phoneNumber", "18248405155");
// params.put("roleType", 1);
// params.put("callPermission", 1);
// params.put("sellerStatus", 1);
// params.put("companyId", 3);
// params.put("sellerLevel", 1);
// Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updateSeller);
// boolean success = response.jsonPath().getBoolean("success");
// Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_updateSeller,"修改总监为普通销售成功",response.body().asString()));
// }
@Test(description = "不可新增同名公司",priority = 7)
public void 不可新增同名公司(){
HashMap<String,Object> params = new HashMap<>();
......@@ -219,6 +215,8 @@ public class Manager {
moneyOptions.add(2);
HashMap<String,Object> params = new HashMap<>();
params.put("id", 19);
params.put("businessType", 2);
params.put("supplierId", 11);
params.put("prodName", "勿动-自动化专用产品更新");
params.put("companyIds", companyIds);
params.put("costOptions", costOptions);
......@@ -238,10 +236,8 @@ public class Manager {
Response response = network.getResponse(params,BasicConfig.MANAGER_oto_productList);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.MANAGER_oto_productList,"查询公司产品为空",response.body().asString()));
int id = response.jsonPath().getInt("data.list[0].id");
Assert.assertEquals(id,19,network.message(params,BasicConfig.MANAGER_oto_productList,"查询公司产品错误",response.body().asString()));
int costOptionsSize = response.jsonPath().getInt("data.list[0].costOptions.size()");
String prodName = response.jsonPath().getString("data.list[0].prodName");
int costOptionsSize = response.jsonPath().getInt("data.list.find{it.id == 19}.costOptions.size()");
String prodName = response.jsonPath().getString("data.list.find{it.id == 19}.prodName");
Assert.assertEquals(costOptionsSize,3,network.message(params,BasicConfig.MANAGER_oto_productList,"产品的缴费期未更新",response.body().asString()));
Assert.assertEquals(prodName,"勿动-自动化专用产品更新",network.message(params,BasicConfig.MANAGER_oto_productList,"产品的名称未更新",response.body().asString()));
}
......@@ -261,6 +257,8 @@ public class Manager {
moneyOptions.add(3);
HashMap<String,Object> params = new HashMap<>();
params.put("id", 19);
params.put("businessType", 2);
params.put("supplierId", 21);
params.put("prodName", "勿动-自动化专用产品");
params.put("companyIds", companyIds);
params.put("costOptions", costOptions);
......@@ -320,5 +318,323 @@ public class Manager {
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_oto_change,"解绑坐席账号失败",response.body().asString()));
}
//
@Test(description = "不可新增同名供应商",priority = 21)
public void 不可新增同名供应商(){
HashMap<String,Object> params = new HashMap<>();
params.put("supplierName", "勿动-自动化供应商");
Response response = network.postResponse(params, BasicConfig.MANAGER_supplier_save);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_supplier_save,"新增同名供应商成功",response.body().asString()));
}
@Test(description = "修改供应商名称",priority = 22)
public void 修改供应商名称(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", 21);
params.put("supplierName", "勿动-自动化专用供应商");
Response response = network.postResponse(params, BasicConfig.MANAGER_supplier_update);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_supplier_update,"修改供应商名称失败",response.body().asString()));
}
@Test(description = "查看第三方账号列表",priority = 23)
public void 查看供应商列表(){
Response response = network.getResponse(BasicConfig.MANAGER_supplier_list);
int size = response.jsonPath().getInt("data.list.size()");
String supplierName = response.jsonPath().getString("data.list.find{it.id==21}.supplierName");
Assert.assertTrue(size>0,network.message(BasicConfig.MANAGER_supplier_list,"查询供应商列表为空",response.body().asString()));
Assert.assertEquals(supplierName,"勿动-自动化专用供应商",network.message(BasicConfig.MANAGER_supplier_list,"查询供应商名称未更新",response.body().asString()));
HashMap<String,Object> params = new HashMap<>();
params.put("id", 21);
params.put("supplierName", "勿动-自动化供应商");
response = network.postResponse(params, BasicConfig.MANAGER_supplier_update);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_supplier_update,"修改供应商名称失败",response.body().asString()));
}
@Test(description = "告知书查看产品列表",priority = 24)
public void 告知书查看产品列表(){
Response response = network.getResponse( BasicConfig.MANAGER_product_listByAttachUs);
int size1 = response.jsonPath().getInt("data.findAll{it.id == 60}.size()");
int size2 = response.jsonPath().getInt("data.findAll{it.id == 59}.size()");
int size3 = response.jsonPath().getInt("data.findAll{it.id == 19}.size()");
Assert.assertEquals(size1,0,network.message(BasicConfig.MANAGER_product_listByAttachUs,"告知书产品列表包含久久保自营产品",response.body().asString()));
Assert.assertEquals(size2,1,network.message(BasicConfig.MANAGER_product_listByAttachUs,"告知书产品列表不包含挂靠久久保产品",response.body().asString()));
Assert.assertEquals(size3,0,network.message(BasicConfig.MANAGER_product_listByAttachUs,"告知书产品列表包含其他渠道自营产品",response.body().asString()));
}
@Test(description = "获取告知书的模板",priority = 25)
public void 获取告知书的模板(){
Response response = network.getResponse( BasicConfig.MANAGER_notification_getNotificationTemplate);
pdfUrl = response.jsonPath().getString("data");
Assert.assertNotNull(pdfUrl,network.message(BasicConfig.MANAGER_notification_getNotificationTemplate,"告知书的模板pdfURL为空",response.body().asString()));
}
@Test(description = "新增告知书",priority =26)
public void 新增告知书(){
HashMap<String,Object> params = new HashMap<>();
Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy_MM_dd");
insureOrderstr = sdf.format(date)+"_0001";
params.put("insureOrder", insureOrderstr);
params.put("custName", "自动化客户");
params.put("sellerName", "自动化销售");
params.put("productId", 59);
params.put("signatureDate", System.currentTimeMillis()-86400);
params.put("notificationUrl", pdfUrl);
Response response = network.postResponse(params, BasicConfig.MANAGER_notification_save);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_notification_save,"增加告知书失败",response.body().asString()));
}
@Test(description = "查询所有供应商列表",priority = 27)
public void 查询所有供应商列表(){
Response response = network.getResponse(BasicConfig.MANAGER_supplier_listAll);
int size = response.jsonPath().getInt("data.size()");
Assert.assertTrue(size>0,network.message(BasicConfig.MANAGER_supplier_listAll,"查询供应商列表为空",response.body().asString()));
}
@Test(description = "查询告知书列表",priority = 28)
public void 查询告知书列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("pageSize", 20);
Response response = network.getResponse(params, BasicConfig.MANAGER_notification_list);
int size = response.jsonPath().getInt("data.list.size()");
String insureOrder = response.jsonPath().getString("data.list[0].insureOrder");
int signatureState = response.jsonPath().getInt("data.list[0].signatureState");
Assert.assertTrue(size>0,network.message(BasicConfig.MANAGER_notification_list,"查询告知书列表为空",response.body().asString()));
Assert.assertEquals(insureOrder,insureOrderstr,network.message(BasicConfig.MANAGER_notification_list,"告知书的投保单号错误",response.body().asString()));
Assert.assertEquals(signatureState,0,network.message(BasicConfig.MANAGER_notification_list,"告知书的状态错误:非待签名",response.body().asString()));
encryptId = response.jsonPath().getString("data.list[0].encryptId");
}
@Test(description = "修改告知书",priority = 29)
public void 修改告知书(){
HashMap<String,Object> params = new HashMap<>();
Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy_MM_dd");
insureOrderstr = sdf.format(date)+"_A0001";
params.put("id", IdMakeUtil.decodingId(encryptId));
params.put("insureOrder", insureOrderstr);
params.put("custName", "自动化告知书客户");
params.put("sellerName", "自动化告知书销售");
params.put("productId", 59);
params.put("signatureDate", System.currentTimeMillis());
params.put("notificationUrl", "//yun.dui88.com/kjy/other/20220607/9b78877fe9f748f78a031c709c66b2c4.pdf");
Response response = network.postResponse(params, BasicConfig.MANAGER_notification_update);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_notification_update,"修改告知书失败",response.body().asString()));
}
@Test(description = "H5查询告知书详情",priority = 30)
public void H5查询告知书详情(){
HashMap<String,Object> params = new HashMap<>();
params.put("encryptId", encryptId);
Response response = network.getResponse(params, BasicConfig.PHONE_notification_getDetail);
String supplierName = response.jsonPath().getString("data.supplierName");
String custName = response.jsonPath().getString("data.custName");
String sellerName = response.jsonPath().getString("data.sellerName");
Assert.assertNotNull(supplierName,network.message(BasicConfig.PHONE_notification_getDetail,"告知书的供应商为空",response.body().asString()));
Assert.assertEquals(custName,"自动化告知书客户",network.message(BasicConfig.PHONE_notification_getDetail,"告知书的客户名字错误",response.body().asString()));
Assert.assertEquals(sellerName,"自动化告知书销售",network.message(BasicConfig.PHONE_notification_getDetail,"告知书的销售名字错误",response.body().asString()));
}
@Test(description = "客户签名告知书",priority = 31)
public void 客户签名告知书(){
HashMap<String,Object> params = new HashMap<>();
params.put("encryptId", encryptId);
params.put("notificationUrl", pdfUrl);
params.put("signatureState", 2);
Response response = network.postResponse(params, BasicConfig.PHONE_notification_updateSignatureInfo);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(BasicConfig.PHONE_notification_updateSignatureInfo,"签名告知书失败",response.body().asString()));
params.clear();
params.put("pageIndex", 1);
params.put("pageSize", 20);
response = network.getResponse(params, BasicConfig.MANAGER_notification_list);
int signatureState = response.jsonPath().getInt("data.list[0].signatureState");
Assert.assertEquals(signatureState,2,network.message(BasicConfig.MANAGER_notification_list,"告知书的状态错误:非客户已签名",response.body().asString()));
}
@Test(description = "销售签名告知书",priority = 32)
public void 销售签名告知书(){
HashMap<String,Object> params = new HashMap<>();
params.put("encryptId", encryptId);
params.put("notificationUrl", pdfUrl);
params.put("signatureState", 3);
Response response = network.postResponse(params, BasicConfig.PHONE_notification_updateSignatureInfo);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(BasicConfig.PHONE_notification_updateSignatureInfo,"签名告知书失败",response.body().asString()));
params.clear();
params.put("pageIndex", 1);
params.put("pageSize", 20);
response = network.getResponse(params, BasicConfig.MANAGER_notification_list);
int signatureState = response.jsonPath().getInt("data.list[0].signatureState");
Assert.assertEquals(signatureState,3,network.message(BasicConfig.MANAGER_notification_list,"告知书的状态错误:非销售客户都签名",response.body().asString()));
}
@Test(description = "标记告知书失效",priority = 33)
public void 标记告知书失效(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", IdMakeUtil.decodingId(encryptId));
Response response = network.postResponse(params, BasicConfig.MANAGER_notification_signInvalid);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(BasicConfig.MANAGER_notification_signInvalid,"签名告知书失败",response.body().asString()));
params.clear();
params.put("pageIndex", 1);
params.put("pageSize", 20);
response = network.getResponse(params, BasicConfig.MANAGER_notification_list);
int signatureState = response.jsonPath().getInt("data.list[0].signatureState");
Assert.assertEquals(signatureState,4,network.message(BasicConfig.MANAGER_notification_list,"告知书的状态错误:非已失效",response.body().asString()));
}
@Test(description = "修改投放账户",priority =34)
public void 修改投放账户(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", 20);
params.put("accountId", "20220107CESHI_1");
params.put("accountName", "勿动_自动化测试专用账号");
params.put("companyId", 5);
params.put("pubChannel", 6);
Response response = network.postResponse(params, BasicConfig.MANAGER_account_saveOrUpdate);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_account_saveOrUpdate,"修改投放账户失败",response.body().asString()));
}
@Test(description = "查看投放账户列表",priority =35)
public void 查看投放账户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("pageSize", 20);
params.put("accountId", "");
params.put("accountName", "");
Response response = network.getResponse(params, BasicConfig.MANAGER_account_list);
int size = response.jsonPath().getInt("data.list.size");
Assert.assertTrue(size>0,network.message(params,BasicConfig.MANAGER_account_list,"投放账户列表为空",response.body().asString()));
int size2 = response.jsonPath().getInt("data.list.findAll{it.accountId == '20220107CESHI_1'}.size");
String accountName = response.jsonPath().getString("data.list.find{it.accountId == '20220107CESHI_1'}.accountName");
Assert.assertEquals(size2,1,network.message(params,BasicConfig.MANAGER_account_list,"投放账户列表不包含修改后的投放账户",response.body().asString()));
Assert.assertEquals(accountName,"勿动_自动化测试专用账号",network.message(params,BasicConfig.MANAGER_account_list,"修改后的投放账户名称错误",response.body().asString()));
params.clear();
params.put("id", 20);
params.put("accountId", "20220107CESHI_01");
params.put("accountName", "勿动_自动化测试账号");
params.put("companyId", 5);
params.put("pubChannel", 5);
response = network.postResponse(params, BasicConfig.MANAGER_account_saveOrUpdate);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_account_saveOrUpdate,"修改投放账户失败",response.body().asString()));
}
@Test(description = "创建固定直播投放链接",priority =36)
public void 创建固定直播投放链接(){
HashMap<String,Object> params = new HashMap<>();
linkRemark = "勿动_自动化直播公司的测试投放链接"+new Date();
params.put("channelRemark", linkRemark);
params.put("companyId", "101");
params.put("liveId", 8202);
params.put("launchAccountId", 20);
Response response = network.postResponse(params, BasicConfig.MANAGER_link_save);
linkId = response.jsonPath().getInt("data");
Assert.assertNotNull(linkId,network.message(params,BasicConfig.MANAGER_link_save,"修改投放账户失败",response.body().asString()));
}
@Test(description = "获取直播链接生成进度",priority =37)
public void 获取直播链接生成进度(){
boolean data = false;
Response response = null;
for (int i=0;i<10 && !data;i++) {
sleep(1000);
HashMap<String,Object> params = new HashMap<>();
params.put("id", linkId);
response = network.getResponse(params, BasicConfig.MANAGER_link_getStatus);
data = response.jsonPath().getBoolean("data");
}
Assert.assertTrue(data,network.message(BasicConfig.MANAGER_link_getStatus,"生成投放链接失败",response.body().asString()));
}
@Test(description = "查看直播投放链接列表",priority =38)
public void 查看直播投放链接列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("pageSize", 20);
Response response = network.getResponse(params, BasicConfig.MANAGER_link_list);
int size = response.jsonPath().getInt("data.list.size");
Assert.assertTrue(size>0,network.message(params,BasicConfig.MANAGER_link_list,"直播投放链接列表为空",response.body().asString()));
int liveSpreadLinkId = response.jsonPath().getInt("data.list[0].liveSpreadLinkId");
String channelRemark = response.jsonPath().getString("data.list[0].channelRemark");
Assert.assertEquals(liveSpreadLinkId,linkId,network.message(params,BasicConfig.MANAGER_link_list,"直播投放链接列表不包含新增的投放直播链接",response.body().asString()));
Assert.assertEquals(channelRemark,linkRemark,network.message(params,BasicConfig.MANAGER_link_list,"新增的投放直播链接备注错误",response.body().asString()));
pathkeyId = response.jsonPath().getLong("data.list[0].id");
}
@Test(description = "查看映射记录",priority =39)
public void 查看映射记录(){
HashMap<String,Object> params = new HashMap<>();
params.put("pathKey", pathkeyId);
params.put("pageIndex", 1);
params.put("pageSize", 5);
Response response = network.getResponse(params, BasicConfig.MANAGER_link_listByPathKey);
int size = response.jsonPath().getInt("data.list.size");
Assert.assertEquals(size,1,network.message(params,BasicConfig.MANAGER_link_listByPathKey,"投放账户列表为空",response.body().asString()));
int liveSpreadLinkId = response.jsonPath().getInt("data.list[0].liveSpreadLinkId");
Assert.assertEquals(liveSpreadLinkId,linkId,network.message(params,BasicConfig.MANAGER_link_listByPathKey,"投放账户列表不包含修改后的投放账户",response.body().asString()));
}
@Test(description = "修改固定直播投放链接",priority =40)
public void 修改固定直播投放链接(){
HashMap<String,Object> params = new HashMap<>();
linkRemark = "勿动_自动化直播公司的测试投放链接"+new Date();
params.put("channelRemark", linkRemark);
params.put("companyId", "101");
params.put("liveId", 8203);
params.put("launchAccountId", 20);
params.put("pathKey", pathkeyId);
Response response = network.postResponse(params, BasicConfig.MANAGER_link_fakeUpdate);
linkId = response.jsonPath().getInt("data");
Assert.assertNotNull(linkId,network.message(params,BasicConfig.MANAGER_link_fakeUpdate,"修改投放账户失败",response.body().asString()));
}
@Test(description = "修改固定链接后查看映射记录更新",priority =41)
public void 修改固定链接后查看映射记录更新(){
HashMap<String,Object> params = new HashMap<>();
params.put("pathKey", pathkeyId);
params.put("pageIndex", 1);
params.put("pageSize", 5);
Response response = network.getResponse(params, BasicConfig.MANAGER_link_listByPathKey);
int size = response.jsonPath().getInt("data.list.size");
Assert.assertEquals(size,2,network.message(params,BasicConfig.MANAGER_link_listByPathKey,"投放账户列表为空",response.body().asString()));
int liveSpreadLinkId = response.jsonPath().getInt("data.list[0].liveSpreadLinkId");
Assert.assertEquals(liveSpreadLinkId,linkId,network.message(params,BasicConfig.MANAGER_link_listByPathKey,"投放账户列表不包含修改后的投放账户",response.body().asString()));
}
@Test(description = "名称模糊搜索投放账户",priority =42)
public void 名称模糊搜索投放账户(){
HashMap<String,Object> params = new HashMap<>();
params.put("accountName", "勿动");
Response response = network.getResponse(params, BasicConfig.MANAGER_account_fuzzyByAccountName);
int size = response.jsonPath().getInt("data.list.size");
Assert.assertEquals(size,1,network.message(params,BasicConfig.MANAGER_account_fuzzyByAccountName,"查询的投放账户列表为空",response.body().asString()));
int launchAccountId = response.jsonPath().getInt("data[0].launchAccountId");
Assert.assertEquals(launchAccountId,20,network.message(params,BasicConfig.MANAGER_account_fuzzyByAccountName,"模糊查询结果错误",response.body().asString()));
}
@Test(description = "投放链接进入直播后获取直播id",priority =43)
public void 投放链接进入直播后获取直播id(){
visitorAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("pathKey",IdMakeUtil.encodingId(pathkeyId));
Response response = network.getResponse(params, BasicConfig.live_mapping_getTrueLinkInfo);
int accessSource = response.jsonPath().getInt("data.accessSource");
String liveId = response.jsonPath().getString("data.liveId");
Assert.assertEquals(accessSource,linkId,network.message(params,BasicConfig.live_mapping_getTrueLinkInfo,"查询的投放账户列表为空",response.body().asString()));
Assert.assertEquals(liveId,IdMakeUtil.encodingId(8203L),network.message(params,BasicConfig.live_mapping_getTrueLinkInfo,"模糊查询结果错误",response.body().asString()));
}
}
......@@ -12,9 +12,7 @@ import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
import static com.oto.cases.otoseller.Work.phone;
import static com.oto.utils.BaseUtils.*;
......@@ -40,16 +38,7 @@ public class Phone implements Authorization {
interviewIds = new ArrayList<>();
}
@Test(description = "查看我的客户",priority = 1)
public void 查看我的客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_customerList);
int size = response.jsonPath().getInt("data.myCustomerVos.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.PHONE_customerList,"客户列表为空",response.body().asString()));
}
@Test(description = "不可创建重复手机号的客户",priority = 2)
@Test(description = "不可创建重复手机号的客户",priority = 1)
public void 不可创建重复手机号的客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "重复客户");
......@@ -60,7 +49,7 @@ public class Phone implements Authorization {
Assert.assertFalse(success,network.message(params,BasicConfig.PHONE_customerSave,"手机号重复创建客户成功",response.body().asString()));
}
@Test(description = "创建缘故客户",priority = 3)
@Test(description = "创建缘故客户",priority = 2)
public void 创建缘故客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化缘故客户");
......@@ -71,7 +60,7 @@ public class Phone implements Authorization {
Assert.assertNotNull(myselfCustomer_id,network.message(params,BasicConfig.PHONE_customerSave,"创建缘故客户失败",response.body().asString()));
}
@Test(description = "创建转介绍客户",priority = 4)
@Test(description = "创建转介绍客户",priority = 3)
public void 创建转介绍客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化转介绍客户");
......@@ -83,7 +72,7 @@ public class Phone implements Authorization {
Assert.assertNotNull(introduceCustomer_id,network.message(params,BasicConfig.PHONE_customerSave,"创建转介绍客户失败",response.body().asString()));
}
@Test(description = "姓名搜索客户",priority = 5)
@Test(description = "姓名搜索客户",priority = 4)
public void 姓名搜索客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化测试用户");
......@@ -96,7 +85,7 @@ public class Phone implements Authorization {
custName = response.jsonPath().getString("data.myCustomerVos[0].custName");
}
@Test(description = "姓名模糊关联客户",priority = 6)
@Test(description = "姓名模糊关联客户",priority = 5)
public void 姓名模糊查找客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化");
......@@ -104,26 +93,56 @@ public class Phone implements Authorization {
int size = response.jsonPath().getInt("data.myCustomerVos.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.PHONE_fuzzyList,"创建缘故客户失败",response.body().asString()));
}
@Test(description = "关闭见面场景后不可查看场景",priority = 6)
public void 关闭见面场景后不可查看场景(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
Response response = network.getResponse(params, BasicConfig.PHONE_listCustInterConf);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,0,network.message(params,BasicConfig.PHONE_listCustInterConf,"见面场景列表数量错误",response.body().asString()));
@Test(description = "创建社区面访并关联转介绍和缘故客户",priority = 7)
public void 创建社区面访并关联转介绍和缘故客户(){
}
@Test(description = "打开场景后查看客户1阶段对应的见面场景",priority = 7)
public void 打开场景后查看客户1阶段对应的见面场景(){
otoManagerAuth();
HashMap<String,Object> params = new HashMap<>();
ids = new ArrayList();
ids.add(cust_id);
ids.add(myselfCustomer_id);
ids.add(introduceCustomer_id);
params.put("custIds", ids);
params.put("interviewType", 2);
params.put("appointmentTime", System.currentTimeMillis()+3600000);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewSave);
int size = response.jsonPath().getJsonObject("data.size()");
Assert.assertEquals(size,3,network.message(params,BasicConfig.PHONE_interviewSave,"创建普通面访失败",response.body().asString()));
interviewIds.add(response.jsonPath().getString("data[0]"));
interviewIds.add(response.jsonPath().getString("data[1]"));
interviewIds.add(response.jsonPath().getString("data[2]"));
params.put("id",Work.sceneId);
params.put("confUsable",1);
Response response =network.postResponse(params,BasicConfig.PHONE_updateStatus);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_updateStatus,"关闭见面场景失败",response.body().asString()));
params.clear();
params.put("custId", cust_id);
response = network.getResponse(params, BasicConfig.PHONE_listCustInterConf);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,1,network.message(params,BasicConfig.PHONE_listCustInterConf,"见面场景列表数量错误",response.body().asString()));
String sceneName = response.jsonPath().getString("data[0].sceneName");
Assert.assertEquals(sceneName,"勿动-自动化面访场景",network.message(params,BasicConfig.PHONE_listCustInterConf,"见面场景列表详情错误",response.body().asString()));
}
@Test(description = "创建1进2的面访",priority = 8)
public void 创建12的面访(){
interviewIds.add(saveInterview(cust_id,1));
interviewIds.add(saveInterview(myselfCustomer_id,1));
interviewIds.add(saveInterview(introduceCustomer_id,1));
}
@Test(description = "查看我的客户列表已面访客户状态显示",priority = 9)
public void 查看我的客户列表已面访客户状态显示(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_customerList);
int size = response.jsonPath().getInt("data.myCustomerVos.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.PHONE_customerList,"客户列表为空",response.body().asString()));
int custFlow = response.jsonPath().getInt("data.myCustomerVos.find{it.custName == '自动化测试用户'}.custFlow");
boolean interviewStatus = response.jsonPath().getBoolean("data.myCustomerVos.find{it.custName == '自动化测试用户'}.interviewStatus");
Assert.assertEquals(custFlow,1,network.message(params,BasicConfig.PHONE_customerList,"客户阶段错误",response.body().asString()));
Assert.assertTrue(interviewStatus,network.message(params,BasicConfig.PHONE_customerList,"客户面访状态错误:非面访中",response.body().asString()));
}
@Test(description = "查询面访二维码",priority = 8)
@Test(description = "查询面访二维码",priority = 10)
public void 查询面访二维码(){
HashMap<String,Object> params = new HashMap<>();
params.put("ids", interviewIds.get(0)+","+interviewIds.get(1)+","+interviewIds.get(2));
......@@ -134,7 +153,7 @@ public class Phone implements Authorization {
Assert.assertEquals(statusCount,3,network.message(params,BasicConfig.PHONE_interviewCode,"面访码数量错误",response.body().asString()));
}
@Test(description = "上传地理位置",priority = 9)
@Test(description = "上传地理位置",priority = 11)
public void 上传地理位置(){
HashMap<String,Object> params = new HashMap<>();
params.put("latitude", 30.287816);
......@@ -145,7 +164,7 @@ public class Phone implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_customerSave,"上传地理位置失败",response.body().asString()));
}
@Test(description = "销售查询面访状态",priority = 10)
@Test(description = "销售查询面访状态",priority = 12)
public void 销售查询面访状态() {
sleep(1000);
......@@ -156,29 +175,6 @@ public class Phone implements Authorization {
Assert.assertEquals(interviewStatus,1,network.message(params,BasicConfig.PHONE_interviewStatus,"面访状态错误:非未授权",response.body().asString()));
}
@Test(description = "已存在未结束的普通面访后创建普通面访失败",priority = 11)
public void 已存在未结束的社区面访后创建社区面访失败(){
HashMap<String,Object> params = new HashMap<>();
params.put("custIds", ids);
params.put("interviewType", 2);
params.put("appointmentTime", System.currentTimeMillis()+3600000);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewSave);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertFalse(success,network.message(params,BasicConfig.PHONE_interviewSave,"存在未结束普通面访时创建普通面访成功",response.body().asString()));
}
@Test(description = "发起面访时查询面访详情",priority = 12)
public void 发起面访时查询面访详情(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
params.put("interviewType", 2);
Response response = network.getResponse(params, BasicConfig.PHONE_appointmentDetail);
String customerName = response.jsonPath().getString("data.custName");
String id = response.jsonPath().getString("data.id");
Assert.assertEquals(customerName,custName,network.message(params,BasicConfig.PHONE_appointmentDetail,"查询面访详情的客户姓名错误",response.body().asString()));
Assert.assertEquals(id, interviewIds.get(0),network.message(params,BasicConfig.PHONE_appointmentDetail,"查询面访详情的id错误",response.body().asString()));
}
@Test(description = "修改面访时查询面访详情",priority = 13)
public void 修改面访时查询面访详情(){
HashMap<String,Object> params = new HashMap<>();
......@@ -192,6 +188,8 @@ public class Phone implements Authorization {
public void 修改面访时间(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", interviewIds.get(0));
params.put("custPhase", 1);
params.put("interviewConfId", IdMakeUtil.encodingId(Work.sceneId));
params.put("appointmentTime", System.currentTimeMillis()+7200000);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewUpdate);
boolean data = response.jsonPath().getBoolean("data");
......@@ -258,49 +256,67 @@ public class Phone implements Authorization {
params.put("id", interviewIds.get(0));
Response response = network.getResponse(params, BasicConfig.PHONE_custExtDetail);
String interviewAddress = response.jsonPath().getString("data.interviewAddress");
int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag");
Assert.assertNotNull(interviewAddress,network.message(params,BasicConfig.PHONE_custExtDetail,"面访列表为空",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.PHONE_custExtDetail,"面访列表为空",response.body().asString()));
int commitPlanFlag = response.jsonPath().getInt("data.custInterviewExtDto.commitPlanFlag");
int custPhase = response.jsonPath().getInt("data.custInterviewExtDto.custPhase");
Assert.assertNotNull(interviewAddress,network.message(params,BasicConfig.PHONE_custExtDetail,"面访地址为空",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.PHONE_custExtDetail,"是否提交计划书不为否",response.body().asString()));
Assert.assertEquals(custPhase,1,network.message(params,BasicConfig.PHONE_custExtDetail,"见面目的不为1进2",response.body().asString()));
}
@Test(description = "上传社区面访详情",priority = 21)
public void 上传社区面访详情(){
@Test(description = "上传1进2面访详情并提示不流转2阶段",priority = 21)
public void 上传12面访详情并提示不流转2阶段(){
HashMap<String,Object> params = new HashMap<>();
ArrayList unusualTypes = new ArrayList();
unusualTypes.add(1);
unusualTypes.add(2);
int[] unusualTypes = {1,2};
int[] pensionOthers={1,2};
ArrayList unusualProofs = new ArrayList();
unusualProofs.add("https://yun.dui88.com/kjy/image/20220506/ecf1d585e2e040ad97ec7996ce5bf2a3.jpg");
unusualProofs.add("https://yun.dui88.com/kjy/image/20220505/62cc0df86ed7430ea67d5015ee3fcc2b.jpg");
params.put("id", interviewIds.get(0));
params.put("interviewRemark", "第一次社区参观");
params.put("custPhase", 1);
params.put("pensionSalary", null);
params.put("pensionCost", null);
params.put("pensionOther", null);
params.put("pensionOthers", null);
params.put("coreMaker", 2);
params.put("followWeight", 1);
params.put("commitPlanFlag", 0);
params.put("commitInsure", 0);
params.put("commitCustStatus", 2);
params.put("custFlow", 1);
params.put("isNormal", false);
params.put("insureReason", "未确认投保要素说明");
params.put("unusualTypes", unusualTypes);
params.put("unusualExplain", "手机号不一致且非面对面扫码的情况说明");
params.put("unusualProofs", unusualProofs);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewFeedback);
//校验2阶段不流转
Response response = network.postResponse(params, BasicConfig.PHONE_checkCustPhase);
boolean satisfyFlag = response.jsonPath().getBoolean("data.satisfyFlag");
String message = response.jsonPath().getString("data.message");
Assert.assertFalse(satisfyFlag,network.message(params,BasicConfig.PHONE_checkCustPhase,"上传面访失败",response.body().asString()));
Assert.assertEquals(message,"不满足阶段二客户条件,请点击“我再想想”完善客户面访信息,点击“确认”面访完成,客户阶段仍为阶段一",network.message(params,BasicConfig.PHONE_checkCustPhase,"上传面访失败",response.body().asString()));
//上传面访-修改为满足2阶段流转
params.put("pensionSalary", 1);
params.put("pensionCost", 1);
params.put("pensionOthers", pensionOthers);
params.put("pensionOther", "1,2");
response = network.postResponse(params, BasicConfig.PHONE_interviewFeedback);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(params,BasicConfig.PHONE_interviewFeedback,"上传面访失败",response.body().asString()));
}
@Test(description = "查看面访详情",priority = 22)
public void 查看面访详情(){
otoSellerTku();
sleep(1000);
HashMap<String,Object> params = new HashMap<>();
params.put("id", interviewIds.get(0));
Response response = network.getResponse(params, BasicConfig.PHONE_feedbackDetail);
int followWeight = response.jsonPath().getInt("data.followWeight");
int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag");
int pensionSalary = response.jsonPath().getInt("data.custInterviewExtDto.pensionSalary");
int size = response.jsonPath().getInt("data.unusualTypes.size()");
String unusualExplain = response.jsonPath().getString("data.unusualExplain");
Assert.assertEquals(followWeight,1,network.message(params,BasicConfig.PHONE_feedbackDetail,"关注度显示错误",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.PHONE_feedbackDetail,"是否提交计划书显示错误",response.body().asString()));
Assert.assertEquals(pensionSalary,1,network.message(params,BasicConfig.PHONE_feedbackDetail,"是否提交计划书显示错误",response.body().asString()));
Assert.assertEquals(size,2,network.message(params,BasicConfig.PHONE_feedbackDetail,"面访异常类型显示错误",response.body().asString()));
Assert.assertEquals(unusualExplain,"手机号不一致且非面对面扫码的情况说明",network.message(params,BasicConfig.PHONE_feedbackDetail,"异常情况说明显示错误",response.body().asString()));
}
......@@ -346,16 +362,16 @@ public class Phone implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_interviewAuditReject,"驳回审批失败",response.body().asString()));
}
@Test(description = "查询客户信息未更新",priority = 26)
public void 查询客户信息未更新(){
@Test(description = "查询客户阶段信息未更新",priority = 26)
public void 查询客户阶段信息未更新(){
otosellerAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.decodingId(cust_id));
Response response = network.getResponse(params,BasicConfig.WORK_detail);
int custFlow = response.jsonPath().getInt("data.custInfo.custFlow");
int commitPlanFlag = response.jsonPath().getInt("data.custInfo.commitPlanFlag");
Assert.assertEquals(custFlow,1,network.message(params,BasicConfig.WORK_detail,"新客户流程组状态错误非1",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.WORK_detail,"新客户投保要素确认状态错误非0",response.body().asString()));
params.put("custId", IdMakeUtil.decodingId(cust_id) );
Response response = network.getResponse(params,BasicConfig.PHONE_getCustPhase);
int custFlow = response.jsonPath().getInt("data.custFlow");
Object pensionSalary = response.jsonPath().getJsonObject("data.pensionSalary");
Assert.assertEquals(custFlow,1,network.message(params,BasicConfig.WORK_callLog,"新客户的客户阶段不为1:具备机构养老理念",response.body().asString()));
Assert.assertNull(pensionSalary,network.message(params,BasicConfig.WORK_callLog,"理想退休工资不为空",response.body().asString()));
}
@Test(description = "查看我的面访状态更新为已失效",priority = 27)
......@@ -377,15 +393,8 @@ public class Phone implements Authorization {
@Test(description = "客户再次创建面访并扫码评价",priority = 29)
public void 客户再次创建面访并扫码评价() throws SQLException {
otoSellerTku();
HashMap<String,Object> params = new HashMap<>();
ids = new ArrayList();
ids.add(cust_id);
params.put("custIds", ids);
params.put("interviewType", 2);
params.put("appointmentTime", System.currentTimeMillis()+3600000);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewSave);
interviewIds.clear();
interviewIds.add(response.jsonPath().getString("data[0]"));
interviewIds.add(saveInterview(cust_id,1));
agentTku();
Map<String, Object> result = KjyLiveNormalDB.getInstance().findSimpleResult(UserSqlFactory.selectCodeIdByCustomerId, IdMakeUtil.decodingId(cust_id));
......@@ -394,24 +403,39 @@ public class Phone implements Authorization {
scanCode(IdMakeUtil.encodingId((Long) scanCodeId),1047);
}
@Test(description = "销售上传社区面访",priority = 30)
public void 销售上传社区面访(){
@Test(description = "上传1进2面访详情并提示2阶段满足流转2阶段",priority = 30)
public void 上传12面访详情并提示流转2阶段(){
otoSellerTku();
HashMap<String,Object> params = new HashMap<>();
ArrayList unusualTypes = new ArrayList();
unusualTypes.add(2);
int[] unusualTypes = {2};
int[] pensionOthers = {2};
ArrayList unusualProofs = new ArrayList();
unusualProofs.add("https://yun.dui88.com/kjy/image/20220506/ecf1d585e2e040ad97ec7996ce5bf2a3.jpg");
params.put("id", interviewIds.get(0));
params.put("interviewRemark", "第一次社区参观");
params.put("custPhase", 1);
params.put("interviewRemark", "1进2的社区参观");
params.put("coreMaker", 2);
params.put("followWeight", 1);
params.put("commitPlanFlag", 0);
params.put("pensionSalary", 1);
params.put("pensionCost", 1);
params.put("pensionOther", "2");
params.put("pensionOthers", pensionOthers);
params.put("custFlow", 1);
params.put("isNormal", false);
params.put("unusualTypes", unusualTypes);
params.put("unusualExplain", "手机号不一致的情况说明");
params.put("unusualProofs", unusualProofs);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewFeedback);
//校验2阶段满足流转
Response response = network.postResponse(params, BasicConfig.PHONE_checkCustPhase);
boolean satisfyFlag = response.jsonPath().getBoolean("data.satisfyFlag");
String message = response.jsonPath().getString("data.message");
Assert.assertTrue(satisfyFlag,network.message(params,BasicConfig.PHONE_checkCustPhase,"上传面访失败",response.body().asString()));
Assert.assertEquals(message,"点击“确定”后该客户阶段变更为阶段二",network.message(params,BasicConfig.PHONE_checkCustPhase,"上传面访失败",response.body().asString()));
//上传面访
response = network.postResponse(params, BasicConfig.PHONE_interviewFeedback);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(params,BasicConfig.PHONE_interviewFeedback,"上传面访失败",response.body().asString()));
}
......@@ -436,16 +460,16 @@ public class Phone implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_interviewAuditPass,"通过审批失败",response.body().asString()));
}
@Test(description = "查询客户信息已更新",priority = 32)
public void 查询客户信息已更新(){
@Test(description = "查询客户阶段信息已更新",priority = 32)
public void 查询客户阶段信息已更新(){
otosellerAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.decodingId(cust_id));
Response response = network.getResponse(params,BasicConfig.WORK_detail);
int custFlow = response.jsonPath().getInt("data.custInfo.custFlow");
int commitPlanFlag = response.jsonPath().getInt("data.custInfo.commitPlanFlag");
Assert.assertEquals(custFlow,2,network.message(params,BasicConfig.WORK_detail,"新客户流程组状态错误非1",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.WORK_detail,"新客户投保要素确认状态错误非0",response.body().asString()));
params.put("custId", IdMakeUtil.decodingId(cust_id) );
Response response = network.getResponse(params,BasicConfig.PHONE_getCustPhase);
int custFlow = response.jsonPath().getInt("data.custFlow");
int pensionSalary = response.jsonPath().getInt("data.pensionSalary");
Assert.assertEquals(custFlow,2,network.message(params,BasicConfig.WORK_callLog,"新客户的客户阶段不为2:认同公司养老解决方案",response.body().asString()));
Assert.assertEquals(pensionSalary,1,network.message(params,BasicConfig.WORK_callLog,"理想退休工资错误",response.body().asString()));
}
@Test(description = "查看我的面访状态更新为已完成",priority =33)
......@@ -468,23 +492,14 @@ public class Phone implements Authorization {
Assert.assertEquals(twoStep,Work.chart.get("twoStep")+1,network.message(BasicConfig.WORK_staticChart,"客户社区参观后未提交计划书流程组状态未变为2",response.body().asString()));
}
@Test(description = "创建普通面访",priority = 35)
public void 创建普通面访(){
@Test(description = "创建2进3/2进4面访",priority = 35)
public void 创建24面访(){
otoSellerTku();
HashMap<String,Object> params = new HashMap<>();
ids = new ArrayList();
ids.add(cust_id);
params.put("custIds", ids);
params.put("interviewType", 1);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewSave);
int size = response.jsonPath().getJsonObject("data.size()");
Assert.assertEquals(size,1,network.message(params,BasicConfig.PHONE_interviewSave,"创建普通面访失败",response.body().asString()));
interviewIds.clear();
interviewIds.add(response.jsonPath().getString("data[0]"));
interviewIds.add(saveInterview(cust_id,2));
}
@Test(description = "客户完成普通面访并扫码",priority = 36)
public void 客户完成普通面访并扫码() throws SQLException {
@Test(description = "客户完成2进3/2进4面访并扫码",priority = 36)
public void 客户完成2阶段面访并扫码() throws SQLException {
agentTku();
Map<String, Object> result = KjyLiveNormalDB.getInstance().findSimpleResult(UserSqlFactory.selectCodeIdByCustomerId, IdMakeUtil.decodingId(cust_id));
scanCodeId = result.get("scan_code_id");
......@@ -505,10 +520,9 @@ public class Phone implements Authorization {
@Test(description = "查看公司产品列表",priority = 38)
public void 查看公司产品列表() {
String encodeProductId = IdMakeUtil.encodingId(productId);
Response response = network.getResponse(BasicConfig.PHONE_listBysellComp);
int size = response.jsonPath().getInt("data.findAll{it.id == '"+encodeProductId+"'}.size()");
Assert.assertEquals(size,1,network.message(BasicConfig.PHONE_listBysellComp,"产品列表未包含已上架产品",response.body().asString()));
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,2,network.message(BasicConfig.PHONE_listBysellComp,"产品列表未包含已上架产品",response.body().asString()));
}
@Test(description = "下架公司产品",priority = 39)
......@@ -525,10 +539,9 @@ public class Phone implements Authorization {
public void 产品下架后公司产品列表不显示() {
otoSellerTku();
String encodeProductId = IdMakeUtil.encodingId(productId);
Response response = network.postResponse(BasicConfig.PHONE_listBysellComp);
int size = response.jsonPath().getJsonObject("data.findAll{it.id == "+encodeProductId+"}.size()");
Assert.assertEquals(size,0,network.message(BasicConfig.PHONE_listBysellComp,"产品列表未包含已上架产品",response.body().asString()));
Response response = network.getResponse(BasicConfig.PHONE_listBysellComp);
int size = response.jsonPath().getJsonObject("data.size()");
Assert.assertEquals(size,1,network.message(BasicConfig.PHONE_listBysellComp,"产品列表未包含已上架产品",response.body().asString()));
HashMap<String,Object> params = new HashMap<>();
params.put("id", productId);
......@@ -536,14 +549,16 @@ public class Phone implements Authorization {
boolean data = response.jsonPath().getBoolean("data");
}
@Test(description = "上传普通面访详情",priority = 41)
public void 上传普通面访详情(){
@Test(description = "上传2进4面访并提示满足流转4阶段",priority = 41)
public void 上传24面访并提示满足流转4阶段(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", interviewIds.get(0));
params.put("interviewRemark", "第一次普通参观");
params.put("interviewRemark", "2进4的社区参观");
params.put("custPhase", 2);
params.put("coreMaker", 1);
params.put("followWeight", 2);
params.put("commitPlanFlag", 1);
params.put("planPicUrl", "//yun.dui88.com/kjy/image/20220531/e2ba7ec684044d93864678ed80b20fb3.jpg");
params.put("commitCustStatus", 1);
params.put("commitInsure", 1);
params.put("productId", IdMakeUtil.encodingId(productId));
......@@ -552,9 +567,19 @@ public class Phone implements Authorization {
params.put("insPeriod", 3);
params.put("insMoney", 3);
params.put("isNormal", true);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewFeedback);
params.put("custFlow", 2);
//校验4阶段满足流转
Response response = network.postResponse(params, BasicConfig.PHONE_checkCustPhase);
boolean satisfyFlag = response.jsonPath().getBoolean("data.satisfyFlag");
String message = response.jsonPath().getString("data.message");
Assert.assertTrue(satisfyFlag,network.message(params,BasicConfig.PHONE_checkCustPhase,"上传面访失败",response.body().asString()));
Assert.assertEquals(message,"点击“确定”后该客户阶段变更为阶段四",network.message(params,BasicConfig.PHONE_checkCustPhase,"上传面访失败",response.body().asString()));
//上传面访
response = network.postResponse(params, BasicConfig.PHONE_interviewFeedback);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(params,BasicConfig.WORK_delCust,"上传面访失败",response.body().asString()));
Assert.assertTrue(success,network.message(params,BasicConfig.PHONE_interviewFeedback,"上传面访失败",response.body().asString()));
}
@Test(description = "客户流程组_表格总览更新为当下成交",priority = 42)
......@@ -566,27 +591,42 @@ public class Phone implements Authorization {
Assert.assertEquals(fourStep,Work.chart.get("fourStep")+1,network.message(BasicConfig.WORK_staticChart,"客户社区参观后已确认投保要素流程组状态未变为4",response.body().asString()));
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.decodingId(cust_id));
response = network.getResponse(params,BasicConfig.WORK_detail);
int custFlow = response.jsonPath().getInt("data.custInfo.custFlow");
int commitInsure = response.jsonPath().getInt("data.custInfo.commitInsure");
int commitPlanFlag = response.jsonPath().getInt("data.custInfo.commitPlanFlag");
Assert.assertEquals(custFlow,4,network.message(params,BasicConfig.WORK_detail,"新客户流程组状态错误非0",response.body().asString()));
Assert.assertEquals(commitInsure,1,network.message(params,BasicConfig.WORK_detail,"新客户提交计划书状态错误非0",response.body().asString()));
Assert.assertEquals(commitPlanFlag,1,network.message(params,BasicConfig.WORK_detail,"新客户投保要素确认状态错误非0",response.body().asString()));
params.put("custId", IdMakeUtil.decodingId(cust_id) );
response = network.getResponse(params,BasicConfig.PHONE_getCustPhase);
int custFlow = response.jsonPath().getInt("data.custFlow");
int commitInsure = response.jsonPath().getInt("data.commitInsure");
Assert.assertEquals(custFlow,4,network.message(params,BasicConfig.WORK_callLog,"新客户的客户阶段不为4:当下成交",response.body().asString()));
Assert.assertEquals(commitInsure,1,network.message(params,BasicConfig.WORK_callLog,"理想退休工资错误",response.body().asString()));
}
@Test(description = "修改客户基础信息",priority = 43)
public void 修改客户基础信息(){
@Test(description = "修改客户阶段信息",priority = 43)
public void 修改客户阶段信息(){
otosellerAuth();
HashMap<String,Object> params = new HashMap<>();
ArrayList<Integer> array = new ArrayList<>();
List<Integer> pensionOthers = Arrays.asList(2);
params.put("custId", IdMakeUtil.decodingId(cust_id));
params.put("custFlow",4);
params.put("pensionSalary", 1);
params.put("pensionCost", 1);
params.put("pensionOthers", pensionOthers);
params.put("commitPlanFlag", 1);
params.put("planPicUrl", "//yun.dui88.com/kjy/image/20220531/e2ba7ec684044d93864678ed80b20fb3.jpg");
params.put("commitCustStatus", 1);
params.put("commitInsure", 1);
params.put("productId",productId);
params.put("insApplicant", 1);
params.put("insByApplicant", 1);
params.put("insPeriod", 3);
params.put("insMoney", 3);
params.put("dealFlag", 1);
params.put("dealNumber", "ZDHCSBD000001");
params.put("custName", "自动化测试用户");
Response response = network.postResponse(params,BasicConfig.WORK_edit);
params.put("insureReason", null);
params.put("isExistInterview", false);
System.out.println(params);
Response response = network.postResponse(params,BasicConfig.PHONE_updateCustPhase);
System.out.println(params);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_edit,"修改客户基础信息失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_updateCustPhase,"修改客户阶段信息失败",response.body().asString()));
}
@Test(description = "客户流程组_表格总览更新为已成单",priority = 44)
......@@ -597,14 +637,12 @@ public class Phone implements Authorization {
Assert.assertEquals(fiveStep,Work.chart.get("fiveStep")+1,network.message(BasicConfig.WORK_staticChart,"修改已成交后流程组状态未变为5",response.body().asString()));
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.decodingId(cust_id));
response = network.getResponse(params,BasicConfig.WORK_detail);
int custFlow = response.jsonPath().getInt("data.custInfo.custFlow");
int dealFlag = response.jsonPath().getInt("data.custInfo.dealFlag");
String dealNumber = response.jsonPath().getString("data.custInfo.dealNumber");
Assert.assertEquals(custFlow,5,network.message(params,BasicConfig.WORK_detail,"新客户流程组状态错误非0",response.body().asString()));
Assert.assertEquals(dealFlag,1,network.message(params,BasicConfig.WORK_detail,"新客户提交计划书状态错误非0",response.body().asString()));
Assert.assertEquals(dealNumber,"ZDHCSBD000001",network.message(params,BasicConfig.WORK_detail,"新客户投保要素确认状态错误非0",response.body().asString()));
params.put("custId", IdMakeUtil.decodingId(cust_id) );
response = network.getResponse(params,BasicConfig.PHONE_getCustPhase);
int custFlow = response.jsonPath().getInt("data.custFlow");
int dealFlag = response.jsonPath().getInt("data.dealFlag");
Assert.assertEquals(custFlow,5,network.message(params,BasicConfig.WORK_callLog,"新客户的客户阶段不为5:已成单",response.body().asString()));
Assert.assertEquals(dealFlag,1,network.message(params,BasicConfig.WORK_callLog,"是否成交字段错误为否",response.body().asString()));
}
@Test(description = "销售任务_销售完成任务",priority = 45)
......@@ -619,8 +657,8 @@ public class Phone implements Authorization {
Assert.assertTrue(finishCustNum>0,network.message(params,BasicConfig.WORK_taskDetailsList,"已完成数量记录错误",response.body().asString()));
}
@Test(description = "查看我的预约列表",priority = 46)
public void 查看我的预约列表(){
@Test(description = "查看我的预约订单列表",priority = 46)
public void 查看我的预约订单列表(){
agent2Tku();
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex",1);
......@@ -630,6 +668,66 @@ public class Phone implements Authorization {
Assert.assertEquals(bookingStatus,1,network.message(BasicConfig.PHONE_getReservationList,"订单状态未更新为已参观",response.body().asString()));
}
@Test(description = "删除见面场景",priority = 47)
public void 删除见面场景(){
otoManagerAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("id",Work.sceneId);
Response response =network.postResponse(params,BasicConfig.PHONE_delete);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_delCust,"删除见面场景失败",response.body().asString()));
}
@Test(description = "查看我的预日报为未提交",priority = 48)
public void 查看我的预日报为未提交(){
otoSellerTku();
Response response =network.getResponse(BasicConfig.PHONE_paper_getReportFlag);
int reportFlag = response.jsonPath().getInt("data.reportFlag");
Assert.assertEquals(reportFlag,0,network.message(BasicConfig.PHONE_paper_getReportFlag,"日报提交状态非未提交",response.body().asString()));
}
@Test(description = "查看日报客户列表",priority = 49)
public void 查看日报客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageSize",20);
Response response =network.getResponse(params,BasicConfig.PHONE_paper_getCustomers);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0,network.message(BasicConfig.PHONE_paper_getCustomers,"订单状态未更新为已参观",response.body().asString()));
String label = response.jsonPath().getString("data.list[0].label");
Assert.assertEquals(label,"今日查看微信",network.message(BasicConfig.PHONE_paper_getCustomers,"日报提交状态非0:未提交",response.body().asString()));
}
@Test(description = "提交日报",priority = 50)
public void 提交日报() {
HashMap<String, Object> params = new HashMap<>();
ArrayList custIds =new ArrayList();
custIds.add(IdMakeUtil.decodingId(cust_id));
custIds.add(IdMakeUtil.decodingId(introduceCustomer_id));
custIds.add(IdMakeUtil.decodingId(myselfCustomer_id));
params.put("custIds", custIds);
Response response = network.postResponse(params, BasicConfig.PHONE_paper_updateCustomer);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_paper_updateCustomer,"提交日报失败",response.body().asString()));
}
@Test(description = "提交后查看日报状态",priority = 51)
public void 提交后查看日报状态() {
Response response =network.getResponse(BasicConfig.PHONE_paper_getReportFlag);
int reportFlag = response.jsonPath().getInt("data.reportFlag");
Assert.assertEquals(reportFlag,1,network.message(BasicConfig.PHONE_paper_getReportFlag,"日报提交状态非1:未提交",response.body().asString()));
}
@Test(description = "查询新客户详细信息",priority = 52)
public void 查询新客户详细信息(){
otosellerAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.decodingId(cust_id));
Response response = network.getResponse(params,BasicConfig.WORK_detail);
int addWxStatus = response.jsonPath().getInt("data.custInfo.addWxStatus");
Assert.assertEquals(addWxStatus,3,network.message(params,BasicConfig.WORK_detail,"加微状态不为3:上报已添加",response.body().asString()));
}
@Test(description = "删除客户",priority = 79)
public void 删除客户(){
HashMap<String,Object> params = new HashMap<>();
......@@ -665,6 +763,19 @@ public class Phone implements Authorization {
Assert.assertTrue(data,network.message(BasicConfig.WORK_logout,"退出登录失败",response.body().asString()));
}
public String saveInterview(String custId,int custPhase) {
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("interviewType", 2);
params.put("custPhase", custPhase);
params.put("interviewConfId", IdMakeUtil.encodingId(Work.sceneId));
params.put("appointmentTime", System.currentTimeMillis()+3600000);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewSave);
int size = response.jsonPath().getJsonObject("data.size()");
Assert.assertEquals(size,1,network.message(params,BasicConfig.PHONE_interviewSave,"创建1进2的面访失败",response.body().asString()));
return response.jsonPath().getJsonObject("data[0]");
}
public void scanCode(String scanCodeId,int scanCodeType) {
HashMap<String,Object> params = new HashMap<>();
params.put("scanCodeId", scanCodeId);
......
......@@ -22,6 +22,7 @@ public class Work implements Authorization {
public int followTimes; //跟进次数
public static Map<String,Integer> header;
public static Map<String,Integer> chart;
public static long sceneId;
@BeforeTest
public void setUp(){
......@@ -98,7 +99,6 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.FORM_submitQuestion,"客户填写表单失败",response.body().asString()));
}
@Test(description = "公域引流_查找客户",priority = 5)
public void 公域引流_查找客户(){
HashMap<String,Object> params = new HashMap<String,Object>();
......@@ -238,12 +238,12 @@ public class Work implements Authorization {
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
Response response = network.getResponse(params,BasicConfig.WORK_detail);
Object custInfo = response.jsonPath().getJsonObject("data.custInfo");
int custFlow = response.jsonPath().getInt("data.custInfo.custFlow");
int commitInsure = response.jsonPath().getInt("data.custInfo.commitInsure");
int commitPlanFlag = response.jsonPath().getInt("data.custInfo.commitPlanFlag");
Assert.assertEquals(custFlow,1,network.message(params,BasicConfig.WORK_detail,"新客户流程组状态错误非1",response.body().asString()));
Assert.assertEquals(commitInsure,0,network.message(params,BasicConfig.WORK_detail,"新客户提交计划书状态错误非0",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.WORK_detail,"新客户投保要素确认状态错误非0",response.body().asString()));
Object formInfo = response.jsonPath().getJsonObject("data.formInfo");
Assert.assertNotNull(custInfo,network.message(params,BasicConfig.WORK_detail,"新客户提交计划书状态错误非0",response.body().asString()));
Assert.assertNotNull(formInfo,network.message(params,BasicConfig.WORK_detail,"新客户投保要素确认状态错误非0",response.body().asString()));
Assert.assertEquals(custFlow,1,network.message(params,BasicConfig.WORK_detail,"客户阶段不为1:具备机构养老理念",response.body().asString()));
}
@Test(description = "查询客户电话表单回填状态",priority = 17)
......@@ -272,6 +272,17 @@ public class Work implements Authorization {
Assert.assertNotNull(data,network.message(params,BasicConfig.WORK_callLog,"历史通话为空",response.body().asString()));
}
@Test(description = "查询客户阶段信息",priority = 20)
public void 查询客户阶段信息(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
Response response = network.getResponse(params,BasicConfig.PHONE_getCustPhase);
int custFlow = response.jsonPath().getInt("data.custFlow");
int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag");
Assert.assertEquals(custFlow,1,network.message(params,BasicConfig.WORK_callLog,"新客户的客户阶段不为1:具备机构养老理念",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.WORK_callLog,"是否提交计划书不为否",response.body().asString()));
}
@Test(description = "修改客户跟进权重",priority = 24)
public void 修改客户跟进权重(){
HashMap<String,Object> params = new HashMap<>();
......@@ -638,6 +649,7 @@ public class Work implements Authorization {
params.put("callPermission", 1);
params.put("assignNewCustPermission", 0);
params.put("assignRecycleCustPermission", 0);
params.put("lookCustPhonePermission", 0);
Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updatePermission);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(BasicConfig.MANAGER_oto_updatePermission,"关闭总监的新客户认领权限和回收客户认领权限失败",response.body().asString()));
......@@ -650,7 +662,16 @@ public class Work implements Authorization {
params.put("pageSize", 20);
Response response = network.getResponse(params,BasicConfig.WORK_freshList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertFalse(success,network.message(BasicConfig.WORK_logout,"无新客户认领权限可查看新客户列表",response.body().asString()));
Assert.assertFalse(success,network.message(BasicConfig.WORK_freshList,"无新客户认领权限可查看新客户列表",response.body().asString()));
}
@Test(description = "无查看微信权限不可查看客户号码",priority = 60)
public void 无查看微信权限不可查看客户号码(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
Response response = network.getResponse(params,BasicConfig.WORK_phone);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertFalse(success,network.message(BasicConfig.WORK_phone,"无查看微信权限可查看客户号码",response.body().asString()));
}
@Test(description = "无回收客户认领权限不可查看回收客户列表",priority = 61)
......@@ -671,6 +692,7 @@ public class Work implements Authorization {
params.put("callPermission", 1);
params.put("assignNewCustPermission", 1);
params.put("assignRecycleCustPermission", 1);
params.put("lookCustPhonePermission", 1);
Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updatePermission);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(BasicConfig.MANAGER_oto_updatePermission,"开启总监的新客户认领权限和回收客户认领权限失败",response.body().asString()));
......@@ -785,8 +807,8 @@ public class Work implements Authorization {
Assert.assertTrue(listSize>0,network.message(params,BasicConfig.WORK_taskDetailsList,"待完成客户数统计错误",response.body().asString()));
}
@Test(description = "查看我的预约列表",priority = 70)
public void 查看我的预约列表(){
@Test(description = "查看我的预约订单列表",priority = 70)
public void 查看我的预约订单列表(){
agent2Tku();
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex",1);
......@@ -799,4 +821,64 @@ public class Work implements Authorization {
Assert.assertEquals(bookingStatus,0,network.message(BasicConfig.PHONE_getReservationList,"预约状态错误:非待参观",response.body().asString()));
}
@Test(description = "新增见面场景",priority = 71)
public void 新增见面场景(){
otoManagerAuth();
int companyIds[] = {1,5};
int custFlows[] = {1,2};
HashMap<String,Object> params = new HashMap<>();
params.put("confUsable",0);
params.put("companyIds",companyIds);
params.put("custFlows",custFlows);
params.put("sceneName","勿动-自动化场景");
params.put("sceneDesc","勿动,这是自动化测试专用的面访场景");
Response response =network.postResponse(params,BasicConfig.PHONE_custConfSave);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"新增见面场景失败",response.body().asString()));
}
@Test(description = "查看见面场景列表",priority = 72)
public void 查看见面场景列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex",1);
params.put("pageSize",20);
Response response =network.getResponse(params,BasicConfig.PHONE_custConfList);
int size = response.jsonPath().getInt("data.list.size()");
int confUsable = response.jsonPath().getInt("data.list[0].confUsable");
String sceneName = response.jsonPath().getString("data.list[0].sceneName");
Assert.assertTrue(size>0 ,network.message(params,BasicConfig.PHONE_custConfList,"查看预约列表不为空",response.body().asString()));
Assert.assertEquals(confUsable, 0,network.message(params,BasicConfig.PHONE_custConfList,"查看预约列表不为空",response.body().asString()));
Assert.assertEquals(sceneName,"勿动-自动化场景",network.message(params,BasicConfig.PHONE_custConfList,"查看预约列表不为空",response.body().asString()));
sceneId = response.jsonPath().getLong("data.list[0].id");
}
@Test(description = "修改见面场景",priority = 73)
public void 修改见面场景(){
int companyIds[] ={5};
int custFlows[] = {1,2,3,4,5};
HashMap<String,Object> params = new HashMap<>();
params.put("id",sceneId);
params.put("confUsable",1);
params.put("companyIds",companyIds);
params.put("custFlows",custFlows);
params.put("sceneName","勿动-自动化面访场景");
params.put("sceneDesc","勿动,这是自动化测试专用的面访场景");
Response response =network.postResponse(params,BasicConfig.PHONE_custConfSave);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"修改自动化场景失败",response.body().asString()));
}
@Test(description = "关闭见面场景状态",priority = 74)
public void 关闭见面场景状态(){
HashMap<String,Object> params = new HashMap<>();
params.put("id",sceneId);
params.put("confUsable",0);
Response response =network.postResponse(params,BasicConfig.PHONE_updateStatus);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_updateStatus,"关闭见面场景失败",response.body().asString()));
}
}
......@@ -15,7 +15,8 @@ public class BasicConfig {
/**
* 直播账号授权key
*/
//直播访客 (吉吉)ID:907
public static String visitorAuth ="LEH7epeHVDJWzhZ6DiexTHnfZVkhkqorGGQahRpVDVGzx7dWtF6qSrZH5EJekTCXsUVsZSSj1giy6aNiJSTN1JdVtPHgU";
/**
* 集客助手授权key
*/
......@@ -58,7 +59,7 @@ public class BasicConfig {
public static final String TEST_testerDelete = MOBILE_HOST + "/test/user/test/delete";
public static final String MANAGER_encryptAuthKey = MANAGER_HOST + "/kjy/manager/testUser/encryptAuthKey";
//*************** OTO销售工作台 ***************
//*************** 公域引流 ***************
public static final String MANAGER_oto_saveTag = MANAGER_HOST + "/kjy/manager/oto/tag/save";
public static final String MANAGER_oto_updateTag = MANAGER_HOST + "/kjy/manager/oto/tag/update";
public static final String MANAGER_oto_deleteTag = MANAGER_HOST +"/kjy/manager/oto/tag/delete";
......@@ -90,7 +91,27 @@ public class BasicConfig {
public static final String MANAGER_oto_accountBind = MANAGER_HOST + "/kjy/manager/oto/seller/account/bind";
public static final String MANAGER_oto_accountUnbind = MANAGER_HOST + "/kjy/manager/oto/seller/account/unbind";
public static final String MANAGER_oto_change = MANAGER_HOST + "/kjy/manager/oto/seller/phone/change";
public static final String MANAGER_supplier_save = MANAGER_HOST + "/kjy/manager/oto/supplier/save";
public static final String MANAGER_supplier_update = MANAGER_HOST + "/kjy/manager/oto/supplier/update";
public static final String MANAGER_supplier_list = MANAGER_HOST + "/kjy/manager/oto/supplier/list";
public static final String MANAGER_notification_list = MANAGER_HOST + "/kjy/manager/oto/notification/list";
public static final String MANAGER_product_listByAttachUs = MANAGER_HOST + "/kjy/manager/oto/product/listByAttachUs";
public static final String MANAGER_notification_save = MANAGER_HOST + "/kjy/manager/oto/notification/save";
public static final String MANAGER_notification_update = MANAGER_HOST + "/kjy/manager/oto/notification/update";
public static final String MANAGER_notification_signInvalid = MANAGER_HOST + "/kjy/manager/oto/notification/signInvalid";
public static final String MANAGER_supplier_listAll = MANAGER_HOST + "/kjy/manager/oto/supplier/listAll";
public static final String MANAGER_notification_getNotificationTemplate = MANAGER_HOST + "/kjy/manager/oto/notification/getNotificationTemplate";
public static final String MANAGER_account_saveOrUpdate = MANAGER_HOST + "/kjy/manager/oto/account/saveOrUpdate";
public static final String MANAGER_account_list = MANAGER_HOST + "/kjy/manager/oto/account/list";
public static final String MANAGER_link_save = MANAGER_HOST + "/kjy/manager/oto/link/mapping/save";
public static final String MANAGER_link_getStatus = MANAGER_HOST + "/kjy/manager/live/link/getStatus";
public static final String MANAGER_link_list = MANAGER_HOST + "/kjy/manager/oto/link/mapping/list";
public static final String MANAGER_link_listByPathKey = MANAGER_HOST + "/kjy/manager/oto/link/mapping/listByPathKey";
public static final String MANAGER_link_fakeUpdate = MANAGER_HOST + "/kjy/manager/oto/link/mapping/fakeUpdate";
public static final String MANAGER_account_fuzzyByAccountName = MANAGER_HOST + "/kjy/manager/oto/account/fuzzyByAccountName";
public static final String live_mapping_getTrueLinkInfo = MOBILE_HOST + "/kjy/live/oto/link/mapping/getTrueLinkInfo";
//*************** OTO销售工作台 ***************
public static final String WORK_getCaptcha = WORK_HOST + "/kjy/oto/manager/auth/captcha";
public static final String WORK_login = WORK_HOST + "/kjy/oto/manager/auth/login";
public static final String WORK_userInfo = WORK_HOST + "/kjy/oto/manager/auth/userInfo";
......@@ -137,7 +158,13 @@ public class BasicConfig {
public static final String WORK_statisticHeader= WORK_HOST + "/kjy/oto/manager/sellerTask/statistic/header";
public static final String WORK_taskDetailsList= WORK_HOST + "/kjy/oto/manager/sellerTask/taskDetailsList";
//***********************销售工作台手机端**********************
public static final String PHONE_custConfSave = WORK_HOST + "/kjy/oto/manager/custconf/save";
public static final String PHONE_custConfList = WORK_HOST + "/kjy/oto/manager/custconf/list";
public static final String PHONE_updateStatus = WORK_HOST + "/kjy/oto/manager/custconf/updateStatus";
public static final String PHONE_getCustPhase = WORK_HOST + "/kjy/oto/manager/customer/getCustPhase";
public static final String PHONE_updateCustPhase = WORK_HOST + "/kjy/oto/manager/customer/updateCustPhase";
public static final String PHONE_delete = WORK_HOST + "/kjy/oto/manager/custconf/delete";
public static final String PHONE_customerList = PHONE_HOST + "/kjy/oto/manager/customer/list";
public static final String PHONE_customerSave = PHONE_HOST + "/kjy/oto/manager/customer/introduce/save";
public static final String PHONE_appointmentDetail = PHONE_HOST + "/kjy/oto/interview/appointment/detail";
......@@ -162,7 +189,15 @@ public class BasicConfig {
public static final String PHONE_getUnusualTypes = PHONE_HOST + "/kjy/oto/h5/v1/getUnusualTypes";
public static final String PHONE_fail = HOST + "/kjy/oto/interview/authorize/fail";
public static final String PHONE_getReservationList = HOST + "/kjy/pub/form/getReservationList";
public static final String PHONE_listCustInterConf = PHONE_HOST + "/kjy/oto/interview/listCustInterConf";
public static final String PHONE_checkCustPhase = PHONE_HOST + "/kjy/oto/interview/checkCustPhase";
public static final String PHONE_notification_getDetail = PHONE_HOST +"/kjy/oto/notification/getDetail";
public static final String PHONE_notification_updateSignatureInfo = PHONE_HOST + "/kjy/oto/notification/updateSignatureInfo";
public static final String PHONE_paper_getReportFlag = PHONE_HOST + "/kjy/oto/seller/daily/paper/getReportFlag";
public static final String PHONE_paper_getCustomers = PHONE_HOST + "/kjy/oto/seller/daily/paper/getCustomers";
public static final String PHONE_paper_updateCustomer = PHONE_HOST + "/kjy/oto/seller/daily/paper/updateCustomer";
//******************专用测试接口****************************8
public static final String WORK_verifyCode = WORK_HOST + "/kjy/oto/auto/test/verifyCode";
public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust";
public static final String WORK_delPubFormRecord = WORK_HOST + "/kjy/oto/auto/test/delPubFormRecord";
......
......@@ -23,7 +23,7 @@ public class DingTalkUtils {
//测试结果
context = "【接口自动化测试结果反馈】\n"
+ context
+ "报告地址: http://10.172.58.199/view/kkk/job/kejiji_interface/HTML_20Report\n";
+ "报告地址: http://10.172.58.199/view/kkk/job/oto/HTML_20Report\n";
System.out.println(context);
Map<String, Object> contentParams = new HashMap<String, Object>();
......
package com.oto.utils;
import java.util.HashMap;
import java.util.Map;
/**
* @author lizhi
* @date 2020/4/9 11:36 AM
*/
public enum IdConvertBase64Enum {
/**
* 注意,code只能是两位
*/
DEF("j2", "默认类型"),
TRANS("t3", "短链接服务"),
;
private String code;
private String desc;
IdConvertBase64Enum(String code, String desc) {
this.code = code;
this.desc = desc;
}
public String getCode() {
return "K"+ code;
}
private static final Map<String, IdConvertBase64Enum> ENUM_MAP = new HashMap<>();
static{
for(IdConvertBase64Enum lengthEnum : values()){
ENUM_MAP.put(lengthEnum.getCode(), lengthEnum);
}
}
public static IdConvertBase64Enum getByCode(String code) {
if (code == null) {
return null;
}
return ENUM_MAP.get(code);
}
}
\ No newline at end of file
......@@ -78,14 +78,4 @@ public class IdMakeUtil implements Authorization {
return decodeId;
}
public static String encodingId(Long id, IdConvertBase64Enum base64Enum) {
if (id == null || base64Enum == null || base64Enum.getCode().length() != 3) {
return null;
}
id = (id << 3) ^ 7;
String encode = encoder.encodeToString(Long.toString(id).getBytes());
String replace = encode.replace("=", "");
return base64Enum.getCode() + (encode.length() - replace.length()) + replace;
}
}
......@@ -21,14 +21,6 @@ public class JmeterAccountFile {
public static void main(String[] args) {
// String path = String.valueOf(JmeterAccountFile.class.getResource("/"));
// accountFile(path);
otoCookieMaker();
}
/**
* 生成otoCookie,仅用于压力测试文件
*/
public static void otoCookieMaker() {
}
//仅用于生成直播账号Authkey文件
......
......@@ -27,7 +27,7 @@ public class NetworkUtils {
//cookies中的tku
agentCookies.put("tku",AGENT_TKU);
//多场景测试标志
// agentCookies.put("_duibaServiceGroupKey","miria-2652");
// agentCookies.put("_duibaServiceGroupKey","miria-3132");
//json类型的headers
agentHeaders.put("Content-Type","application/json");
//二进制文件的headers
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="客集集" verbose="1" thread-count="3">
<suite name="oto" verbose="1" thread-count="3">
<suite-files>
<suite-file path="workTestNG.xml"></suite-file>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="保险OTO" verbose="1" thread-count="3">
<test preserve-order="true" name="销售管理">
<test preserve-order="true" name="管理后台-公域引流">
<classes>
<class name="com.oto.cases.otoseller.Manager"/>
</classes>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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