Commit 5c6fca8c authored by 周松波's avatar 周松波

add 2 cases

parent 72ab0dc1
...@@ -318,32 +318,28 @@ public class ContractSign_signTest extends DuibaTestBase { ...@@ -318,32 +318,28 @@ public class ContractSign_signTest extends DuibaTestBase {
} }
private void modifyJoinTime(String actId, String date, String startTime, String endTime) throws Exception{ private void modifyJoinTime(String actId, String date, String startTime, String endTime) throws Exception{
String jsonBody = String.format("{" + Map<String, Object> map = new HashMap<>();
"\"title\":\"自动化_报名截止时间\"," + map.put("title", "自动化_报名截止时间");
"\"betCount\":1000," + map.put("betCount", "1000");
"\"betType\":2," + map.put("bonusType","0");
"\"openType\":0," + map.put("betType","2");
"\"rangeList\":[]," + map.put("bankerBonus", "10000");
"\"enableAmpifyCard\":false," + map.put("ruleDesc:", "<p>bao ming&nbsp;截止时间</p>");
"\"bonusType\":0," + map.put("contractCycle","7");
"\"bankerBonus\":10000," + map.put("joinTimeLimit", false);
"\"ruleDesc\":null," + map.put("fakeLimit", false);
"\"contractCycle\":7," + map.put("rankPeriod","1");
"\"joinTimeLimit\":false," + map.put("joinTimeStart", startTime);
"\"fakeLimit\":false," + map.put("joinTimeEnd", endTime);
"\"rankPeriod\":1," + map.put("joinDeadLine", date);
"\"mockValue\":0," + map.put("actId", actId);
"\"joinTimeStart\": \"%s\"," + map.put("openStatus", true);
"\"joinTimeEnd\": \"%s\"," + map.put("gradientAmountList","");
"\"joinDeadLine\": \"%s\"," + map.put("freeJoinLimit", "0");
"\"actId\":%s," + map.put("enableAmpifyCard",false);
"\"openStatus\":true," + map.put("openType", "0");
"\"gradientAmountList\":\"\"," + JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(map));
"\"freeJoinLimit\":0," + Response response = given().contentType("application/json;charset=UTF-8").cookies(authorization.ssoLogin()).body(jsonObject).post("https://mng.duibatest.com.cn/newmanager/signContract/save");
"\"fakeRatio\":0" +
"}", startTime, endTime, date, actId);
System.out.println(jsonBody);
Response response = given().contentType("application/json;charset=UTF-8").cookies(authorization.ssoLogin()).body(jsonBody).post("https://mng.duibatest.com.cn/newmanager/signContract/save");
response.prettyPrint(); response.prettyPrint();
try { try {
Assert.assertEquals(response.jsonPath().getString("success"), "true", "/signContract/save接口失败"); Assert.assertEquals(response.jsonPath().getString("success"), "true", "/signContract/save接口失败");
......
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