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

增加优惠码绑定和邀请关系绑定,并支付成功

parent ff03c592
...@@ -48,10 +48,10 @@ public class Cashback implements Authorization { ...@@ -48,10 +48,10 @@ public class Cashback implements Authorization {
payParams.put("entryDiscountType",1); //入口折扣类型,1-普通,3-邀请,4-优惠码 payParams.put("entryDiscountType",1); //入口折扣类型,1-普通,3-邀请,4-优惠码
Response response = network.getResponse(PAY_info); Response response = network.getResponse(PAY_info);
int discountType = response.jsonPath().getInt("data.discountType"); int discountType = response.jsonPath().getInt("data.discountType");
int validity = response.jsonPath().getInt("data.validity"); String superiorName = response.jsonPath().getString("data.invitation.superiorName");
int preferentialPrice = response.jsonPath().getInt("data.preferentialPrice"); int preferentialPrice = response.jsonPath().getInt("data.preferentialPrice");
Assert.assertEquals(discountType,3,network.message(PAY_info,"非邀请付费逻辑",response.body().asString())); Assert.assertEquals(discountType,3,network.message(PAY_info,"非邀请付费逻辑",response.body().asString()));
Assert.assertEquals(validity,12,network.message(PAY_info,"增加会员时长非12个月",response.body().asString())); Assert.assertEquals(superiorName,"吉吉",network.message(PAY_info,"增加会员时长非12个月",response.body().asString()));
Assert.assertEquals(preferentialPrice,3,network.message(PAY_info,"邀请价格非0.03",response.body().asString())); Assert.assertEquals(preferentialPrice,3,network.message(PAY_info,"邀请价格非0.03",response.body().asString()));
} }
......
...@@ -237,5 +237,18 @@ public class Pay implements Authorization { ...@@ -237,5 +237,18 @@ public class Pay implements Authorization {
int userVersion = response.jsonPath().getInt("data.find {it.openType == 1}.userVersion"); // 找出开启状态的版本类型 1为通用版 2为保险版 int userVersion = response.jsonPath().getInt("data.find {it.openType == 1}.userVersion"); // 找出开启状态的版本类型 1为通用版 2为保险版
Assert.assertEquals(userVersion,2,network.message(version_info,"会员类型版本判断:判断错误,此版本为通用版",response.body().asString())); Assert.assertEquals(userVersion,2,network.message(version_info,"会员类型版本判断:判断错误,此版本为通用版",response.body().asString()));
} }
@Test (description = "查询优惠码使用情况",priority = 14)
public void 查询优惠码使用情况 () {
//优惠码列表
sleep(3000);
Map<String, Object> codeListParam = new HashMap<String, Object>();
codeListParam.put("batchId",id);
codeListParam.put("pageIndex",1);
codeListParam.put("pageSize",20);
Response response =network.getResponse(codeListParam,MANAGER_codeList);
String status=response.jsonPath().getString("data.list[0].status");
Assert.assertEquals(status,"已使用",network.message(codeListParam, PAY_distribute,"用户优惠码付费支付失败",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