Commit 17a6d815 authored by 龚小红's avatar 龚小红

修改邀约测试用例

parent eaba6bcf
......@@ -270,7 +270,7 @@ public class CheckTask implements Authorization {
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()));
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_strategyMove,"移动策略失败",response.body().asString()));
otoLeaderAuth();
response = network.getResponse(BasicConfig.WORK_strategy_onAbleList);
......@@ -283,7 +283,7 @@ public class CheckTask implements Authorization {
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()));
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_strategyMove,"移动策略失败",response.body().asString()));
}
@Test(description = "修改盘点策略",priority = 22)
......@@ -590,6 +590,8 @@ public class CheckTask implements Authorization {
saveKyc(true);
otoAssistAuth();
saveKyc(true);
otoLeaderAuth();
saveKyc(true);
//其他角色不可上传kyc
otoInviterAuth();
......@@ -598,13 +600,11 @@ public class CheckTask implements Authorization {
saveKyc(false);
otoExpertAuth();
saveKyc(false);
otoLeaderAuth();
saveKyc(false);
otoAreaAuth();
saveKyc(false);
sleep(1000);
getSchemeNum(3,0,0,null);
getSchemeNum(4,0,0,null);
}
@Test(description = "上传客户方案",priority = 52)
......@@ -630,13 +630,13 @@ public class CheckTask implements Authorization {
savePlanFile(false);
sleep(1000);
getSchemeNum(3,2,0,null);
getSchemeNum(4,2,0,null);
}
@Test(description = "查看kyc和方案上传历史列表",priority = 53)
public void 查看kyc和方案上传历史列表(){
//查看kys上传历史
getSchemeList(1,3,null);
getSchemeList(1,4,null);
//查看方案上传历史
getSchemeList(2,2,null);
......@@ -651,14 +651,14 @@ public class CheckTask implements Authorization {
otoManagerAuth();
qualifiedKyc(1,true);
sleep(1000);
getSchemeNum(3,2,0,true);
getSchemeList(1,3,1);
getSchemeNum(4,2,0,true);
getSchemeList(1,4,1);
otoPMAuth();
qualifiedKyc(0,true);
sleep(1000);
getSchemeNum(3,2,0,false);
getSchemeList(1,3,0);
getSchemeNum(4,2,0,false);
getSchemeList(1,4,0);
//其他角色不可标记kyc
otoAssistAuth();
......
......@@ -233,6 +233,7 @@ public class Depts implements Authorization {
params.put("expertId", EXPERT_ID);
params.put("guaranteeSlipNo", "ZDHCS202303230001_01");
params.put("insuranceAmount", "100000000");
params.put("insuranceYearStandard", "100000000");
params.put("insureTime", "2023-03-24");
params.put("insuredName", "测试被保人");
params.put("productId", 19);
......
......@@ -13,6 +13,7 @@ import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -30,6 +31,7 @@ public class Invite implements Authorization {
public String inviteUrl;//邀请函链接
public static long now; //当前时间戳
public static long today; //当前日期0点时间戳
public static long sunndayWeek; //当前周日日期
public double takerCoefficient;
public static InvitationRecord recordItem;
......@@ -40,6 +42,7 @@ public class Invite implements Authorization {
now = System.currentTimeMillis();
today = now-(now + 8*3600 * 1000) % (60*60*24*1000);
otoManagerAuth();
Sunday();
}
@Test(description = "新增见面场景",priority = 1)
public void 新增见面场景(){
......@@ -461,8 +464,14 @@ public class Invite implements Authorization {
int flag= 0 ;
HashMap<String,Object> params = new HashMap<>();
SimpleDateFormat sdt = new SimpleDateFormat("yyyy-MM-dd");
params.put("calendarTime", sdt.format(now));
if (calendarTime>sunndayWeek){
params.put("calendarTime", sdt.format(now+86400000*7));
}else{
params.put("calendarTime", sdt.format(now));
}
Response response =network.getResponse(params,BasicConfig.WORK_calendar_list);
System.out.println(calendarTime);
List<InviteDay> invitationList = JsonUtil.parseResponseToListBean(response, InviteDay.class);
for (InviteDay day: invitationList) {
if(day.calendarTime == calendarTime){
......@@ -483,5 +492,17 @@ public class Invite implements Authorization {
Assert.fail("未找到相应的约面记录");
}
}
public static void Sunday(){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
if(cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY ){
sunndayWeek = cal.getTimeInMillis();
System.out.println(simpleDateFormat.format(cal.getTime()));
}else{
cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
cal.set(Calendar.DATE, cal.get(Calendar.DATE) + 6);
System.out.println(simpleDateFormat.format(cal.getTime()));
sunndayWeek = cal.getTimeInMillis();
}
}
}
......@@ -153,7 +153,6 @@ public class Manager implements Authorization {
params.put("supplierId", 11);
params.put("prodName", "勿动-自动化专用产品更新");
params.put("costOptions", costOptions);
params.put("conversionCoefficient", 0.123);
Response response = network.postResponse(params,BasicConfig.MANAGER_oto_productSave);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_oto_productSave,"修改公司产品失败",response.body().asString()));
......@@ -192,7 +191,6 @@ public class Manager implements Authorization {
params.put("businessType", 2);
params.put("supplierId", 21);
params.put("prodName", "勿动-自动化专用产品");
params.put("conversionCoefficient", 0.356);
params.put("costOptions", costOptions);
Response response = network.postResponse(params,BasicConfig.MANAGER_oto_productSave);
boolean data = response.jsonPath().getBoolean("data");
......@@ -607,7 +605,7 @@ public class Manager implements Authorization {
}
@Test(description = "客户标签更新",priority = 46)
public void 标记成单(){
public void 客户标签更新(){
HashMap<String,Object> selectParams = new HashMap<String,Object>();
selectParams.put("pageIndex", 1);
selectParams.put("pageSize", 10);
......
......@@ -721,7 +721,7 @@ public class Phone implements Authorization {
@Test(description = "方案讲解历史更新",priority = 67)
public void 方案讲解历史更新(){
getSchemeNum(3,2,2,false);
getSchemeNum(4,2,2,false);
getSchemeList(3,2,0);
}
......
......@@ -40,7 +40,7 @@ public class Work implements Authorization {
@Test(description = "工作台_菜单权限列表",priority = 4)
public void 工作台_菜单权限列表(){
otoInviterAuth();
menuList(3);
menuList(4);
otoTakerAuth();
menuList(2);
......@@ -55,13 +55,13 @@ public class Work implements Authorization {
menuList(11);
otoPMAuth();
menuList(11);
menuList(12);
otoAreaAuth();
menuList(10);
otoManagerAuth();
menuList(18);
menuList(19);
}
@Test(description = "工作台_标签列表",priority = 5)
......
......@@ -11,6 +11,8 @@ import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -19,8 +21,14 @@ public class JmeterAccountFile {
private static final NetworkUtils network = NetworkUtils.getInstance();
public static void main(String[] args) {
// String path = String.valueOf(JmeterAccountFile.class.getResource("/"));
// accountFile(path);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
if(cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY ){
System.out.println(simpleDateFormat.format(cal.getTime()));
}
cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
cal.set(Calendar.DATE, cal.get(Calendar.DATE) + 6);
System.out.println(simpleDateFormat.format(cal.getTime()));
}
//仅用于生成直播账号Authkey文件
......
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