Commit 0d4731b4 authored by 郭姣's avatar 郭姣

新建日程接口

parent fdec9202
......@@ -791,6 +791,37 @@ public class Work implements Authorization {
int logSize = logRes.jsonPath().getInt("data.list.size()");
Assert.assertTrue(logSize>0,network.message(BasicConfig.WORK_operation,"客户动态隔离失败",logRes.body().asString()));
}
@Test(description = "新建日程",priority = 59)
public void 新建日程(){
//获取日程提醒数量
Response listRes = network.getResponse(BasicConfig.WORK_notifyList);
int size = listRes.jsonPath().getInt("data.size()");
//新建日程
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
params.put("notifyTime",System.currentTimeMillis()+3600000);
params.put("type","phone");
Response scheduleRes =network.postResponse(params,BasicConfig.WORK_saveOrModifySchedule);
boolean success = scheduleRes.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(BasicConfig.WORK_saveOrModifySchedule,"新建日程失败",scheduleRes.body().asString()));
//日程通知数量增加
Response listRes2 = network.getResponse(BasicConfig.WORK_notifyList);
int size2 = listRes2.jsonPath().getInt("data.size()");
Assert.assertTrue(size<size2,network.message(BasicConfig.WORK_notifyList,"日程通知未展示新建日程",listRes.body().asString()));
}
@Test(description = "取消日程",priority = 60)
public void 取消日程(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
Response response =network.postResponse(params,BasicConfig.WORK_cancelSchedule);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(BasicConfig.WORK_cancelSchedule,"取消日程失败",response.body().asString()));
}
@Test(description = "删除客户",priority = 79)
public void 删除客户(){
HashMap<String,Object> params = new HashMap<>();
......
......@@ -1362,6 +1362,8 @@ public class BasicConfig {
public static final String WORK_claim= WORK_HOST + "/kjy/oto/manager/customer/pool/claim";
public static final String WORK_attendanceList= WORK_HOST + "/kjy/oto/manager/attendance/list";
public static final String WORK_switchWorkStatus= WORK_HOST + "/kjy/oto/manager/attendance/switchWorkStatus";
public static final String WORK_saveOrModifySchedule= WORK_HOST + "/kjy/oto/manager/sellerNotify/saveOrModifySchedule";
public static final String WORK_cancelSchedule= WORK_HOST + "/kjy/oto/manager/sellerNotify/cancelSchedule";
public static final String WORK_verifyCodet = WORK_HOST + "/kjy/oto/auto/test/verifyCode";
public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust";
......
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