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

增加邀约优化的测试用例

parent dc8fae65
...@@ -136,6 +136,12 @@ public class Activity implements Authorization { ...@@ -136,6 +136,12 @@ public class Activity implements Authorization {
sleep(2000); sleep(2000);
updateInvite(1,now + 3600000,cust_id-1); updateInvite(1,now + 3600000,cust_id-1);
abandonCust(cust_id+1);//自动化客户2
sleep(2000);
assignSeller(cust_id+1,INVITE_ID,true,1,"crm");
sleep(2000);
updateInvite(1,now + 3600000,cust_id+1);
abandonCust(cust_id+2);//自动化客户3 abandonCust(cust_id+2);//自动化客户3
sleep(2000); sleep(2000);
assignSeller(cust_id+2,INVITE_ID,true,1,"crm"); assignSeller(cust_id+2,INVITE_ID,true,1,"crm");
...@@ -326,7 +332,7 @@ public class Activity implements Authorization { ...@@ -326,7 +332,7 @@ public class Activity implements Authorization {
int faceCustCount = response.jsonPath().getInt("data.faceCustCount"); int faceCustCount = response.jsonPath().getInt("data.faceCustCount");
int submitCount = response.jsonPath().getInt("data.submitCount"); int submitCount = response.jsonPath().getInt("data.submitCount");
int unSubmitCount = response.jsonPath().getInt("data.unSubmitCount"); int unSubmitCount = response.jsonPath().getInt("data.unSubmitCount");
Assert.assertEquals(faceCustCount,4,network.message(params,BasicConfig.WX_leaderHeader,"见面客户数错误",response.body().asString())); Assert.assertEquals(faceCustCount,3,network.message(params,BasicConfig.WX_leaderHeader,"见面客户数错误",response.body().asString()));
Assert.assertEquals(submitCount,1,network.message(params,BasicConfig.WX_leaderHeader,"已提交的销售专家数错误",response.body().asString())); Assert.assertEquals(submitCount,1,network.message(params,BasicConfig.WX_leaderHeader,"已提交的销售专家数错误",response.body().asString()));
Assert.assertEquals(unSubmitCount,4,network.message(params,BasicConfig.WX_leaderHeader,"未提交的销售专家数错误",response.body().asString())); Assert.assertEquals(unSubmitCount,4,network.message(params,BasicConfig.WX_leaderHeader,"未提交的销售专家数错误",response.body().asString()));
} }
...@@ -363,13 +369,11 @@ public class Activity implements Authorization { ...@@ -363,13 +369,11 @@ 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, 4, network.message(params, BasicConfig.WX_submitRecordDetail, "签到活动量数错误", response.body().asString())); Assert.assertEquals(size, 3, 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 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"); int signStatus3 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户4\")}.signStatus");
Assert.assertEquals(signStatus0, 0, network.message(params, BasicConfig.WX_submitRecordDetail, "已到场的签到状态非【未到场】", response.body().asString())); Assert.assertEquals(signStatus0, 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, 2, network.message(params, BasicConfig.WX_submitRecordDetail, "已签到的签到状态非【已签到】", response.body().asString())); Assert.assertEquals(signStatus3, 2, network.message(params, BasicConfig.WX_submitRecordDetail, "已签到的签到状态非【已签到】", response.body().asString()));
} }
......
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