Commit eaba6bcf authored by 龚小红's avatar 龚小红

1.增加险种和成单的测试用例

parent 48cded8f
......@@ -226,7 +226,19 @@ public class Depts implements Authorization {
public void 标记成单(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custids.get(0));
params.put("applicantName", "测试投保人");
params.put("comeIntoFacetime", "2023-03-23");
params.put("costOption", 3);
params.put("dealFlag", 1);
params.put("expertId", EXPERT_ID);
params.put("guaranteeSlipNo", "ZDHCS202303230001_01");
params.put("insuranceAmount", "100000000");
params.put("insureTime", "2023-03-24");
params.put("insuredName", "测试被保人");
params.put("productId", 19);
params.put("sellerId", SELLER_ID);
params.put("supplierId", 21);
params.put("writtenPremium", "100000000");
Response response = network.postResponse(params, BasicConfig.WORK_MNG_updateDealFlag);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.WORK_MNG_updateDealFlag, "标记成单失败", response.body().asString()));
......@@ -263,9 +275,9 @@ public class Depts implements Authorization {
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custids.get(0));
params.put("dealFlag", 0);
Response response = network.postResponse(params, BasicConfig.WORK_MNG_updateDealFlag);
Response response = network.postResponse(params, BasicConfig.WORK_MNG_cancelDealFlag);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.WORK_MNG_updateDealFlag, "取消成单失败", response.body().asString()));
Assert.assertTrue(data, network.message(params, BasicConfig.WORK_MNG_cancelDealFlag, "取消成单失败", response.body().asString()));
HashMap<String,Object> selectParams = new HashMap<String,Object>();
selectParams.put("pageIndex", 1);
......
......@@ -86,7 +86,7 @@ public class Manager implements Authorization {
Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_saveCompany,"新增同名公司成功",response.body().asString()));
}
@Test(description = "修改产品信息",priority = 5)
@Test(description = "修改产品信息",priority = 5)
public void 修改产品信息(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", 5);
......@@ -96,7 +96,7 @@ public class Manager implements Authorization {
params.put("sellerArea", "浙江省-杭州市");
Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updateCompany);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_oto_updateCompany,"修改客户失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_oto_updateCompany,"修改产品组失败",response.body().asString()));
}
@Test(description = "分页查看产品组列表",priority = 6)
......@@ -143,23 +143,17 @@ public class Manager implements Authorization {
@Test(description = "修改公司产品",priority =9)
public void 修改公司产品(){
ArrayList companyIds = new ArrayList();
companyIds.add(5);
ArrayList costOptions = new ArrayList();
costOptions.add(0);
costOptions.add(1);
costOptions.add(2);
ArrayList moneyOptions = new ArrayList();
moneyOptions.add(1);
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);
params.put("moneyOptions", moneyOptions);
params.put("conversionCoefficient", 0.123);
Response response = network.postResponse(params,BasicConfig.MANAGER_oto_productSave);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_oto_productSave,"修改公司产品失败",response.body().asString()));
......@@ -188,25 +182,18 @@ public class Manager implements Authorization {
@Test(description = "还原公司产品",priority = 11)
public void 还原公司产品(){
ArrayList companyIds = new ArrayList();
companyIds.add(5);
ArrayList costOptions = new ArrayList();
costOptions.add(0);
costOptions.add(1);
costOptions.add(2);
costOptions.add(3);
ArrayList moneyOptions = new ArrayList();
moneyOptions.add(1);
moneyOptions.add(2);
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("conversionCoefficient", 0.356);
params.put("costOptions", costOptions);
params.put("moneyOptions", moneyOptions);
Response response = network.postResponse(params,BasicConfig.MANAGER_oto_productSave);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_oto_productSave,"修改公司产品失败",response.body().asString()));
......@@ -619,27 +606,18 @@ public class Manager implements Authorization {
}
@Test(description = "标记成单",priority = 46)
@Test(description = "客户标签更新",priority = 46)
public void 标记成单(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custids.get(0));
params.put("dealFlag", 1);
Response response = network.postResponse(params, BasicConfig.MANAGER_updateDealFlag);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.MANAGER_updateDealFlag, "标记成单失败", response.body().asString()));
HashMap<String,Object> selectParams = new HashMap<String,Object>();
selectParams.put("pageIndex", 1);
selectParams.put("pageSize", 10);
selectParams.put("phoneNum", "15136361300");
response = network.getResponse(selectParams,BasicConfig.MANAGER_oto_customerList);
Response response = network.getResponse(selectParams,BasicConfig.MANAGER_oto_customerList);
int tagSize = response.jsonPath().getInt("data.list[0].tagNames.size()");
int dealFlag = response.jsonPath().getInt("data.list[0].dealFlag");
String inviteName = response.jsonPath().getString("data.list[0].inviteVo.sellerName");
String sellerName = response.jsonPath().getString("data.list[0].sellerVo.sellerName");
String expertName = response.jsonPath().getString("data.list[0].expertVo.sellerName");
Assert.assertEquals(tagSize,1 ,network.message(selectParams, BasicConfig.MANAGER_oto_customerList, "修改客户标签失败", response.body().asString()));
Assert.assertEquals(dealFlag,1 ,network.message(selectParams, BasicConfig.MANAGER_oto_customerList, "标记客户成单失败", response.body().asString()));
Assert.assertEquals(inviteName,"勿动-自动化测试邀约" ,network.message(selectParams, BasicConfig.MANAGER_oto_customerList, "当前跟进邀约错误", response.body().asString()));
Assert.assertEquals(sellerName,"勿动-自动化测试带看" ,network.message(selectParams, BasicConfig.MANAGER_oto_customerList, "当前跟进销售错误", response.body().asString()));
Assert.assertEquals(expertName,"勿动-自动化测试专家" ,network.message(selectParams, BasicConfig.MANAGER_oto_customerList, "当前跟进专家错误", response.body().asString()));
......@@ -655,24 +633,15 @@ public class Manager implements Authorization {
Assert.assertTrue(data, network.message(params, BasicConfig.MANAGER_tag_batchUpdate, "批量修改客户标签失败", response.body().asString()));
}
@Test(description = "取消成单",priority = 48)
public void 取消成单(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custids.get(0));
params.put("dealFlag", 0);
Response response = network.postResponse(params, BasicConfig.MANAGER_updateDealFlag);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.MANAGER_updateDealFlag, "取消成单失败", response.body().asString()));
@Test(description = "批量客户标签更新",priority = 48)
public void 批量客户标签更新(){
HashMap<String,Object> selectParams = new HashMap<String,Object>();
selectParams.put("pageIndex", 1);
selectParams.put("pageSize", 10);
selectParams.put("phoneNum", "15136361300");
response = network.getResponse(selectParams,BasicConfig.MANAGER_oto_customerList);
Response response = network.getResponse(selectParams,BasicConfig.MANAGER_oto_customerList);
int tagSize = response.jsonPath().getInt("data.list[0].tagNames.size()");
int dealFlag = response.jsonPath().getInt("data.list[0].dealFlag");
Assert.assertEquals(tagSize,3 ,network.message(selectParams, BasicConfig.MANAGER_oto_customerList, "批量打客户标签失败", response.body().asString()));
Assert.assertEquals(dealFlag,0 ,network.message(selectParams, BasicConfig.MANAGER_oto_customerList, "取消客户成单失败", response.body().asString()));
}
@Test(description = "跟进人筛选客户",priority = 49)
......
......@@ -283,7 +283,8 @@ public class BasicConfig {
public static final String WORK_MNG_assignSeller = WORK_HOST + "/kjy/oto/mng/pub/form/customer/assignSeller";
public static final String WORK_MNG_updateCompany = WORK_HOST + "/kjy/oto/mng/pub/form/customer/update";
public static final String WORK_MNG_updateTag = WORK_HOST + "/kjy/oto/manager/customer/tag";
public static final String WORK_MNG_updateDealFlag = WORK_HOST + "/kjy/oto/mng/pub/form/customer/updateDealFlag";
public static final String WORK_MNG_updateDealFlag = WORK_HOST + "/kjy/oto/mng/pub/form/customer/updateDealFlag/v2";
public static final String WORK_MNG_cancelDealFlag = WORK_HOST + "/kjy/oto/mng/pub/form/customer/cancelDealFlag/v2";
public static final String WORK_MNG_searchSeller = WORK_HOST + "/kjy/oto/mng/pub/form/customer/searchSeller";
public static final String WORK_MNG_custName = WORK_HOST + "/kjy/oto/mng/pub/form/customer/fuzzy/custName";
public static final String WORK_MNG_qaDetail = WORK_HOST + "/kjy/oto/mng/pub/form/customer/qaDetail";
......
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