Commit 42643df2 authored by 龚小红's avatar 龚小红

增加创建用户和分配团队的测试用例

parent 16084acd
...@@ -149,6 +149,12 @@ public class Activity implements Authorization { ...@@ -149,6 +149,12 @@ public class Activity implements Authorization {
sleep(2000); sleep(2000);
updateInvite(1,now + 3600000,cust_id+2); updateInvite(1,now + 3600000,cust_id+2);
abandonCust(cust_id+3);//自动化客户4
sleep(2000);
assignSeller(cust_id+3,INVITE_ID,true,1,"crm");
sleep(2000);
updateInvite(1,now + 3600000,cust_id+2);
otoAssistAuth(); otoAssistAuth();
getCalendarlist(today,0,"自动化测试用户2","勿动-自动化测试邀约"); getCalendarlist(today,0,"自动化测试用户2","勿动-自动化测试邀约");
getCalendarlist(today,2,"自动化测试用户0","勿动-自动化测试邀约"); getCalendarlist(today,2,"自动化测试用户0","勿动-自动化测试邀约");
...@@ -181,6 +187,13 @@ public class Activity implements Authorization { ...@@ -181,6 +187,13 @@ public class Activity implements Authorization {
response =network.postResponse(params,BasicConfig.WORK_calendar_nowAssign); response =network.postResponse(params,BasicConfig.WORK_calendar_nowAssign);
data = response.jsonPath().getBoolean("data"); data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_nowAssign,"立即分配失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_nowAssign,"立即分配失败",response.body().asString()));
//立即分配客户4
getCalendarlist(today,2,"自动化测试用户4","勿动-自动化测试邀约");
params.put("recordId",recordItem.recordId);
response =network.postResponse(params,BasicConfig.WORK_calendar_nowAssign);
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_nowAssign,"立即分配失败",response.body().asString()));
} }
...@@ -222,7 +235,7 @@ public class Activity implements Authorization { ...@@ -222,7 +235,7 @@ public class Activity implements Authorization {
int size = response.jsonPath().getInt("data.list[0].custList.size"); int size = response.jsonPath().getInt("data.list[0].custList.size");
int configId = response.jsonPath().getInt("data.list[0].configId"); int configId = response.jsonPath().getInt("data.list[0].configId");
Assert.assertEquals(configId,440,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动的见面场景错误",response.body().asString())); Assert.assertEquals(configId,440,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动的见面场景错误",response.body().asString()));
Assert.assertEquals(size,3,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动量数错误",response.body().asString())); Assert.assertEquals(size,4,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动量数错误",response.body().asString()));
int signStatus0 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus"); int signStatus0 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus");
int signStatus1 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"); int signStatus1 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus");
int signStatus2 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"); int signStatus2 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus");
...@@ -257,6 +270,25 @@ public class Activity implements Authorization { ...@@ -257,6 +270,25 @@ public class Activity implements Authorization {
sellerSubmitRecord(0,2); sellerSubmitRecord(0,2);
} }
@Test(description = "专家确认客户未到场",priority = 13)
public void 专家确认客户未到场(){
HashMap<String,Object> params = new HashMap<>();
params.put("date", today);
params.put("custId", IdMakeUtil.encodingId((long)cust_id+3));
params.put("configId", 440);
params.put("status", 1);
params.put("timeInterval", "am");
Response response = network.postResponse(params, BasicConfig.WX_checkSign);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WX_checkSign,"确认客户未到场失败",response.body().asString()));
sellerSubmitRecord(0,2);
//查询今日到场状态变为未到场
response = network.postResponse(params, BasicConfig.WX_submitRecordDetail);
int signStatus = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户4\")}.signStatus");
Assert.assertEquals(signStatus,0,network.message(params,BasicConfig.WX_submitRecordDetail,"已签到的签到状态非【未到场】",response.body().asString()));
}
@Test(description = "专家查看提报可选择的其他见面场景",priority = 14) @Test(description = "专家查看提报可选择的其他见面场景",priority = 14)
public void 专家查看提报可选择的其他见面场景(){ public void 专家查看提报可选择的其他见面场景(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
...@@ -350,13 +382,15 @@ public class Activity implements Authorization { ...@@ -350,13 +382,15 @@ public class Activity implements Authorization {
int size = response.jsonPath().getInt("data.list[0].custList.size"); int size = response.jsonPath().getInt("data.list[0].custList.size");
int configId = response.jsonPath().getInt("data.list[0].configId"); int configId = response.jsonPath().getInt("data.list[0].configId");
Assert.assertEquals(configId, 440, network.message(params, BasicConfig.WX_submitRecordDetail, "签到活动的见面场景错误", response.body().asString())); Assert.assertEquals(configId, 440, network.message(params, BasicConfig.WX_submitRecordDetail, "签到活动的见面场景错误", response.body().asString()));
Assert.assertEquals(size, 3, network.message(params, BasicConfig.WX_submitRecordDetail, "签到活动量数错误", response.body().asString())); Assert.assertEquals(size, 4, network.message(params, BasicConfig.WX_submitRecordDetail, "签到活动量数错误", response.body().asString()));
int signStatus0 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus"); int signStatus0 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus");
int signStatus1 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"); int signStatus1 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus");
int signStatus2 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"); int signStatus2 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus");
int signStatus3 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户4\")}.signStatus");
Assert.assertEquals(signStatus0, 1, network.message(params, BasicConfig.WX_submitRecordDetail, "已到场的签到状态非【已到场】", response.body().asString())); Assert.assertEquals(signStatus0, 1, network.message(params, BasicConfig.WX_submitRecordDetail, "已到场的签到状态非【已到场】", response.body().asString()));
Assert.assertEquals(signStatus1, 0, network.message(params, BasicConfig.WX_submitRecordDetail, "已鸽的签到状态非【未到场】", response.body().asString())); Assert.assertEquals(signStatus1, 0, network.message(params, BasicConfig.WX_submitRecordDetail, "已鸽的签到状态非【未到场】", response.body().asString()));
Assert.assertEquals(signStatus2, 2, network.message(params, BasicConfig.WX_submitRecordDetail, "已签到的签到状态非【已签到】", response.body().asString())); Assert.assertEquals(signStatus2, 2, network.message(params, BasicConfig.WX_submitRecordDetail, "已签到的签到状态非【已签到】", response.body().asString()));
Assert.assertEquals(signStatus3, 0, network.message(params, BasicConfig.WX_submitRecordDetail, "已签到的签到状态非【未到场】", response.body().asString()));
} }
@Test(description = "总监查看专家今日非签到活动场景",priority = 22) @Test(description = "总监查看专家今日非签到活动场景",priority = 22)
......
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