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

Merge branch 'Feature/signDetailAndExpert_20220424' into 'master'

增加服务专家的测试用例

See merge request !92
parents 52f63a98 105a8a32
...@@ -276,7 +276,7 @@ public class Activity implements Authorization { ...@@ -276,7 +276,7 @@ public class Activity implements Authorization {
params.put("date", today); params.put("date", today);
params.put("custId", IdMakeUtil.encodingId((long)cust_id+3)); params.put("custId", IdMakeUtil.encodingId((long)cust_id+3));
params.put("configId", 440); params.put("configId", 440);
params.put("status", 1); params.put("status", 0);
params.put("timeInterval", "am"); params.put("timeInterval", "am");
Response response = network.postResponse(params, BasicConfig.WX_checkSign); Response response = network.postResponse(params, BasicConfig.WX_checkSign);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
...@@ -368,7 +368,7 @@ public class Activity implements Authorization { ...@@ -368,7 +368,7 @@ public class Activity implements Authorization {
Assert.assertEquals(submitStatus2,0,network.message(params,BasicConfig.WX_leaderList,"销售非【未提报】状态",response.body().asString())); Assert.assertEquals(submitStatus2,0,network.message(params,BasicConfig.WX_leaderList,"销售非【未提报】状态",response.body().asString()));
Assert.assertEquals(configStatistics1,3,network.message(params,BasicConfig.WX_leaderList,"专家的见面总数错误",response.body().asString())); Assert.assertEquals(configStatistics1,3,network.message(params,BasicConfig.WX_leaderList,"专家的见面总数错误",response.body().asString()));
Assert.assertEquals(configStatistics2,3,network.message(params,BasicConfig.WX_leaderList,"销售的见面总数错误",response.body().asString())); Assert.assertEquals(configStatistics2,3,network.message(params,BasicConfig.WX_leaderList,"销售的见面总数错误",response.body().asString()));
Assert.assertEquals(custCount,2,network.message(params,BasicConfig.WX_leaderList,"销售的签到数不为0",response.body().asString())); Assert.assertEquals(custCount,2,network.message(params,BasicConfig.WX_leaderList,"销售的签到数不为2",response.body().asString()));
} }
@Test(description = "总监查看专家今日签到活动情况",priority = 21) @Test(description = "总监查看专家今日签到活动情况",priority = 21)
...@@ -387,7 +387,7 @@ public class Activity implements Authorization { ...@@ -387,7 +387,7 @@ public class Activity implements Authorization {
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"); 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, 2, 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())); Assert.assertEquals(signStatus3, 0, network.message(params, BasicConfig.WX_submitRecordDetail, "已签到的签到状态非【未到场】", response.body().asString()));
...@@ -447,7 +447,7 @@ public class Activity implements Authorization { ...@@ -447,7 +447,7 @@ public class Activity implements Authorization {
@Test(description = "查看客户报名页",priority = 26) @Test(description = "查看客户报名页",priority = 26)
public void 查看客户报名页(){ public void 查看客户报名页(){
WXCustomerTku5(); WXCustomerTku5();
Response response = network.getResponse(BasicConfig.WX_serviceExpert_detail); Response response = network.postResponse(BasicConfig.WX_serviceExpert_detail);
boolean sign = response.jsonPath().getBoolean("data.sign"); boolean sign = response.jsonPath().getBoolean("data.sign");
int showType = response.jsonPath().getInt("data.showType"); int showType = response.jsonPath().getInt("data.showType");
Assert.assertEquals(showType,1,network.message(BasicConfig.WX_serviceExpert_detail,"展示页面非【报名页】",response.body().asString())); Assert.assertEquals(showType,1,network.message(BasicConfig.WX_serviceExpert_detail,"展示页面非【报名页】",response.body().asString()));
...@@ -460,7 +460,7 @@ public class Activity implements Authorization { ...@@ -460,7 +460,7 @@ public class Activity implements Authorization {
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(BasicConfig.WX_serviceExpert_sign,"客户公众号报名失败",response.body().asString())); Assert.assertTrue(data,network.message(BasicConfig.WX_serviceExpert_sign,"客户公众号报名失败",response.body().asString()));
response = network.getResponse(BasicConfig.WX_serviceExpert_detail); response = network.postResponse(BasicConfig.WX_serviceExpert_detail);
boolean sign = response.jsonPath().getBoolean("data.sign"); boolean sign = response.jsonPath().getBoolean("data.sign");
int showType = response.jsonPath().getInt("data.showType"); int showType = response.jsonPath().getInt("data.showType");
Assert.assertEquals(showType,1,network.message(BasicConfig.WX_serviceExpert_detail,"展示页面非【报名页】",response.body().asString())); Assert.assertEquals(showType,1,network.message(BasicConfig.WX_serviceExpert_detail,"展示页面非【报名页】",response.body().asString()));
...@@ -470,7 +470,7 @@ public class Activity implements Authorization { ...@@ -470,7 +470,7 @@ public class Activity implements Authorization {
@Test(description = "查看客户中间页",priority = 28) @Test(description = "查看客户中间页",priority = 28)
public void 查看客户中间页(){ public void 查看客户中间页(){
WXCustomerTku2(); WXCustomerTku2();
Response response = network.getResponse(BasicConfig.WX_serviceExpert_detail); Response response = network.postResponse(BasicConfig.WX_serviceExpert_detail);
int showType = response.jsonPath().getInt("data.showType"); int showType = response.jsonPath().getInt("data.showType");
Assert.assertEquals(showType,2,network.message(BasicConfig.WX_serviceExpert_detail,"展示页面非【中间页】",response.body().asString())); Assert.assertEquals(showType,2,network.message(BasicConfig.WX_serviceExpert_detail,"展示页面非【中间页】",response.body().asString()));
} }
...@@ -478,7 +478,7 @@ public class Activity implements Authorization { ...@@ -478,7 +478,7 @@ public class Activity implements Authorization {
@Test(description = "查看客户服务专家",priority = 29) @Test(description = "查看客户服务专家",priority = 29)
public void 查看客户服务专家(){ public void 查看客户服务专家(){
WXCustomerTku3(); WXCustomerTku3();
Response response = network.getResponse(BasicConfig.WX_serviceExpert_detail); Response response = network.postResponse(BasicConfig.WX_serviceExpert_detail);
int showType = response.jsonPath().getInt("data.showType"); int showType = response.jsonPath().getInt("data.showType");
String expertConfigUrl = response.jsonPath().getString("data.expertConfigUrl"); String expertConfigUrl = response.jsonPath().getString("data.expertConfigUrl");
Assert.assertEquals(showType,3,network.message(BasicConfig.WX_serviceExpert_detail,"展示页面非【专家页】",response.body().asString())); Assert.assertEquals(showType,3,network.message(BasicConfig.WX_serviceExpert_detail,"展示页面非【专家页】",response.body().asString()));
...@@ -490,9 +490,9 @@ public class Activity implements Authorization { ...@@ -490,9 +490,9 @@ public class Activity implements Authorization {
WXLeaderTku(); WXLeaderTku();
Response response = network.getResponse( BasicConfig.WX_info); Response response = network.getResponse( BasicConfig.WX_info);
int size = response.jsonPath().getInt("data.roles.size()"); int size = response.jsonPath().getInt("data.roles.size()");
boolean isShowSignDetailButton = response.jsonPath().getBoolean("data.isShowSignDetailButton"); boolean showSignDetailButton = response.jsonPath().getBoolean("data.showSignDetailButton");
Assert.assertEquals(size,2,network.message(BasicConfig.WX_info,"登录人角色数错误",response.body().asString())); Assert.assertEquals(size,2,network.message(BasicConfig.WX_info,"登录人角色数错误",response.body().asString()));
Assert.assertTrue(isShowSignDetailButton,network.message(BasicConfig.WX_info,"总监不可见签到详情",response.body().asString())); Assert.assertTrue(showSignDetailButton,network.message(BasicConfig.WX_info,"总监不可见签到详情",response.body().asString()));
} }
@Test(description = "查看签到列表",priority = 31) @Test(description = "查看签到列表",priority = 31)
...@@ -505,8 +505,8 @@ public class Activity implements Authorization { ...@@ -505,8 +505,8 @@ public class Activity implements Authorization {
int shouldSignNum = response.jsonPath().getInt("data.shouldSignNum"); int shouldSignNum = response.jsonPath().getInt("data.shouldSignNum");
int notSignNum = response.jsonPath().getInt("data.notSignNum"); int notSignNum = response.jsonPath().getInt("data.notSignNum");
int size = response.jsonPath().getInt("data.vos.size()"); int size = response.jsonPath().getInt("data.vos.size()");
int isSign1 = response.jsonPath().getInt("data.vos.find{it.custName.equals(\"自动化测试用户0\")}.isSign"); int isSign1 = response.jsonPath().getInt("data.vos.find{it.name.equals(\"自动化测试用户0\")}.isSign");
int isSign2 = response.jsonPath().getInt("data.vos.find{it.custName.equals(\"自动化测试用户2\")}.isSign"); int isSign2 = response.jsonPath().getInt("data.vos.find{it.name.equals(\"自动化测试用户2\")}.isSign");
Assert.assertEquals(shouldSignNum,3,network.message(params,BasicConfig.WX_sign_list,"应签到人数错误",response.body().asString())); Assert.assertEquals(shouldSignNum,3,network.message(params,BasicConfig.WX_sign_list,"应签到人数错误",response.body().asString()));
Assert.assertEquals(notSignNum,1,network.message(params,BasicConfig.WX_sign_list,"未签到人数错误",response.body().asString())); Assert.assertEquals(notSignNum,1,network.message(params,BasicConfig.WX_sign_list,"未签到人数错误",response.body().asString()));
Assert.assertEquals(size,3,network.message(params,BasicConfig.WX_sign_list,"签到列表人数错误",response.body().asString())); Assert.assertEquals(size,3,network.message(params,BasicConfig.WX_sign_list,"签到列表人数错误",response.body().asString()));
...@@ -519,20 +519,20 @@ public class Activity implements Authorization { ...@@ -519,20 +519,20 @@ public class Activity implements Authorization {
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("activityId", IdMakeUtil.encodingId((long) acitityId-1)); params.put("activityId", IdMakeUtil.encodingId((long) acitityId-1));
params.put("custId", IdMakeUtil.encodingId((long) cust_id+1)); params.put("custId", IdMakeUtil.encodingId((long) cust_id+1));
Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce); Response response = network.postResponse(params, BasicConfig.WX_sign_complement);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WX_submitRecord,"补签失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WX_sign_complement,"补签失败",response.body().asString()));
response = network.getResponse(params, BasicConfig.WX_sign_list); response = network.getResponse(params, BasicConfig.WX_sign_list);
int notSignNum = response.jsonPath().getInt("data.notSignNum"); int notSignNum = response.jsonPath().getInt("data.notSignNum");
int isSign = response.jsonPath().getInt("data.vos.find{it.custName.equals(\"自动化测试用户2\")}.isSign"); int isSign = response.jsonPath().getInt("data.vos.find{it.custName.equals(\"自动化测试用户2\")}.isSign");
Assert.assertEquals(notSignNum,0,network.message(params,BasicConfig.WX_saveIntroduce,"未签到人数错误",response.body().asString())); Assert.assertEquals(notSignNum,0,network.message(params,BasicConfig.WX_sign_list,"未签到人数错误",response.body().asString()));
Assert.assertEquals(isSign,1,network.message(params,BasicConfig.WX_saveIntroduce,"已分配客户的签到非【是】",response.body().asString())); Assert.assertEquals(isSign,1,network.message(params,BasicConfig.WX_sign_list,"已分配客户的签到非【是】",response.body().asString()));
} }
public void sellerSubmitRecord(int status,int count){ public void sellerSubmitRecord(int status,int count){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", 1); params.put("pageIndex", 1);
params.put("pagesize",20); params.put("pagesize",20);
Response response = network.postResponse(params, BasicConfig.WX_sellerSubmitRecordList); Response response = network.postResponse(params, BasicConfig.WX_sellerSubmitRecordList);
int submitStatus = response.jsonPath().getInt("data.list[0].submitStatus"); int submitStatus = response.jsonPath().getInt("data.list[0].submitStatus");
......
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