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

增加邀请函、测评首页、设置中心、使用攻略的测试用例

parent 6683a357
......@@ -20,7 +20,6 @@ public class InvitationLetter implements Authorization{
public String posterConfId; // 海报邀请函配置的confId
public String posterScid; // 海报对应的scid
public String forwardTime; // 动画转发时间
public int listSize; // 动画转发时间
@BeforeClass
public void setUp(){
agentTku();
......@@ -66,18 +65,6 @@ public class InvitationLetter implements Authorization{
Assert.assertTrue(size>0,network.message(params,INViTATION_index,"贺卡列表为空",response.body().asString()));
posterInvitationId = response.jsonPath().getString("data.list.find{ it.invitationType == 1}.contentId");
animationInvitationId = response.jsonPath().getString("data.list.find{ it.invitationType == 2}.contentId");
params.clear();
params.put("pageIndex",1);
params.put("pageSize",20);
response = network.getResponse(params, INViTATION_myInvitationLetters);
success = response.jsonPath().getBoolean("success");
data = response.jsonPath().getJsonObject("data");
Assert.assertTrue(success,network.message(params,INViTATION_myInvitationLetters,"接口返回失败",response.body().asString()));
Assert.assertNotNull(data,network.message(params,INViTATION_myInvitationLetters,"接口返回数据为空",response.body().asString()));
listSize = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0,network.message(params,INViTATION_myInvitationLetters,"发送邀请函列表为空",response.body().asString()));
}
@Test(description="代理人_获取动画邀请函详情页",priority = 4)
......@@ -326,17 +313,6 @@ public class InvitationLetter implements Authorization{
Assert.assertTrue(success,network.message(params,CONTENT_READ,"接口返回失败",response.body().asString()));
Assert.assertNotNull(data,network.message(params,CONTENT_READ,"获取访问动画邀请函记录失败",response.body().asString()));
params.clear();
params.put("scid",posterScid);
params.put("forwardTime",forwardTime);
System.out.println(params.toString());
response = network.postResponse(params, DYNAMIC_addVisit);
System.out.println(response.body().asString());
success = response.jsonPath().getBoolean("success");
boolean result = response.jsonPath().getJsonObject("data");
Assert.assertTrue(success,network.message(params,DYNAMIC_addVisit,"接口返回失败",response.body().asString()));
Assert.assertTrue(result,network.message(params, DYNAMIC_addVisit,"接口返回数据为空",response.body().asString()));
params.clear();
params.put("confId",posterConfId);
response = network.getResponse(params, INViTATION_view);
......@@ -353,19 +329,11 @@ public class InvitationLetter implements Authorization{
//切换为访客
userTku();
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid",posterScid);
params.put("forwardTime",forwardTime);
Response response = network.postResponse(params, DYNAMIC_addVisit);
boolean success = response.jsonPath().getBoolean("success");
boolean result = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,DYNAMIC_addVisit,"接口返回失败",response.body().asString()));
Assert.assertTrue(result,network.message(params, DYNAMIC_addVisit,"接口返回数据为空",response.body().asString()));
params.clear();
params.put("scid",posterScid);
params.put("bizNo",posterConfId);
response = network.getResponse(params,CONTENT_READ);
success = response.jsonPath().getBoolean("success");
Response response = network.getResponse(params,CONTENT_READ);
boolean success = response.jsonPath().getBoolean("success");
Object data = response.jsonPath().getJsonObject("data");
Assert.assertTrue(success,network.message(params,CONTENT_READ,"接口返回失败",response.body().asString()));
Assert.assertNotNull(data,network.message(params,CONTENT_READ,"获取访问动画邀请函记录失败",response.body().asString()));
......@@ -376,7 +344,7 @@ public class InvitationLetter implements Authorization{
params.put("visitorPhone","13598765432");
response = network.postResponse(params,INViTATION_acceptInvitation);
success = response.jsonPath().getBoolean("success");
result = response.jsonPath().getBoolean("data");
boolean result = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,INViTATION_acceptInvitation,"接口返回失败",response.body().asString()));
Assert.assertTrue(result,network.message(params,INViTATION_acceptInvitation,"获取访问动画邀请函记录失败",response.body().asString()));
}
......@@ -394,7 +362,7 @@ public class InvitationLetter implements Authorization{
Assert.assertNotNull(data,network.message(params,INViTATION_myInvitationLetters,"接口返回数据为空",response.body().asString()));
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertEquals(size ,listSize+2,network.message(params,INViTATION_myInvitationLetters,"发送邀请函列表为空",response.body().asString()));
Assert.assertTrue(size >0,network.message(params,INViTATION_myInvitationLetters,"发送邀请函列表为空",response.body().asString()));
}
@Test(description="代理人_查看动画邀请函详情",priority = 18)
......
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