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

增加上传KYC、上传方案、调整策略顺序的测试用例

parent 6ea8ac05
...@@ -1668,7 +1668,7 @@ public class Work implements Authorization { ...@@ -1668,7 +1668,7 @@ public class Work implements Authorization {
Response response = network.getResponse(BasicConfig.WORK_strategy_onAbleList); Response response = network.getResponse(BasicConfig.WORK_strategy_onAbleList);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
String strategyName = response.jsonPath().getString("data[0].strategyName"); String strategyName = response.jsonPath().getString("data[0].strategyName");
Assert.assertEquals(size,1,network.message(BasicConfig.WORK_strategy_searchParentSeller,"总监可看策略数量错误",response.body().asString())); Assert.assertEquals(size,2,network.message(BasicConfig.WORK_strategy_searchParentSeller,"总监可看策略数量错误",response.body().asString()));
Assert.assertEquals(strategyName,"自动化盘点策略",network.message(BasicConfig.WORK_strategy_searchParentSeller,"总监可看策略名称错误",response.body().asString())); Assert.assertEquals(strategyName,"自动化盘点策略",network.message(BasicConfig.WORK_strategy_searchParentSeller,"总监可看策略名称错误",response.body().asString()));
} }
...@@ -1712,11 +1712,11 @@ public class Work implements Authorization { ...@@ -1712,11 +1712,11 @@ public class Work implements Authorization {
otoLeaderAuth(); otoLeaderAuth();
response = network.getResponse(BasicConfig.WORK_strategy_onAbleList); response = network.getResponse(BasicConfig.WORK_strategy_onAbleList);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,0,network.message(BasicConfig.WORK_strategy_searchParentSeller,"总监可看策略数量错误",response.body().asString())); Assert.assertEquals(size,1,network.message(BasicConfig.WORK_strategy_searchParentSeller,"总监可看策略数量错误",response.body().asString()));
otoManagerAuth(); otoManagerAuth();
HashMap<String,Object> params1 = new HashMap<>(); HashMap<String,Object> params1 = new HashMap<>();
params1.put("strategyName", "自动化盘点策略"); params1.put("strategyName", "自动化盘点可用策略");
params1.put("pageIndex", "1"); params1.put("pageIndex", "1");
params1.put("pageSize", 50); params1.put("pageSize", 50);
response = network.getResponse(params1,BasicConfig.WORK_strategy_list); response = network.getResponse(params1,BasicConfig.WORK_strategy_list);
...@@ -1946,6 +1946,56 @@ public class Work implements Authorization { ...@@ -1946,6 +1946,56 @@ public class Work implements Authorization {
Assert.assertTrue(id!= tagId ,network.message(params,BasicConfig.MANAGER_oto_tagList,"标签删除后依旧显示",response.body().asString())); Assert.assertTrue(id!= tagId ,network.message(params,BasicConfig.MANAGER_oto_tagList,"标签删除后依旧显示",response.body().asString()));
} }
@Test(description = "上传KYC",priority = 146)
public void 上传KYC(){
otoManagerAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("kycImages", new String[]{"//yun.dui88.com/kjy/image/20230113/523669708b5043f5bb4641252e125cb5.jpg","//yun.dui88.com/kjy/image/20230113/edd2e950a8aa4fb2a15ae7400b768fed.jpg"});
Response response = network.postResponse(params,BasicConfig.WORK_kycUpload);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_kycUpload,"上传KYC失败",response.body().asString()));
}
@Test(description = "上传客户方案",priority = 147)
public void 上传客户方案(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("planFile","//yun.dui88.com/kjy/media/file/20230113/20230113145555/1.doc");
Response response = network.postResponse(params,BasicConfig.WORK_planFileUpload);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_planFileUpload,"上传客户方案失败",response.body().asString()));
params.put("custId", custId);
params.put("type", 2);
response = network.getResponse(params,BasicConfig.WORK_header);
int kycImages= response.jsonPath().getInt("data.kycImages.size()");
String planFile= response.jsonPath().getString("data.planFile");
Assert.assertEquals(kycImages,2,network.message(params,BasicConfig.WORK_header,"上传KYC为空",response.body().asString()));
Assert.assertNotNull(planFile,network.message(params,BasicConfig.WORK_header,"上传客户方案为空",response.body().asString()));
}
@Test(description = "移动策略",priority = 148)
public void 移动策略(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", strategyId);
params.put("strategyMove", "down");
Response response = network.postResponse(params,BasicConfig.WORK_strategyMove);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_strategyMove,"上传KYC失败",response.body().asString()));
otoLeaderAuth();
response = network.getResponse(BasicConfig.WORK_strategy_onAbleList);
String strategyName = response.jsonPath().getString("data[1].strategyName");
Assert.assertEquals(strategyName,"自动化盘点策略",network.message(BasicConfig.WORK_strategy_searchParentSeller,"总监可看策略名称错误",response.body().asString()));
otoManagerAuth();
params.put("strategyMove", "up");
response = network.postResponse(params,BasicConfig.WORK_strategyMove);
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_strategyMove,"上传KYC失败",response.body().asString()));
}
//修改客户的约面情况 //修改客户的约面情况
public void updateInvite(int interviewFlag,long time){ public void updateInvite(int interviewFlag,long time){
......
...@@ -238,6 +238,9 @@ public class BasicConfig { ...@@ -238,6 +238,9 @@ public class BasicConfig {
public static final String WORK_strategy_list= WORK_HOST + "/kjy/oto/check/strategy/list"; public static final String WORK_strategy_list= WORK_HOST + "/kjy/oto/check/strategy/list";
public static final String WORK_strategy_onAbleList= WORK_HOST + "/kjy/oto/check/strategy/onAble/list"; public static final String WORK_strategy_onAbleList= WORK_HOST + "/kjy/oto/check/strategy/onAble/list";
public static final String WORK_strategy_updateStatus= WORK_HOST + "/kjy/oto/check/strategy/status/update"; public static final String WORK_strategy_updateStatus= WORK_HOST + "/kjy/oto/check/strategy/status/update";
public static final String WORK_planFileUpload= WORK_HOST + "/kjy/oto/manager/customer/planFile/update";
public static final String WORK_kycUpload= WORK_HOST + "/kjy/oto/manager/customer/kyc/update";
public static final String WORK_strategyMove= WORK_HOST + "/kjy/oto/check/strategy/sort/move";
//*************************客集集营销平台****************************** //*************************客集集营销平台******************************
public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser"; public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser";
......
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