Commit 2c41fdfd authored by 龚小红's avatar 龚小红

增加销售工作台手机端和流程组的测试用例

parent 9aba0cb1
......@@ -6,6 +6,8 @@ import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap;
import static com.kjj.config.BasicConfig.LEADER_ID;
......@@ -204,4 +206,68 @@ public class Manager {
Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_switchDimissionStatus,"总监名下存在销售但离职成功",response.body().asString()));
}
@Test(description = "修改公司产品",priority = 14)
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("prodName", "勿动-自动化专用产品更新");
params.put("companyIds", companyIds);
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()));
}
@Test(description = "查看产品列表",priority = 15)
public void 查看产品列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("pageSize", 10);
params.put("companyIds", 5);
params.put("prodStatus", 1);
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");
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()));
}
@Test(description = "还原公司产品",priority = 15)
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("prodName", "勿动-自动化专用产品");
params.put("companyIds", companyIds);
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()));
}
}
......@@ -198,12 +198,10 @@ public class Work implements Authorization {
Assert.assertEquals(customerId,custId,network.message(params,BasicConfig.WORK_customerList,"需要联系列表中首位客户非新增客户",response.body().asString()));
int custStar = response.jsonPath().getInt("data.list[0].custStar");
int followStatus = response.jsonPath().getInt("data.list[0].followStatus");
followTimes = response.jsonPath().getInt("data.list[0].followTimes");
Object custValue = response.jsonPath().getJsonObject("data.list[0].custValue");
Object lastFollowTime = response.jsonPath().getJsonObject("data.list[0].lastFollowTime");
Assert.assertEquals(custStar,0,network.message(params,BasicConfig.WORK_customerList,"新客户默认为星标客户",response.body().asString()));
Assert.assertEquals(followStatus,1,network.message(params,BasicConfig.WORK_customerList,"新客户的默认跟进状态非需要联系状态",response.body().asString()));
Assert.assertEquals(followTimes,0,network.message(params,BasicConfig.WORK_customerList,"新客户的默认跟进次数不为0",response.body().asString()));
Assert.assertNull(custValue,network.message(params,BasicConfig.WORK_customerList,"新客户的默认客户价值不为null",response.body().asString()));
Assert.assertNull(lastFollowTime,network.message(params,BasicConfig.WORK_customerList,"新客户的默认跟进时间不为null",response.body().asString()));
......@@ -251,8 +249,6 @@ public class Work implements Authorization {
Assert.assertEquals(custFlow,1,network.message(params,BasicConfig.WORK_detail,"新客户流程组状态错误非0",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()));
}
@Test(description = "查询客户电话表单回填状态",priority = 17)
......@@ -281,15 +277,6 @@ 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.postResponse(params,BasicConfig.WORK_star);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_star,"标记星标客户失败",response.body().asString()));
}
@Test(description = "修改客户跟进权重",priority = 24)
public void 修改客户跟进权重(){
HashMap<String,Object> params = new HashMap<>();
......@@ -391,8 +378,7 @@ public class Work implements Authorization {
HashMap<String,Object> params = new HashMap<>();
ArrayList<Integer> array = new ArrayList<>();
params.put("custId", custId);
params.put("commitPlanFlag", 1);
params.put("commitCustStatus", 1);
params.put("commitPlanFlag", 0);
params.put("addWxStatus", 0);
params.put("coreMaker", 1);
params.put("ideaAgree", 1);
......@@ -403,7 +389,7 @@ public class Work implements Authorization {
params.put("custArea", "北京-北京市");
params.put("custDescription", "客户的备注");
params.put("custName", "自动化测试用户");
params.put("dealFlag", 1);
params.put("dealFlag", 0);
params.put("forWho", array);
params.put("retireMoney", 0);
params.put("roomerAge", 0);
......
......@@ -1330,6 +1330,9 @@ public class BasicConfig {
public static final String MANAGER_oto_channelList = MANAGER_HOST +"/kjy/manager/pub/form/channelList";
public static final String MANAGER_oto_updatePermission = MANAGER_HOST +"/kjy/manager/oto/seller/updatePermission";
public static final String MANAGER_oto_switchDimissionStatus = MANAGER_HOST +"/kjy/manager/oto/seller/switchDimissionStatus";
public static final String MANAGER_oto_productList = MANAGER_HOST +"/kjy/manager/oto/product/list";
public static final String MANAGER_oto_productSave = MANAGER_HOST +"/kjy/manager/oto/product/save";
public static final String MANAGER_oto_productUpdateStatus = MANAGER_HOST +"/kjy/manager/oto/product/updateStatus";
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";
......@@ -1389,7 +1392,9 @@ public class BasicConfig {
public static final String PHONE_interviewDetail = PHONE_HOST + "/kjy/oto/interview/edit/detail";
public static final String PHONE_authPhone = PHONE_HOST + "/auth/oto/authPhone";
public static final String PHONE_getAuthPhone = PHONE_HOST + "/auth/oto/getAuthPhone";
public static final String PHONE_submitEvaluate = PHONE_HOST + "/kjy/oto/interview/submitEvaluate";
public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser";
public static final String PHONE_submitEvaluate = HOST + "/kjy/oto/interview/submitEvaluate";
public static final String PHONE_listBysellComp = PHONE_HOST + "/kjy/oto/manager/customer/listBysellComp";
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";
......
......@@ -9,5 +9,5 @@ public class UserSqlFactory {
public static final String selectUserIdForJmeter = "SELECT a.`id` FROM `tb_live_user` a, `tb_users` b ,`tb_users_wx_ext` c WHERE a.`biz_user_id` = b.`id` and b.`id` = c.`user_id` and b.`union_id` NOT LIKE \"-d%\" AND c.`open_id` IS NOT NULL and c.`oa_id` = 14";
public static final String selectCodeIdByCustomerId = "SELECT `scan_code_id` FROM `tb_cust_interview_record` WHERE `customer_id` = ?";
public static final String selectCodeIdByCustomerId = "SELECT `scan_code_id` FROM `tb_cust_interview_record` WHERE `customer_id` = ? and interview_status = 1 ORDER BY id DESC ";
}
This diff is collapsed.
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